Skip to content

Commit

Permalink
Merge pull request #44 from lucor/release/v1.1.0
Browse files Browse the repository at this point in the history
Release v1.1.0
  • Loading branch information
lucor authored May 17, 2021
2 parents aea6085 + f1b5bcc commit f61a0b4
Show file tree
Hide file tree
Showing 42 changed files with 954 additions and 209 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "CI"
on: push
on: [push, pull_request]

jobs:
lint:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/fyne-cross
/*.dmg
/*.xip
35 changes: 33 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
# Changelog - Fyne.io fyne-cross

## [1.0.0]
## 1.1.0 - 14 May 2021

### Added

- Add darwin arm64 target #39
- Add FreeBSD on arm64 target #29
- Add the `darwin-image` command to build the darwin docker image
- Add the `local` flag for darwin to build directly from the host
- Add a dedicated docker image for macOS
- Add a dedicated docker image for Windows
- Darwin image build: add support for SDK version #45

### Changed

- Update Go to v1.16.4
- Update fyne CLI to v2.0.3
- Update FreeBSD SDK to v12.2 #29
- Refactor docker images layout to ensure compatibility with previous versions of fyne-cross

### Fixed

- Fix android keystore path is not resolved correctly
- Fix some release flags are always set even if empty
- Fix appID flag should not have a default #25
- Fix the option --env does not allow values containing comma #35

### Removed

- Remove darwin 386 target
- Remove the dependency from the docker/golang-cross image for the base image

## 1.0.0 - 13 December 2020
- Add support for "fyne release" #3
- Add support for creating packaged .tar.gz bundles on freebsd #6
- Add support for Linux Wayland #10
Expand All @@ -10,7 +41,7 @@
- Fix build failure for Linux mobile #19
- Update Go to v1.14.13

## [0.9.0]
## 0.9.0 - 17 October 2020
- Releaseing under project namespace with previous 2.2.1 becoming 0.9.0 in fyne-io namespace


Expand Down
109 changes: 81 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,83 @@
tag := $(shell date +"%y.%m.%d")

build-images:
@docker build -f ${CURDIR}/docker/base/Dockerfile -t fyneio/fyne-cross:base-latest .
@docker tag fyneio/fyne-cross:base-latest fyneio/fyne-cross:base-$(tag)
@docker build -f ${CURDIR}/docker/linux-386/Dockerfile -t fyneio/fyne-cross:linux-386-latest .
@docker tag fyneio/fyne-cross:linux-386-latest fyneio/fyne-cross:linux-386-$(tag)
@docker build -f ${CURDIR}/docker/linux-arm/Dockerfile -t fyneio/fyne-cross:linux-arm-latest .
@docker tag fyneio/fyne-cross:linux-arm-latest fyneio/fyne-cross:linux-arm-$(tag)
@docker build -f ${CURDIR}/docker/linux-arm64/Dockerfile -t fyneio/fyne-cross:linux-arm64-latest .
@docker tag fyneio/fyne-cross:linux-arm64-latest fyneio/fyne-cross:linux-arm64-$(tag)
@docker build -f ${CURDIR}/docker/android/Dockerfile -t fyneio/fyne-cross:android-latest .
@docker tag fyneio/fyne-cross:android-latest fyneio/fyne-cross:android-$(tag)
@docker build -f ${CURDIR}/docker/freebsd/Dockerfile -t fyneio/fyne-cross:freebsd-latest .
@docker tag fyneio/fyne-cross:freebsd-latest fyneio/fyne-cross:freebsd-$(tag)

push-images:
$(eval TAG := $(date +"%y.%m.%d"))
@docker push fyneio/fyne-cross:base-latest
@docker push fyneio/fyne-cross:base-$(tag)
@docker push fyneio/fyne-cross:linux-386-latest
@docker push fyneio/fyne-cross:linux-386-$(tag)
@docker push fyneio/fyne-cross:linux-arm-latest
@docker push fyneio/fyne-cross:linux-arm-$(tag)
@docker push fyneio/fyne-cross:linux-arm64-latest
@docker push fyneio/fyne-cross:linux-arm64-$(tag)
@docker push fyneio/fyne-cross:android-latest
@docker push fyneio/fyne-cross:android-$(tag)
@docker push fyneio/fyne-cross:freebsd-latest
@docker push fyneio/fyne-cross:freebsd-$(tag)
FYNE_CROSS_VERSION := "1.1"

base:
@docker build -f ${CURDIR}/docker/base/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base .

base-llvm: base
@docker build --build-arg FYNE_CROSS_VERSION=${FYNE_CROSS_VERSION} -f ${CURDIR}/docker/base-llvm/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-llvm .

android: base
@docker build --build-arg FYNE_CROSS_VERSION=${FYNE_CROSS_VERSION} -f ${CURDIR}/docker/android/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-android .

darwin: base-llvm
@docker build --build-arg FYNE_CROSS_VERSION=${FYNE_CROSS_VERSION} -f ${CURDIR}/docker/darwin/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-darwin .

base-freebsd: base-llvm
@docker build --build-arg FYNE_CROSS_VERSION=${FYNE_CROSS_VERSION} -f ${CURDIR}/docker/base-freebsd/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-freebsd .

freebsd: base-freebsd
@docker build --build-arg FYNE_CROSS_VERSION=${FYNE_CROSS_VERSION} -f ${CURDIR}/docker/freebsd-amd64/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-freebsd-amd64 .
@docker build --build-arg FYNE_CROSS_VERSION=${FYNE_CROSS_VERSION} -f ${CURDIR}/docker/freebsd-arm64/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-freebsd-arm64 .

linux: base
@docker build --build-arg FYNE_CROSS_VERSION=${FYNE_CROSS_VERSION} -f ${CURDIR}/docker/linux-386/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-386 .
@docker build --build-arg FYNE_CROSS_VERSION=${FYNE_CROSS_VERSION} -f ${CURDIR}/docker/linux-arm/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-arm .
@docker build --build-arg FYNE_CROSS_VERSION=${FYNE_CROSS_VERSION} -f ${CURDIR}/docker/linux-arm64/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-arm64 .

windows: base
@docker build --build-arg FYNE_CROSS_VERSION=${FYNE_CROSS_VERSION} -f ${CURDIR}/docker/windows/Dockerfile -t fyneio/fyne-cross:${FYNE_CROSS_VERSION}-windows .

# build all images for release. Note do not build darwin
build-images: base android freebsd linux windows

# tag the images with the YY.MM.DD suffix
tag-images:
# tag base images
@docker tag fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-$(tag)
@docker tag fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-llvm fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-llvm-$(tag)
@docker tag fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-freebsd fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-freebsd-$(tag)
# tag android images
@docker tag fyneio/fyne-cross:${FYNE_CROSS_VERSION}-android fyneio/fyne-cross:${FYNE_CROSS_VERSION}-android-$(tag)
# tag linux images
@docker tag fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-386 fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-386-$(tag)
@docker tag fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-arm fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-arm-$(tag)
@docker tag fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-arm64 fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-arm64-$(tag)
# tag freebsd images
@docker tag fyneio/fyne-cross:${FYNE_CROSS_VERSION}-freebsd-amd64 fyneio/fyne-cross:${FYNE_CROSS_VERSION}-freebsd-amd64-$(tag)
@docker tag fyneio/fyne-cross:${FYNE_CROSS_VERSION}-freebsd-arm64 fyneio/fyne-cross:${FYNE_CROSS_VERSION}-freebsd-arm64-$(tag)
# tag windows images
@docker tag fyneio/fyne-cross:${FYNE_CROSS_VERSION}-windows fyneio/fyne-cross:${FYNE_CROSS_VERSION}-windows-$(tag)

# push the latest images
push-latest-images:
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-llvm
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-freebsd
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-android
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-386
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-arm
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-arm64
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-freebsd-amd64
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-freebsd-arm64
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-windows

# push the tagged images
push-tag-images:
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-$(tag)
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-llvm-$(tag)
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base-freebsd-$(tag)
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-android-$(tag)
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-386-$(tag)
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-arm-$(tag)
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-linux-arm64-$(tag)
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-freebsd-amd64-$(tag)
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-freebsd-arm64-$(tag)
@docker push fyneio/fyne-cross:${FYNE_CROSS_VERSION}-windows-$(tag)

# push all images: latest and tagged
push-images: push-latest-images push-tag-images

embed:
go run internal/cmd/embed/main.go
49 changes: 41 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

[![CI](https://github.com/fyne-io/fyne-cross/workflows/CI/badge.svg)](https://github.com/fyne-io/fyne-cross/actions?query=workflow%3ACI) [![Go Report Card](https://goreportcard.com/badge/github.com/fyne-io/fyne-cross)](https://goreportcard.com/report/github.com/fyne-io/fyne-cross) [![GoDoc](https://godoc.org/github.com/fyne-io/fyne-cross?status.svg)](http://godoc.org/github.com/fyne-io/fyne-cross) [![version](https://img.shields.io/github/v/tag/fyne-io/fyne-cross?label=version)]()

fyne-cross is a simple tool to cross compile and create distribution packages for [Fyne](https://fyne.io) applications.

It has been inspired by [xgo](https://github.com/karalabe/xgo) and uses a [docker image](https://hub.docker.com/r/fyneio/fyne-cross) built on top of the [golang-cross](https://github.com/docker/golang-cross) image, that includes the MinGW compiler for windows, and an OSX SDK, along with the Fyne requirements.
fyne-cross is a simple tool to cross compile and create distribution packages
for [Fyne](https://fyne.io) applications using docker images that include Linux,
the MinGW compiler for Windows, FreeBSD, and a macOS SDK, along with the Fyne
requirements.

Supported targets are:
- darwin/amd64
- darwin/386
- darwin/arm64
- freebsd/amd64
- freebsd/arm64
- linux/amd64
- linux/386
- linux/arm
Expand All @@ -23,6 +25,9 @@ Supported targets are:
> - iOS compilation is supported only on darwin hosts. See [fyne pre-requisites](https://developer.fyne.io/started/#prerequisites) for details.
> - macOS packaging for public distrubution (release mode) is supported only on darwin hosts.
> - windows packaging for public distrubution (release mode) is supported only on windows hosts.
> - starting from v1.1.0:
> - cross-compile from NOT `darwin` (i.e. linux) to `darwin`: the image with the macOS SDK is no more available via docker hub and has to be built manually, see the [Build the darwin image](#build_darwin_image) section below.
> - cross-compile from `darwin` to `darwin` by default will use under the hood the fyne CLI tool and requires Go and the macOS SDK installed on the host.
## Requirements

Expand Down Expand Up @@ -109,6 +114,34 @@ fyne-cross linux
fyne-cross linux -output bugs ./cmd/bugs
```

## <a name="build_darwin_image"></a>Build the docker image for OSX/Darwin/Apple cross-compiling
The docker image for darwin is not provided via docker hub and need to build manually since it depends on the macOS SDK.

**[Please ensure you have read and understood the Xcode license
terms before continuing.](https://www.apple.com/legal/sla/docs/xcode.pdf)**

To build the image:
1. [Download Command Line Tools for Xcode](https://developer.apple.com/download/more) >= 12.4 (macOS SDK 11.x)
2. Run: `fyne-cross darwin-image --xcode-path /path/to/Command_Line_Tools_for_Xcode_12.5.dmg`

The command above will:
- install the dependencies required by [osxcross](https://github.com/tpoechtrager/osxcross) to package the macOS SDK and compile the macOS cross toolchain.
- package the macOS SDK
- compile the macOS cross toolchain
- build the `fyneio/fyne-cross:<ver>-darwin` image that will be used by fyne-cross

> NOTE: the creation of the image may take several minutes and may require more than 25 GB of free disk space.
### [EXPERIMENTAL] Build using a different SDK version

By default fyne-cross will attempt to auto-detect the latest version of SDK provided by the Xcode package. If for any reason a different SDK version is required, it can be specified using the `--sdk-version` flag.

Example:

`fyne-cross darwin-image --sdk-version 11.1 --xcode-path /path/to/Command_Line_Tools_for_Xcode_12.4.dmg`

> Note: this feature is marked as EXPERIMENTAL
## Contribute

- Fork and clone the repository
Expand All @@ -119,8 +152,8 @@ fyne-cross linux -output bugs ./cmd/bugs

See [contributors](https://github.com/fyne-io/fyne-cross/graphs/contributors) page

## Legal note
## Credits

OSX/Darwin/Apple builds:
**[Please ensure you have read and understood the Xcode license
terms before continuing.](https://www.apple.com/legal/sla/docs/xcode.pdf)**
- [osxcross](https://github.com/tpoechtrager/osxcross) for the macOS Cross toolchain for Linux
- [golang-cross](https://github.com/docker/golang-cross) for the inspiration and the docker images used in the initial versions
- [xgo](https://github.com/karalabe/xgo) for the inspiration
71 changes: 61 additions & 10 deletions docker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,82 @@

All notable changes to the fyne-cross docker images will be documented in this file.

Release cycle won't follow the fyne-cross one, so the images will be tagged using the label
year.month.day along with the latest one.

# Release 20.12.13
## fyne 1.1.x compatible

Latest versions available on Docker Hub are:

- fyneio/fyne-cross:1.1-base
- fyneio/fyne-cross:1.1-base-llvm
- fyneio/fyne-cross:1.1-base-freebsd
- fyneio/fyne-cross:1.1-android
- fyneio/fyne-cross:1.1-freebsd-amd64
- fyneio/fyne-cross:1.1-freebsd-arm64
- fyneio/fyne-cross:1.1-linux-386
- fyneio/fyne-cross:1.1-linux-arm64
- fyneio/fyne-cross:1.1-linux-arm
- fyneio/fyne-cross:1.1-windows

Release cycle won't follow the fyne-cross one, so the images will be tagged and
available on Docker Hub using the label year.month.day along with the tags
above.

Example: `fyneio/fyne-cross:1.1-base-21.03.17`

### Release 21.05.08
- Update Go to v1.16.4
- Update fyne CLI to v2.0.3

### Release 21.05.03
- Refactor docker images layout to ensure compatibility with previous versions of fyne-cross
- Add FreeBSD on arm64 target
- Add a dedicated docker image for macOS
- Add a dedicated docker image for Windows
- Update Go to v1.16.3
- Update fyne CLI to v2.0.2
- Update FreeBSD SDK to v12.2
- Remove the dependency from the docker/golang-cross image for the base image

> Note: the docker image for darwin is not provided anymore and need to build manually since it depends on the OSX SDK.
## fyne 1.0.x compatible

Latest versions available on Docker Hub are:
- fyneio/fyne-cross:base-latest
- fyneio/fyne-cross:darwin-latest
- fyneio/fyne-cross:linux-386-latest
- fyneio/fyne-cross:linux-arm64-latest
- fyneio/fyne-cross:linux-arm-latest
- fyneio/fyne-cross:android-latest
- fyneio/fyne-cross:freebsd-latest

Release cycle won't follow the fyne-cross one, so the images will be tagged and
available on Docker Hub using the label year.month.day along with the tags
above.

Example: `fyneio/fyne-cross:base-20.12.13`

### Release 20.12.13
- Update Go to v1.14.13
- Fix build failure for Linux mobile #19

# Release 20.12.10
### Release 20.12.10
- Update fyne cli to v1.4.2
> Note: this version is the last that provides Go v1.13.x
# Release 20.12.05
### Release 20.12.05
- Update fyne cli to v1.4.2-0.20201204171445-8f33697cf611
- Add support for Linux Wayland #10

# Release 20.11.28
### Release 20.11.28
- Update fyne cli to v1.4.2-0.20201127180716-f9f91c194737 fyne-io#1609

# Release 20.11.25
### Release 20.11.25
- Update fyne cli to v1.4.2-0.20201125075943-97ad77d2abe0 fyne-io#1538

# Release 20.11.23
### Release 20.11.23
- Update fyne cli to v1.4.2-0.20201122132119-67b762f56dc0 fyne-io#1527

# Release 20.11.04
### Release 20.11.04
- fyne cli updated to v1.4.0

# Archive
Expand Down
20 changes: 14 additions & 6 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ This folder contains the docker images used by fyne-cross to build the Fyne appl

It provides the following images:

- fyneio/fyne-cross:base
- fyneio/fyne-cross:linux-386
- fyneio/fyne-cross:linux-arm64
- fyneio/fyne-cross:linux-arm
- fyneio/fyne-cross:android
- fyneio/fyne-cross:freebsd
- fyneio/fyne-cross:1.1-base
- fyneio/fyne-cross:1.1-base-llvm
- fyneio/fyne-cross:1.1-base-freebsd
- fyneio/fyne-cross:1.1-android
- fyneio/fyne-cross:1.1-freebsd-amd64
- fyneio/fyne-cross:1.1-freebsd-arm64
- fyneio/fyne-cross:1.1-linux-386
- fyneio/fyne-cross:1.1-linux-arm64
- fyneio/fyne-cross:1.1-linux-arm
- fyneio/fyne-cross:1.1-windows

> Note:
> - images are compatible with fyne-cross 1.1.x
> - the darwin image is not hosted on dockerhub
3 changes: 2 additions & 1 deletion docker/android/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM fyneio/fyne-cross:base-latest
ARG FYNE_CROSS_VERSION
FROM fyneio/fyne-cross:${FYNE_CROSS_VERSION}-base

ENV JAVA_HOME /usr/local/android_jdk8
ENV ANDROID_HOME /usr/local/android_sdk
Expand Down
Loading

0 comments on commit f61a0b4

Please sign in to comment.