Open PhanSon95 opened 1 year ago
Please use the build metadata to determine if it is a development or production release. "Fyne package -release" sets release mode to true.
App.Metadata().Release
Or you can compile in environment assets through FyneApp.toml.
https://developer.fyne.io/api/v2.4/appmetadata.html
Passing parameters as you describe does not work on all platforms so we have the approach above which works everywhere.
For embedding build info, I would recommend to look at the standard library which you have access to with go 1.21.3: https://pkg.go.dev/debug/buildinfo .
Checklist
Describe the bug
Hello guys I build my golang app with env at build time. Everything run ok But when I use
fyne
, I can't build as my previous code This is my golang command build my code. I parse build version and commit hash and time at build timeBut I can' t see any similar command in
fyne
This is myfyne
versionI want to build 2 env staging and production at build time Please help me fix it
How to reproduce
Run command to build go env
Screenshots
No response
Example code
File
build.go
(in package build)file main.go
Fyne version
v2.4.1
Go compiler version
go version go1.21.3 linux/amd64
Operating system and version
Ubuntu20
Additional Information
No response