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" option result in error during execution #272

Open
chran554 opened this issue Oct 30, 2024 · 0 comments
Open

"release" option result in error during execution #272

chran554 opened this issue Oct 30, 2024 · 0 comments

Comments

@chran554
Copy link

chran554 commented Oct 30, 2024

Describe the bug:

Using the "release" option gives an "flag provided but not defined: -src" error during build (package phase).

To Reproduce:

Cross package a fyne application on darwin (arm64) to either linux (arm64) or darwin (arm64) using "release" option.

Example code:

package main

import (
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/widget"
)

func main() {
	application := app.New()
	window := application.NewWindow("Hello World")
	window.SetContent(widget.NewLabel("Hello World"))
	window.ShowAndRun()
}
.
├── cmd
│   └── fynehelloworld
│       └── main.go
├── go.mod
├── go.sum
└── star-icon.png

OK: fyne-cross darwin -arch=arm64 -name "HW App" -app-id="com.dummy.id" -app-version="1.2.3" -app-build=42 -icon="star-icon.png" cmd/fynehelloworld

Error: fyne-cross darwin -release -arch=arm64 -name "HW App" -app-id="com.dummy.id" -app-version="1.2.3" -app-build=42 -icon="star-icon.png" cmd/fynehelloworld

Error message:

$ fyne-cross darwin -release -arch=arm64 -name "HW App" -app-id="com.dummy.id" -app-version="1.2.3" -app-build=42 -icon="star-icon.png" cmd/fynehelloworld

[i] Target: darwin/arm64
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /app/fyne-cross/bin/darwin-arm64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/darwin-arm64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/darwin-arm64
[i] Checking for go.mod: /Users/<my private path>/fynetest/go.mod
[✓] go.mod found
[i] Packaging app...
Incorrect Usage: flag provided but not defined: -src

NAME:
   fyne release - Prepares an application for public distribution.

USAGE:
   fyne release [command options] [arguments...]

OPTIONS:
   --target value, --os value         The operating system to target (android, android/arm, android/arm64, android/amd64, android/386, darwin, freebsd, ios, linux, netbsd, openbsd, windows)
   --keyStore value                   Android: location of .keystore file containing signing information
   --keyStorePass value               Android: password for the .keystore file, default take the password from stdin
   --keyName value                    Android: alias for the signer's private key, which is needed when reading a .keystore file
   --keyPass value                    Android: password for the signer's private key, which is needed if the private key is password-protected. Default take the password from stdin
   --name value                       The name of the application, default is the executable file name
   --tags value                       A comma-separated list of build tags.
   --appVersion value                 Version number in the form x, x.y or x.y.z semantic version
   --appBuild value                   Build number, should be greater than 0 and incremented for each build (default: 0)
   --appID value, --id value          For Android, darwin, iOS and Windows targets an appID in the form of a reversed domain name is required, for ios this must match a valid provisioning profile
   --certificate value, --cert value  iOS/macOS/Windows: name of the certificate to sign the build
   --profile value                    iOS/macOS: name of the provisioning profile for this release build
   --developer value, --dev value     Windows: the developer identity for your Microsoft store account
   --password value, --passw value    Windows: password for the certificate used to sign the build
   --category value                   macOS: category of the app for store listing
   --icon value                       The name of the application icon file.
   --use-raw-icon                     Skip any OS-specific icon pre-processing (default: false)
   --metadata value                   Specify custom metadata key value pair that you do not want to store in your FyneApp.toml (key=value)
   --help, -h                         show help (default: false)
   
flag provided but not defined: -src
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1

Device and debug info (please complete the following information):

Device info
  • OS: macOS
  • Version: Sonoma 14.6.1 (23G93)
  • Go version: go version go1.23.2 darwin/arm64
  • fyne-cross version: fyne-cross version v1.5.0
  • Fyne version: fyne cli version: v2.5.2
Debug info
$ fyne-cross darwin --debug --no-cache -release -arch=arm64 -name "HW App" -app-id="com.dummy.id" -app-version="1.2.3" -app-build=42 -icon="star-icon.png" cmd/fynehelloworld

