Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.2.4 #3365

Merged
merged 3 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
This file lists the main changes with each version of the Fyne toolkit.
More detailed release notes can be found on the [releases page](https://github.com/fyne-io/fyne/releases).

## 2.2.4 - Ongoing
## 2.2.4 - 1 November 2022

### Fixes

* Iphone incorrect click coordinates in zoomed screen view (#3122)
* CachedFontFace seems to be causing crash (#3134)
* Fix possible compile error if "fyne build" is used without icon metadata
* Detect and use recent Android NDK toolchain
* Handle fyne package -release and fyne release properly for Android and iOS


## 2.2.3 - 8 July 2022
Expand Down
4 changes: 2 additions & 2 deletions cmd/fyne/internal/commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ func (b *Builder) build() error {

if goos == "windows" {
if b.release {
args = append(args, "-ldflags", "-s -w -H=windowsgui ")
args = append(args, "-ldflags", "-s -w -H=windowsgui", "-trimpath")
} else {
args = append(args, "-ldflags", "-H=windowsgui ")
}
} else if b.release {
args = append(args, "-ldflags", "-s -w ")
args = append(args, "-ldflags", "-s -w", "-trimpath")
}
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/fyne/internal/commands/package-mobile.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
)

func (p *Packager) packageAndroid(arch string) error {
return mobile.RunNewBuild(arch, p.AppID, p.icon, p.Name, p.AppVersion, p.AppBuild, p.release, "", "")
return mobile.RunNewBuild(arch, p.AppID, p.icon, p.Name, p.AppVersion, p.AppBuild, p.release, p.distribution, "", "")
}

func (p *Packager) packageIOS(target string) error {
err := mobile.RunNewBuild(target, p.AppID, p.icon, p.Name, p.AppVersion, p.AppBuild, p.release, p.certificate, p.profile)
err := mobile.RunNewBuild(target, p.AppID, p.icon, p.Name, p.AppVersion, p.AppBuild, p.release, p.distribution, p.certificate, p.profile)
if err != nil {
return err
}
Expand Down
10 changes: 5 additions & 5 deletions cmd/fyne/internal/commands/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ func Package() *cli.Command {
// Packager wraps executables into full GUI app packages.
type Packager struct {
*appData
srcDir, dir, exe, os string
install, release bool
certificate, profile string // optional flags for releasing
tags, category string
tempDir string
srcDir, dir, exe, os string
install, release, distribution bool
certificate, profile string // optional flags for releasing
tags, category string
tempDir string
}

// AddFlags adds the flags for interacting with the package command.
Expand Down
7 changes: 5 additions & 2 deletions cmd/fyne/internal/commands/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ func (r *Releaser) Run(params []string) {
fmt.Fprintf(os.Stderr, "%s\n", err.Error())
return
}

r.Packager.distribution = true
r.Packager.release = true

if err := r.beforePackage(); err != nil {
Expand All @@ -192,13 +194,14 @@ func (r *Releaser) releaseAction(_ *cli.Context) error {
return err
}

r.Packager.distribution = true
r.Packager.release = true

if err := r.beforePackage(); err != nil {
return err
}

err := r.Packager.packageWithoutValidate()
if err != nil {
if err := r.Packager.packageWithoutValidate(); err != nil {
return err
}

Expand Down
8 changes: 6 additions & 2 deletions cmd/fyne/internal/mobile/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,14 @@ var (
)

// RunNewBuild executes a new mobile build for the specified configuration
func RunNewBuild(target, appID, icon, name, version string, build int, release bool, cert, profile string) error {
func RunNewBuild(target, appID, icon, name, version string, build int, release, distribution bool, cert, profile string) error {
buildTarget = target
buildBundleID = appID
buildRelease = release
buildRelease = distribution
if release {
buildLdflags = "-w"
buildTrimpath = true
}

cmd := cmdBuild
cmd.Flag = flag.FlagSet{}
Expand Down
31 changes: 19 additions & 12 deletions cmd/fyne/internal/mobile/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,24 +357,31 @@ type ndkToolchain struct {
clangPrefix string
}

func (tc *ndkToolchain) ClangPrefix() string {
if buildAndroidAPI < tc.minAPI {
func (tc *ndkToolchain) ClangPrefix(api int) string {
if api < tc.minAPI {
return fmt.Sprintf("%s%d", tc.clangPrefix, tc.minAPI)
}
return fmt.Sprintf("%s%d", tc.clangPrefix, buildAndroidAPI)
return fmt.Sprintf("%s%d", tc.clangPrefix, api)
}

func (tc *ndkToolchain) Path(ndkRoot, toolName string) string {
var pref string
switch toolName {
case "clang", "clang++":
pref = tc.ClangPrefix()
case "nm":
pref = "llvm"
default:
pref = tc.toolPrefix
for api := buildAndroidAPI; api < 99; api++ {
var pref string
switch toolName {
case "clang", "clang++":
pref = tc.ClangPrefix(api)
case "nm":
pref = "llvm"
default:
pref = tc.toolPrefix
}

toolPath := filepath.Join(ndkRoot, "toolchains", "llvm", "prebuilt", archNDK(), "bin", pref+"-"+toolName)
if util.Exists(toolPath) {
return toolPath
}
}
return filepath.Join(ndkRoot, "toolchains", "llvm", "prebuilt", archNDK(), "bin", pref+"-"+toolName)
return ""
}

type ndkConfig map[string]ndkToolchain // map: GOOS->androidConfig.
Expand Down