From fda64ff0032bb97abed1c73f94175e3a834a1a98 Mon Sep 17 00:00:00 2001 From: nobe4 Date: Mon, 6 May 2024 09:24:00 +0200 Subject: [PATCH 01/17] fix: update install suggestion for missing `fyne` command This makes the install process more inline with the CI workflow, where both are tested --- internal/command/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/command/command.go b/internal/command/command.go index 4559ed1..020407d 100644 --- a/internal/command/command.go +++ b/internal/command/command.go @@ -157,7 +157,7 @@ func printUsage(template string, data interface{}) { func checkFyneBinHost(ctx Context) (string, error) { fyne, err := execabs.LookPath("fyne") if err != nil { - return "", fmt.Errorf("missed requirement: fyne. To install: `go get fyne.io/fyne/v2/cmd/fyne` and add $GOPATH/bin to $PATH") + return "", fmt.Errorf("missed requirement: fyne. To install: `go install fyne.io/fyne/v2/cmd/fyne@latest` or `go get fyne.io/fyne/v2/cmd/fyne@latest` and add $GOPATH/bin to $PATH") } if debugging() { From 26515d991e7704276e3fc5c6152d5935e15715ac Mon Sep 17 00:00:00 2001 From: nobe4 Date: Tue, 7 May 2024 09:14:08 +0200 Subject: [PATCH 02/17] fix: remove `go get` when installing this command cc https://github.com/fyne-io/fyne-cross/pull/248#pullrequestreview-2041278225 --- .github/workflows/ci.yml | 8 ++------ internal/command/command.go | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4389bb3..cca249e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,11 +131,9 @@ jobs: working-directory: fyne-cross run: go install - # attempt to use "go install" but fallback to "go get" - name: Install Fyne run: | - go install fyne.io/fyne/v2/cmd/fyne@latest || - go get fyne.io/fyne/v2/cmd/fyne@latest + go install fyne.io/fyne/v2/cmd/fyne@latest - name: Install Podman if: ${{ runner.os == 'macos' }} @@ -213,11 +211,9 @@ jobs: working-directory: fyne-cross run: go install - # attempt to use "go install" but fallback to "go get" - name: Install Fyne run: | - go install fyne.io/fyne/v2/cmd/fyne@latest || - go get fyne.io/fyne/v2/cmd/fyne@latest + go install fyne.io/fyne/v2/cmd/fyne@latest - name: Install Podman if: ${{ runner.os == 'macos' }} diff --git a/internal/command/command.go b/internal/command/command.go index 020407d..3ce1490 100644 --- a/internal/command/command.go +++ b/internal/command/command.go @@ -157,7 +157,7 @@ func printUsage(template string, data interface{}) { func checkFyneBinHost(ctx Context) (string, error) { fyne, err := execabs.LookPath("fyne") if err != nil { - return "", fmt.Errorf("missed requirement: fyne. To install: `go install fyne.io/fyne/v2/cmd/fyne@latest` or `go get fyne.io/fyne/v2/cmd/fyne@latest` and add $GOPATH/bin to $PATH") + return "", fmt.Errorf("missed requirement: fyne. To install: `go install fyne.io/fyne/v2/cmd/fyne@latest` and add $GOPATH/bin to $PATH") } if debugging() { From c870d6b9790b24fd0bd65a1411622c54b1ce7fb8 Mon Sep 17 00:00:00 2001 From: Will Brode Date: Wed, 15 May 2024 16:18:08 -0700 Subject: [PATCH 03/17] fix: Large performance boost by avoiding running simple preparation in docker --- internal/command/command.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/command/command.go b/internal/command/command.go index 3ce1490..181d35c 100644 --- a/internal/command/command.go +++ b/internal/command/command.go @@ -97,20 +97,18 @@ Use "fyne-cross -help" for more information about a command. func cleanTargetDirs(ctx Context, image containerImage) error { dirs := map[string]string{ - "bin": volume.JoinPathContainer(ctx.BinDirContainer(), image.ID()), - "dist": volume.JoinPathContainer(ctx.DistDirContainer(), image.ID()), - "temp": volume.JoinPathContainer(ctx.TmpDirContainer(), image.ID()), + "bin": volume.JoinPathHost(ctx.Volume.BinDirHost(), image.ID()), + "dist": volume.JoinPathHost(ctx.Volume.DistDirHost(), image.ID()), + "temp": volume.JoinPathHost(ctx.Volume.TmpDirHost(), image.ID()), } log.Infof("[i] Cleaning target directories...") for k, v := range dirs { - err := image.Run(ctx.Volume, options{}, []string{"rm", "-rf", v}) - if err != nil { + if err := os.RemoveAll(v); err != nil { return fmt.Errorf("could not clean the %q dir %s: %v", k, v, err) } - err = image.Run(ctx.Volume, options{}, []string{"mkdir", "-p", v}) - if err != nil { + if err := os.MkdirAll(v, os.ModePerm); err != nil { return fmt.Errorf("could not create the %q dir %s: %v", k, v, err) } @@ -142,10 +140,12 @@ func prepareIcon(ctx Context, image containerImage) error { } } - err := image.Run(ctx.Volume, options{}, []string{"cp", volume.JoinPathContainer(ctx.WorkDirContainer(), ctx.Icon), volume.JoinPathContainer(ctx.TmpDirContainer(), image.ID(), icon.Default)}) - if err != nil { - return fmt.Errorf("could not copy the icon to temp folder: %v", err) + if data, err := os.ReadFile(volume.JoinPathHost(ctx.Volume.WorkDirHost(), ctx.Icon)); err != nil { + return fmt.Errorf("could not read in icon %s: %w", ctx.Icon, err) + } else if err := os.WriteFile(volume.JoinPathHost(ctx.TmpDirHost(), image.ID(), icon.Default), data, 0644); err != nil { + return fmt.Errorf("could not copy icon %s to tmp folder: %w", ctx.Icon, err) } + return nil } From 18ed90acda7c7d57f2b3b17acd258e14f4feb690 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Wed, 28 Aug 2024 22:43:13 +0100 Subject: [PATCH 04/17] Fixing so we don't seek a missing android image for darwin --- internal/command/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/command/docker.go b/internal/command/docker.go index 18d3ac6..8fb6865 100644 --- a/internal/command/docker.go +++ b/internal/command/docker.go @@ -114,7 +114,7 @@ func (i *localContainerImage) cmd(vol volume.Volume, opts options, cmdArgs []str } arch := "amd64" - if runtime.GOARCH == "arm64" { + if runtime.GOARCH == "arm64" && (runtime.GOOS != "darwin" || i.os != "android") { // If we are running on arm64, we should have arm64 image to avoid using emulation arch = runtime.GOARCH } From 5acc31aafd4b2a31a72d5ee5fead1cb8729395d6 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Wed, 28 Aug 2024 22:51:03 +0100 Subject: [PATCH 05/17] Updating to versions of Fyne --- .github/workflows/ci.yml | 8 ++++---- go.mod | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cca249e..61f412b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] # use max/min supported Go versions - go-version: ["1.21.x", "1.17.x"] + go-version: ["1.23.x", "1.19.x"] steps: - name: Setup Go environment @@ -56,7 +56,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] # use max/min supported Go versions - go-version: ["1.18.x"] + go-version: ["1.19.x"] steps: - name: Setup Go environment @@ -80,7 +80,7 @@ jobs: fail-fast: false matrix: # use max/min supported Go versions - go-version: ["1.21.x", "1.17.x"] + go-version: ["1.23.x", "1.19.x"] target: - os: linux - os: windows @@ -160,7 +160,7 @@ jobs: fail-fast: false matrix: # use max/min supported Go versions - go-version: ["1.21.x", "1.17.x"] + go-version: ["1.23.x", "1.19.x"] target: - os: linux - os: windows diff --git a/go.mod b/go.mod index ba9a838..5c133a3 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/fyne-io/fyne-cross -go 1.17 +go 1.19 require ( github.com/BurntSushi/toml v1.3.2 From 437c03cd832161b20907744559eb655eae72901f Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Wed, 28 Aug 2024 22:56:12 +0100 Subject: [PATCH 06/17] Don't use a version that requires a newer Go compiler --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61f412b..557eac6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: go-version: "1.19.x" - name: Install staticcheck - run: go install honnef.co/go/tools/cmd/staticcheck@latest + run: go install honnef.co/go/tools/cmd/staticcheck@1.4.7 - name: Install goimports run: go install golang.org/x/tools/cmd/goimports@latest From 9428532ed68a89cbc2bb90a3b694cfe88cdff515 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Thu, 29 Aug 2024 09:49:57 +0100 Subject: [PATCH 07/17] oops, typo in version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 557eac6..7c7fb97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: go-version: "1.19.x" - name: Install staticcheck - run: go install honnef.co/go/tools/cmd/staticcheck@1.4.7 + run: go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 - name: Install goimports run: go install golang.org/x/tools/cmd/goimports@latest From 1df19d4c092f33c3938b26cbdd391d0a285d9137 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Thu, 29 Aug 2024 10:10:51 +0100 Subject: [PATCH 08/17] Fix deprecations from Go 1.19 --- internal/cloud/s3.go | 7 +++---- internal/command/command.go | 3 +-- internal/command/darwin_sdk_extract.go | 3 +-- internal/metadata/load.go | 3 +-- internal/volume/volume.go | 5 ++--- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/internal/cloud/s3.go b/internal/cloud/s3.go index a630df4..f53921f 100644 --- a/internal/cloud/s3.go +++ b/internal/cloud/s3.go @@ -6,7 +6,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "os" "path/filepath" "strings" @@ -20,7 +19,7 @@ import ( "github.com/klauspost/compress/zstd" "golang.org/x/sync/errgroup" - archiver "github.com/mholt/archiver/v3" + "github.com/mholt/archiver/v3" ) type AWSSession struct { @@ -104,7 +103,7 @@ func (a *AWSSession) UploadFile(localFile string, s3FilePath string) error { } func (a *AWSSession) UploadCompressedDirectory(localDirectoy string, s3FilePath string) error { - file, err := ioutil.TempFile("", "fyne-cross-s3") + file, err := os.CreateTemp("", "fyne-cross-s3") if err != nil { return err } @@ -255,7 +254,7 @@ func (a *AWSSession) DownloadFile(s3FilePath string, localFile string) error { } func (a *AWSSession) DownloadCompressedDirectory(s3FilePath string, localRootDirectory string) error { - file, err := ioutil.TempFile("", "fyne-cross-s3") + file, err := os.CreateTemp("", "fyne-cross-s3") if err != nil { return err } diff --git a/internal/command/command.go b/internal/command/command.go index 181d35c..8a62859 100644 --- a/internal/command/command.go +++ b/internal/command/command.go @@ -2,7 +2,6 @@ package command import ( "fmt" - "io/ioutil" "os" "path/filepath" "strings" @@ -132,7 +131,7 @@ func prepareIcon(ctx Context, image containerImage) error { } log.Infof("[!] Default icon not found at %q", ctx.Icon) - err = ioutil.WriteFile(volume.JoinPathHost(ctx.WorkDirHost(), ctx.Icon), icon.FyneLogo, 0644) + err = os.WriteFile(volume.JoinPathHost(ctx.WorkDirHost(), ctx.Icon), icon.FyneLogo, 0644) if err != nil { return fmt.Errorf("could not create the temporary icon: %s", err) } diff --git a/internal/command/darwin_sdk_extract.go b/internal/command/darwin_sdk_extract.go index cf14546..70ded4c 100644 --- a/internal/command/darwin_sdk_extract.go +++ b/internal/command/darwin_sdk_extract.go @@ -3,7 +3,6 @@ package command import ( "errors" "fmt" - "io/ioutil" "os" "path/filepath" "strings" @@ -78,7 +77,7 @@ func (cmd *DarwinSDKExtract) Run() error { } // mount the fyne-cross volume - workDir, err := ioutil.TempDir("", cmd.Name()) + workDir, err := os.MkdirTemp("", cmd.Name()) if err != nil { return err } diff --git a/internal/metadata/load.go b/internal/metadata/load.go index 25d214a..e05a94d 100644 --- a/internal/metadata/load.go +++ b/internal/metadata/load.go @@ -2,7 +2,6 @@ package metadata import ( "io" - "io/ioutil" "os" "path/filepath" @@ -12,7 +11,7 @@ import ( // Load attempts to read a FyneApp metadata from the provided reader. // If this cannot be done an error will be returned. func Load(r io.Reader) (*FyneApp, error) { - str, err := ioutil.ReadAll(r) + str, err := io.ReadAll(r) if err != nil { return nil, err } diff --git a/internal/volume/volume.go b/internal/volume/volume.go index 617ff41..c2461a8 100644 --- a/internal/volume/volume.go +++ b/internal/volume/volume.go @@ -7,7 +7,6 @@ import ( "archive/zip" "fmt" "io" - "io/ioutil" "os" "path" "path/filepath" @@ -31,11 +30,11 @@ const ( // Copy copies a resource from src to dest func Copy(src string, dst string) error { - data, err := ioutil.ReadFile(src) + data, err := os.ReadFile(src) if err != nil { return err } - return ioutil.WriteFile(dst, data, 0644) + return os.WriteFile(dst, data, 0644) } // DefaultCacheDirHost returns the default cache dir on the host From d632e96c7f8d277465906ebeea774f7b772dd368 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Sat, 2 Sep 2023 09:19:35 +0200 Subject: [PATCH 09/17] Fix Android release that generates a .aab file Creating Android release generates a .aab file. The Build() function was working with *.apk files only. So the AAB file was not copied and triggered a SELinux error. The copy sh command failed also. This commit fixes the problem by changing the pattern to match on copy, and the package name using ".aab" suffix. NOTE: it could be better to use filepath.Glob() to find files and use os.Rename() instead. --- internal/command/android.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/command/android.go b/internal/command/android.go index c1ec675..97745b1 100644 --- a/internal/command/android.go +++ b/internal/command/android.go @@ -80,6 +80,7 @@ func (cmd *android) Build(image containerImage) (string, error) { log.Info("[i] Packaging app...") packageName := fmt.Sprintf("%s.apk", cmd.defaultContext.Name) + pattern := "*.apk" err := prepareIcon(cmd.defaultContext, image) if err != nil { @@ -88,6 +89,8 @@ func (cmd *android) Build(image containerImage) (string, error) { if cmd.defaultContext.Release { err = fyneRelease(cmd.defaultContext, image) + packageName = fmt.Sprintf("%s.aab", cmd.defaultContext.Name) + pattern = "*.aab" } else { err = fynePackage(cmd.defaultContext, image) } @@ -101,8 +104,9 @@ func (cmd *android) Build(image containerImage) (string, error) { // https://github.com/fyne-io/fyne/blob/v1.4.0/cmd/fyne/internal/mobile/build_androidapp.go#L297 // To avoid to duplicate the fyne tool sanitize logic here, the location of // the dist package to move will be detected using a matching pattern - command := fmt.Sprintf("mv %q/*.apk %q", + command := fmt.Sprintf("mv %q/%s %q", volume.JoinPathContainer(cmd.defaultContext.WorkDirContainer(), cmd.defaultContext.Package), + pattern, volume.JoinPathContainer(cmd.defaultContext.TmpDirContainer(), image.ID(), packageName), ) From ee14a688fbe3c90da24639eb0fd0ccf1fdecc84c Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Tue, 31 Dec 2024 12:20:44 +0000 Subject: [PATCH 10/17] Use a staticcheck that understands some of the test deps --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae2bd28..bee2e51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: go-version: "1.23.x" - name: Install staticcheck - run: go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 + run: go install honnef.co/go/tools/cmd/staticcheck@v0.5.1 - name: Install goimports run: go install golang.org/x/tools/cmd/goimports@latest From 54a977ea2e5051132e07ca7fdf96a0df3646f58d Mon Sep 17 00:00:00 2001 From: lucor Date: Wed, 8 Jan 2025 19:27:45 +0100 Subject: [PATCH 11/17] Update the compress deps as far as we can with Go 1.19 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e0ffd26..f937f96 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/BurntSushi/toml v1.3.2 github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9 github.com/aws/aws-sdk-go v1.51.13 - github.com/klauspost/compress v1.17.9 + github.com/klauspost/compress v1.17.7 github.com/mholt/archiver/v3 v3.5.1 github.com/stretchr/testify v1.9.0 github.com/urfave/cli/v2 v2.27.2 diff --git a/go.sum b/go.sum index 0f50bb3..782965d 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= From 5975fb669a476f4dee5a11021bad515231abcac7 Mon Sep 17 00:00:00 2001 From: lucor Date: Wed, 8 Jan 2025 18:39:18 +0100 Subject: [PATCH 12/17] web: update destination folder This commit updates the destination folder to wasm. Fixes: - https://github.com/fyne-io/fyne-cross-images/issues/50 - https://github.com/fyne-io/fyne-cross-images/pull/55 --- internal/command/web.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/command/web.go b/internal/command/web.go index 44d8d9e..85c7c3b 100644 --- a/internal/command/web.go +++ b/internal/command/web.go @@ -20,8 +20,10 @@ type web struct { defaultContext Context } -var _ platformBuilder = (*web)(nil) -var _ Command = (*web)(nil) +var ( + _ platformBuilder = (*web)(nil) + _ Command = (*web)(nil) +) func NewWebCommand() *web { return &web{} @@ -79,7 +81,7 @@ func (cmd *web) Build(image containerImage) (string, error) { } // move the dist package into the "tmp" folder - srcFile := volume.JoinPathContainer(cmd.defaultContext.WorkDirContainer(), "web") + srcFile := volume.JoinPathContainer(cmd.defaultContext.WorkDirContainer(), "wasm") dstFile := volume.JoinPathContainer(cmd.defaultContext.TmpDirContainer(), image.ID()) return "", image.Run(cmd.defaultContext.Volume, options{}, []string{"mv", srcFile, dstFile}) } From 94f33225b58ab83ffa0d550858352d5378fc70b0 Mon Sep 17 00:00:00 2001 From: lucor Date: Sun, 12 Jan 2025 12:28:05 +0100 Subject: [PATCH 13/17] metadata: update Fyne metadata to v2.5.3 --- internal/metadata/data.go | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/internal/metadata/data.go b/internal/metadata/data.go index f690ad0..55796b3 100644 --- a/internal/metadata/data.go +++ b/internal/metadata/data.go @@ -1,9 +1,17 @@ package metadata +// This file containts the Fyne metadata +// @see https://github.com/fyne-io/fyne/blob/v2.5.3/internal/metadata/data.go + // FyneApp describes the top level metadata for building a fyne application type FyneApp struct { - Website string `toml:",omitempty"` - Details AppDetails + Website string `toml:",omitempty"` + Details AppDetails + Development map[string]string `toml:",omitempty"` + Release map[string]string `toml:",omitempty"` + Source *AppSource `toml:",omitempty"` + LinuxAndBSD *LinuxAndBSD `toml:",omitempty"` + Languages []string `toml:",omitempty"` } // AppDetails describes the build information, this group may be OS or arch specific @@ -13,3 +21,16 @@ type AppDetails struct { Version string `toml:",omitempty"` Build int `toml:",omitempty"` } + +type AppSource struct { + Repo, Dir string `toml:",omitempty"` +} + +// LinuxAndBSD describes specific metadata for desktop files on Linux and BSD. +type LinuxAndBSD struct { + GenericName string `toml:",omitempty"` + Categories []string `toml:",omitempty"` + Comment string `toml:",omitempty"` + Keywords []string `toml:",omitempty"` + ExecParams string `toml:",omitempty"` +} From b2efed9722886bce865f17587e60635d32422f99 Mon Sep 17 00:00:00 2001 From: lucor Date: Sun, 12 Jan 2025 12:57:44 +0100 Subject: [PATCH 14/17] doc: apply linter suggestions --- README.md | 87 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 17b096b..0bbde70 100644 --- a/README.md +++ b/README.md @@ -8,25 +8,27 @@ the MinGW compiler for Windows, FreeBSD, and a macOS SDK, along with the Fyne requirements. Supported targets are: - - darwin/amd64 - - darwin/arm64 - - freebsd/amd64 - - freebsd/arm64 - - linux/amd64 - - linux/386 - - linux/arm - - linux/arm64 - - windows/amd64 - - windows/arm64 - - windows/386 - - android ([multiple architectures](https://developer.android.com/ndk/guides/abis)) - - android/386 - - android/amd64 - - android/arm - - android/arm64 - - ios - -> Note: + +- darwin/amd64 +- darwin/arm64 +- freebsd/amd64 +- freebsd/arm64 +- linux/amd64 +- linux/386 +- linux/arm +- linux/arm64 +- windows/amd64 +- windows/arm64 +- windows/386 +- android ([multiple architectures](https://developer.android.com/ndk/guides/abis)) +- android/386 +- android/amd64 +- android/arm +- android/arm64 +- ios + +> Note: +> > - iOS compilation is supported only on darwin hosts. See [fyne pre-requisites](https://developer.fyne.io/started/#prerequisites) for details. > - macOS packaging for public distribution (release mode) is supported only on darwin hosts. > - windows packaging for public distribution (release mode) is supported only on windows hosts. @@ -43,17 +45,20 @@ Supported targets are: ### Installation For go >= 1.16: -``` + +```sh go install github.com/fyne-io/fyne-cross@latest ``` To install a fyne-cross with kubernetes engine support: -``` + +```sh go install -tags k8s github.com/fyne-io/fyne-cross@latest ``` For older go: -``` + +```sh GO111MODULE=on go get -u github.com/fyne-io/fyne-cross ``` @@ -66,26 +71,26 @@ If set, fyne-cross will attempt to pull the image required to cross compile the For example: -``` +```sh fyne-cross linux --pull ``` -will pull only the `fyne-cross:base-latest` image required to cross compile for linux target. +will pull only the `fyne-cross:base-latest` image required to cross compile for linux target. ## Usage -``` +```sh fyne-cross [options] The commands are: - darwin Build and package a fyne application for the darwin OS - linux Build and package a fyne application for the linux OS - windows Build and package a fyne application for the windows OS - android Build and package a fyne application for the android OS - ios Build and package a fyne application for the iOS OS - freebsd Build and package a fyne application for the freebsd OS - version Print the fyne-cross version information + darwin Build and package a fyne application for the darwin OS + linux Build and package a fyne application for the linux OS + windows Build and package a fyne application for the windows OS + android Build and package a fyne application for the android OS + ios Build and package a fyne application for the iOS OS + freebsd Build and package a fyne application for the freebsd OS + version Print the fyne-cross version information Use "fyne-cross -help" for more information about a command. ``` @@ -96,13 +101,13 @@ The `arch` flag support wildcards in case want to compile against all supported Example: -``` +```sh fyne-cross windows -arch=* ``` is equivalent to -``` +```sh fyne-cross windows -arch=amd64,386 ``` @@ -117,7 +122,7 @@ cd examples ### Compile and package the main example app -``` +```sh fyne-cross linux ``` @@ -127,21 +132,25 @@ fyne-cross linux ### Compile and package a particular example app -``` +```sh fyne-cross linux -output bugs ./cmd/bugs ``` ## Extract the macOS SDK for OSX/Darwin/Apple cross-compiling -cross-compile from NOT `darwin` (i.e. linux) to `darwin` requires a copy of the macOS SDK on the host. + +cross-compile from NOT `darwin` (i.e. linux) to `darwin` requires a copy of the macOS SDK on the host. The fyne-cross `darwin-sdk-extractor` command can be used to extract the SDK from the XCode CLI Tool file. **[Please ensure you have read and understood the Xcode license terms before continuing.](https://www.apple.com/legal/sla/docs/xcode.pdf)** To extract the SDKs: -1. [Download Command Line Tools for Xcode](https://developer.apple.com/download/all/?q=Command%20Line%20Tools) 12.4 (macOS SDK 11.x) + +1. [Download Command Line Tools for Xcode](https://developer.apple.com/download/all/?q=Command%20Line%20Tools) 12.5.1 (macOS SDK 11.3) 2. Run: `fyne-cross darwin-sdk-extract --xcode-path /path/to/Command_Line_Tools_for_Xcode_12.5.dmg` - * Once extraction has been done, you should have a SDKs directory created. This directory contains at least 2 SDKs (ex. `SDKs/MacOSX12.3.sdk/` and `SDKs/MacOSX13.3.sdk/` in Command_Line_Tools_for_Xcode_14.3.1.dmg) + +- Once extraction has been done, you should have a SDKs directory created. This directory contains at least 2 SDKs (ex. `SDKs/MacOSX12.3.sdk/` and `SDKs/MacOSX13.3.sdk/` in Command_Line_Tools_for_Xcode_14.3.1.dmg) + 3. Specify explicitly which SDK you want to use in your fyne-cross command with --macosx-sdk-path: `fyne-cross darwin --macosx-sdk-path /full/path/to/SDKs/MacOSX12.3.sdk -app-id your.app.id` > Note: current version supports only MacOS SDK 11.3 From 3de5b14845bea330b51bf3cf2460de27e1ea9dc5 Mon Sep 17 00:00:00 2001 From: lucor Date: Sun, 12 Jan 2025 13:08:08 +0100 Subject: [PATCH 15/17] readme: update macos SDK extract section Fixes #282 --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0bbde70..0e1e2e3 100644 --- a/README.md +++ b/README.md @@ -139,19 +139,21 @@ fyne-cross linux -output bugs ./cmd/bugs ## Extract the macOS SDK for OSX/Darwin/Apple cross-compiling cross-compile from NOT `darwin` (i.e. linux) to `darwin` requires a copy of the macOS SDK on the host. + The fyne-cross `darwin-sdk-extractor` command can be used to extract the SDK from the XCode CLI Tool file. -**[Please ensure you have read and understood the Xcode license - terms before continuing.](https://www.apple.com/legal/sla/docs/xcode.pdf)** +**[Please ensure you have read and understood the Xcode license terms before continuing.](https://www.apple.com/legal/sla/docs/xcode.pdf)** To extract the SDKs: 1. [Download Command Line Tools for Xcode](https://developer.apple.com/download/all/?q=Command%20Line%20Tools) 12.5.1 (macOS SDK 11.3) -2. Run: `fyne-cross darwin-sdk-extract --xcode-path /path/to/Command_Line_Tools_for_Xcode_12.5.dmg` +2. Run: `fyne-cross darwin-sdk-extract --xcode-path /path/to/Command_Line_Tools_for_Xcode_12.5.1.dmg` -- Once extraction has been done, you should have a SDKs directory created. This directory contains at least 2 SDKs (ex. `SDKs/MacOSX12.3.sdk/` and `SDKs/MacOSX13.3.sdk/` in Command_Line_Tools_for_Xcode_14.3.1.dmg) +- Once extraction has been done, you should have a SDKs directory created. + This directory should contains at least 2 SDKs (ex. `SDKs/MacOSX11.3.sdk/` and `SDKs/MacOSX10.15.sdk/`) -3. Specify explicitly which SDK you want to use in your fyne-cross command with --macosx-sdk-path: `fyne-cross darwin --macosx-sdk-path /full/path/to/SDKs/MacOSX12.3.sdk -app-id your.app.id` +3. Specify explicitly which SDK you want to use in your fyne-cross command with --macosx-sdk-path: + `fyne-cross darwin --macosx-sdk-path /full/path/to/SDKs/MacOSX11.3.sdk -app-id your.app.id` > Note: current version supports only MacOS SDK 11.3 From 20037944823180d9d1ce719907a2dcbfae39ab47 Mon Sep 17 00:00:00 2001 From: lucor Date: Sun, 12 Jan 2025 13:12:29 +0100 Subject: [PATCH 16/17] readme: update Go requirements --- README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index 0e1e2e3..4d00f5e 100644 --- a/README.md +++ b/README.md @@ -39,13 +39,11 @@ Supported targets are: ## Requirements -- go >= 1.14 +- go >= 1.19 - docker ### Installation -For go >= 1.16: - ```sh go install github.com/fyne-io/fyne-cross@latest ``` @@ -56,12 +54,6 @@ To install a fyne-cross with kubernetes engine support: go install -tags k8s github.com/fyne-io/fyne-cross@latest ``` -For older go: - -```sh -GO111MODULE=on go get -u github.com/fyne-io/fyne-cross -``` - > `fyne-cross` will be installed in GOPATH/bin, unless GOBIN is set. ### Updating docker images From 3381206f356b3485af93f8dbcbd448d1a81e7233 Mon Sep 17 00:00:00 2001 From: lucor Date: Sun, 12 Jan 2025 15:41:31 +0100 Subject: [PATCH 17/17] readme: update changelog for release 2.6.1 --- CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b657a89..b70c896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,26 @@ # Changelog - Fyne.io fyne-cross +## 1.6.1 - 12 Jan 2025 + +### Changed + +- fix: update install suggestion for missing `fyne` command by @nobe4 in +- Performance improvement by avoiding running commands in docker by @williambrode in +- Fixing so we don't seek a missing android image for darwin by @andydotxyz in +- Fix Android release that generates a .aab file by @metal3d in +- readme: update the requirements and the macos SDK extract section by @lucor in +- metadata: update Fyne metadata to v2.5.3 by @lucor in +- web: update destination folder by @lucor in +- Bump k8s.io/api from 0.18.19 to 0.30.2 by @dependabot in +- Bump github.com/klauspost/compress from 1.13.4 to 1.17.9 by @dependabot in +- Bump github.com/urfave/cli/v2 from 2.11.1 to 2.27.2 by @dependabot in + ## 1.6.0 - 31 Dec 2024 ### Changed -- Bump github.com/stretchr/testify from 1.7.0 to 1.9.0 by @dependabot in https://github.com/fyne-io/fyne-cross/pull/233 -- Ldflags where only needed with older version of zig which we have updated since then. by @Bluebugs in https://github.com/fyne-io/fyne-cross/pull/246 + +- Bump github.com/stretchr/testify from 1.7.0 to 1.9.0 by @dependabot in +- Ldflags where only needed with older version of zig which we have updated since then. by @Bluebugs in ## 1.5.0 - 13 Apr 2024 @@ -53,7 +69,7 @@ between docker and podman. The default behavior is not changed, if the flag is not specified fyne-cross will auto detect the engine. -### Fixed +### Fixed - Windows builds no longer pass "-H windowsgui" #97 - Multiple tags cannot be specified using the `-tags` flag #96 @@ -70,8 +86,8 @@ ### Fixed -- Building for windows fails to add icon #66 -- Fixes darwin image creation (SDK extraction) #80 +- Building for windows fails to add icon #66 +- Fixes darwin image creation (SDK extraction) #80 ## 1.1.2 - 05 Oct 2021 @@ -83,7 +99,7 @@ ### Added -- Support specifying target architectures for Android #52 +- Support specifying target architectures for Android #52 ### Changed @@ -122,6 +138,7 @@ - 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 @@ -132,49 +149,59 @@ - Update Go to v1.14.13 ## 0.9.0 - 17 October 2020 -- Releaseing under project namespace with previous 2.2.1 becoming 0.9.0 in fyne-io namespace +- Releaseing under project namespace with previous 2.2.1 becoming 0.9.0 in fyne-io namespace # Archive - lucor/fyne-cross ## [2.2.1] - 2020-09-16 + - Fix iOS fails with "only on darwin" when on mac #78 - Update README installation when module-aware mode is not enabled ## [2.2.0] - 2020-09-01 + - Add `--pull` option to attempt to pull a newer version of the docker image #75 ## [2.1.2] - 2020-08-13 + - Update base image to dockercore/golang-cross@1.13.15 (Go v1.13.15) - fyne cli updated to v1.3.3 ## [2.1.1] - 2020-07-17 + - Update base image to dockercore/golang-cross@1.13.14 (Go v1.13.14) ## [2.1.0] - 2020-07-16 + - Add support for build flags #69 - Base image is based on dockercore/golang-cross@1.13.13 (Go v1.13.13) - fyne cli updated to v1.3.2 ## [2.0.0] - 2020-06-07 + - Base image is based on dockercore/golang-cross@1.13.12 (Go v1.13.12) - fyne cli updated to v1.3.0 ## [2.0.0-beta4] - 2020-05-21 + - Print fyne cli version in debug mode - Update unit tests to work on windows - Fix some minor linter suggestions - Update docker base image to go v1.13.11 ## [2.0.0-beta3] - 2020-05-13 + - Remove package option. Package can be now specified as argument - Fix android build when the package is not into the root dir ## [2.0.0-beta2] - 2020-05-13 + - Fix build for packages not in root dir - Fix ldflags flag not honored #62 ## [2.0.0-beta1] - 2020-05-10 + - Add subcommand support - Add a flag to build as "console binary" for Windows #57 - Add support for custom env variables #59 @@ -182,6 +209,7 @@ - Add support for FreeBSD #23 ## [1.5.0] - 2020-04-13 + - Add android support #37 - Add iOS support on Darwin hosts - Issue cross compiling from Windows 10 #54 @@ -189,32 +217,38 @@ - Update to fyne cli v1.2.4 ## [1.4.0] - 2020-03-04 + - Add ability to package with an icon using fyne/cmd #14 - Update to golang-cross:1.13.8 image (go v1.13.8) #46 - Disable android build. See #34 - Add support for passing appID to dist packaging #45 -- Introduce a root folder and layout for fyne-cross output #38 +- Introduce a root folder and layout for fyne-cross output #38 - Remove OS and Arch info from output #48 - GOCACHE folder is now mounted under $HOME/.cache/fyne-cross/go-build to cache build outputs for reuse in future builds. ## [1.3.2] - 2020-01-08 + - Update to golang-cross:1.12.14 image (go v1.12.14) ## [1.3.1] - 2019-12-26 + - Default binary name should be folder if none is provided [#29](https://github.com/lucor/fyne-cross/issues/29) - Cannot build android app when not using go modules [#30](https://github.com/lucor/fyne-cross/issues/30) ## [1.3.0] - 2019-11-02 + - Add Android support [#10](https://github.com/lucor/fyne-cross/issues/10) - GOOS is not set for go get when project do not use go modules [#22](https://github.com/lucor/fyne-cross/issues/22) - linux/386 does not work with 1.2.x [#24](https://github.com/lucor/fyne-cross/issues/24) ## [1.2.2] - 2019-10-29 + - Add wildcard support for goarch [#15](https://github.com/lucor/fyne-cross/issues/15) - Fix misleading error message when docker daemon is not available [#19](https://github.com/lucor/fyne-cross/issues/19) - Fix build for windows/386 is failing ## [1.2.1] - 2019-10-26 + - Fix fyne-cross docker image build tag ## [1.2.0] - 2019-10-26