[i] Target: darwin/arm64
&command.localContainerImage{baseContainerImage:command.baseContainerImage{arch:"arm64", os:"darwin", id:"darwin-arm64", env:map[string]string{"CC":"zig cc -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks", "CGO_LDFLAGS":"--sysroot /sdk -F/System/Library/Frameworks -L/usr/lib", "CXX":"zig c++ -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks", "GOARCH":"arm64", "GOOS":"darwin"}, tags:[]string(nil), mount:[]command.containerMountPoint{command.containerMountPoint{name:"project", localHost:"/Users/<my private path>/fynetest", inContainer:"/app"}}, DockerImage:"docker.io/fyneio/fyne-cross-images:darwin"}, runner:(*command.localContainerEngine)(0x14000184000)}
[i] Cleaning target directories...
/usr/local/bin/docker run --rm -t -w /app -v /Users/<my private path>/fynetest:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOFLAGS="-ldflags=-s -ldflags=-w" -e CXX=zig c++ -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CGO_LDFLAGS=--sysroot /sdk -F/System/Library/Frameworks -L/usr/lib -e GOOS=darwin -e GOARCH=arm64 -e CC=zig cc -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks docker.io/fyneio/fyne-cross-images:darwin rm -rf /app/fyne-cross/bin/darwin-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/<my private path>/fynetest:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOFLAGS="-ldflags=-s -ldflags=-w" -e GOARCH=arm64 -e CC=zig cc -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CXX=zig c++ -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CGO_LDFLAGS=--sysroot /sdk -F/System/Library/Frameworks -L/usr/lib -e GOOS=darwin docker.io/fyneio/fyne-cross-images:darwin mkdir -p /app/fyne-cross/bin/darwin-arm64
[✓] "bin" dir cleaned: /app/fyne-cross/bin/darwin-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/<my private path>/fynetest:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOFLAGS="-ldflags=-s -ldflags=-w" -e CXX=zig c++ -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CGO_LDFLAGS=--sysroot /sdk -F/System/Library/Frameworks -L/usr/lib -e GOOS=darwin -e GOARCH=arm64 -e CC=zig cc -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks docker.io/fyneio/fyne-cross-images:darwin rm -rf /app/fyne-cross/dist/darwin-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/<my private path>/fynetest:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOFLAGS="-ldflags=-s -ldflags=-w" -e CGO_LDFLAGS=--sysroot /sdk -F/System/Library/Frameworks -L/usr/lib -e GOOS=darwin -e GOARCH=arm64 -e CC=zig cc -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CXX=zig c++ -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks docker.io/fyneio/fyne-cross-images:darwin mkdir -p /app/fyne-cross/dist/darwin-arm64
[✓] "dist" dir cleaned: /app/fyne-cross/dist/darwin-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/<my private path>/fynetest:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOFLAGS="-ldflags=-s -ldflags=-w" -e GOARCH=arm64 -e CC=zig cc -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CXX=zig c++ -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CGO_LDFLAGS=--sysroot /sdk -F/System/Library/Frameworks -L/usr/lib -e GOOS=darwin docker.io/fyneio/fyne-cross-images:darwin rm -rf /app/fyne-cross/tmp/darwin-arm64
/usr/local/bin/docker run --rm -t -w /app -v /Users/<my private path>/fynetest:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOFLAGS="-ldflags=-s -ldflags=-w" -e GOARCH=arm64 -e CC=zig cc -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CXX=zig c++ -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CGO_LDFLAGS=--sysroot /sdk -F/System/Library/Frameworks -L/usr/lib -e GOOS=darwin docker.io/fyneio/fyne-cross-images:darwin mkdir -p /app/fyne-cross/tmp/darwin-arm64
[✓] "temp" dir cleaned: /app/fyne-cross/tmp/darwin-arm64
[i] Checking for go.mod: /Users/<my private path>/fynetest/go.mod
[✓] go.mod found
/usr/local/bin/docker run --rm -t -w /app -v /Users/<my private path>/fynetest:/app --platform linux/arm64 --user 501 -e HOME=/tmp -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOFLAGS="-ldflags=-s -ldflags=-w" -e GOOS=darwin -e GOARCH=arm64 -e CC=zig cc -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CXX=zig c++ -v -target aarch64-macos.11.1 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks -e CGO_LDFLAGS=--sysroot /sdk -F/System/Library/Frameworks -L/usr/lib docker.io/fyneio/fyne-cross-images:darwin cp /app/star-icon.png /app/fyne-cross/tmp/darwin-arm64/Icon.png
[i] Packaging app...
fyne cli version: v2.5.2
/Users/<my private path>/go/bin/fyne release -os darwin -name HW App -icon /Users/<my private path>/fynetest/fyne-cross/tmp/darwin-arm64/Icon.png -appBuild 42 -appVersion 1.2.3 -appID com.dummy.id -src cmd/fynehelloworld
Incorrect Usage: flag provided but not defined: -src

NAME:
   fyne release - Prepares an application for public distribution.

USAGE:
   fyne release [command options] [arguments...]

OPTIONS:
   --target value, --os value         The operating system to target (android, android/arm, android/arm64, android/amd64, android/386, darwin, freebsd, ios, linux, netbsd, openbsd, windows)
   --keyStore value                   Android: location of .keystore file containing signing information
   --keyStorePass value               Android: password for the .keystore file, default take the password from stdin
   --keyName value                    Android: alias for the signer's private key, which is needed when reading a .keystore file
   --keyPass value                    Android: password for the signer's private key, which is needed if the private key is password-protected. Default take the password from stdin
   --name value                       The name of the application, default is the executable file name
   --tags value                       A comma-separated list of build tags.
   --appVersion value                 Version number in the form x, x.y or x.y.z semantic version
   --appBuild value                   Build number, should be greater than 0 and incremented for each build (default: 0)
   --appID value, --id value          For Android, darwin, iOS and Windows targets an appID in the form of a reversed domain name is required, for ios this must match a valid provisioning profile
   --certificate value, --cert value  iOS/macOS/Windows: name of the certificate to sign the build
   --profile value                    iOS/macOS: name of the provisioning profile for this release build
   --developer value, --dev value     Windows: the developer identity for your Microsoft store account
   --password value, --passw value    Windows: password for the certificate used to sign the build
   --category value                   macOS: category of the app for store listing
   --icon value                       The name of the application icon file.
   --use-raw-icon                     Skip any OS-specific icon pre-processing (default: false)
   --metadata value                   Specify custom metadata key value pair that you do not want to store in your FyneApp.toml (key=value)
   --help, -h                         show help (default: false)
   
flag provided but not defined: -src
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant