fyne-cross icon indicating copy to clipboard operation
fyne-cross copied to clipboard

Missing application icon when using -release in windows

Open foxwhite25 opened this issue 2 years ago • 5 comments

Describe the bug:

When I build with fyne-cross windows -release --no-cache everything is fine and it compile sucessfully, but if I add the -release flag error message Missing application icon at "C:\Users\DELL\GolandProjects\PotionCraftSaveEditor\fyne-cross\tmp/windows-amd64/Icon.png" appears and cross stopped.

On that tmp directory, only a file named PotionCraftSaveEditor.exe.ico exist.

To Reproduce:

Build with fyne-cross windows -release --no-cache

Example code:

https://github.com/foxwhite25/PCSE

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

Device info
  • OS: Windows 10
  • Go version: 1.18
  • fyne-cross version: 1.3
  • Fyne version: 2.2.3
Debug info
PS C:\Users\DELL\GolandProjects\PotionCraftSaveEditor> ./fyne-cross.exe windows -release -arch amd64,386 --no-cache --debug
[i] Target: windows/amd64
command.Context{Volume:volume.Volume{binDirHost:"C:\\Users\\DELL\\GolandProjects\\PotionCraftSaveEditor\\fyne-cross\\bin", cacheDirHost:"C:\\Users\\DELL\\AppData\\Local\\fyne-cross", distDirHost:"C:\\Users\\DELL\\GolandProjects\\PotionCraftSaveEditor\\fyne-cross\\dist", tmpDirHost:"C:\\Users\\DELL\\GolandProjects\\PotionCraftSaveEditor\\fyne-cross\\tmp", workDirHost:"C:\\Users\\DELL\\GolandProjects\\PotionCraftSaveEditor"}, Architecture:"amd64", Engine:command.Engine{Name:"docker", Binary:"C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker.exe"}, Env:map[string]string{"CC":"x86_64-w64-mingw32-gcc", "GOARCH":"amd64", "GOOS":"windows"}, ID:"windows-amd64", LdFlags:[]string{"-H=windowsgui"}, OS:"windows", Tags:[]string(nil), AppBuild:"1", AppID:"", AppVersion:"1.0", CacheEnabled:false, DockerImage:"docker.io/fyneio/fyne-cross:1.3-windows", Icon:"Icon.png", Name:"PotionCraftSaveEditor.exe", Package:".", Release:true, StripDebug:true, Debug:true, Pull:false, Category:"", Certificate:"", Developer:"", Keystore:"", KeystorePass:"", KeyPass:"", Password:"", Profile:""}
[i] Cleaning target directories...
[✓] "bin" dir cleaned: C:\Users\DELL\GolandProjects\PotionCraftSaveEditor\fyne-cross\bin\windows-amd64
[✓] "dist" dir cleaned: C:\Users\DELL\GolandProjects\PotionCraftSaveEditor\fyne-cross\dist\windows-amd64
[✓] "temp" dir cleaned: C:\Users\DELL\GolandProjects\PotionCraftSaveEditor\fyne-cross\tmp\windows-amd64
[i] Checking for go.mod: C:\Users\DELL\GolandProjects\PotionCraftSaveEditor\go.mod
[✓] go.mod found
fyne cli version: v2.2.3
C:\Users\DELL\go\bin\fyne.exe release -os windows -name PotionCraftSaveEditor.exe -icon C:\Users\DELL\GolandProjects\PotionCraftSaveEditor\fyne-cross\tmp/windows-amd64/Icon.png -appBuild 1 -appVersion 1.0
Missing application icon at "C:\Users\DELL\GolandProjects\PotionCraftSaveEditor\fyne-cross\tmp/windows-amd64/Icon.png"
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1

foxwhite25 avatar Aug 12 '22 10:08 foxwhite25

Well that commit fixed the problem, but the release flag seems to require certificate, password and developer flag, I don't know what any of those means so I am just gonna remove the -release flag.

foxwhite25 avatar Aug 12 '22 11:08 foxwhite25

The -release flag sets up the package for distribution. for Windows this is a .appx file ready for the store. If you don't know what a certificate are then I guess that isn't what you were looking for?

@lucor perhaps we should investigate something between "development" and "release" which is "not-developer-but-not-going-to-store". I would like to see this as well, for packaging non-debug builds for internal distribution.

andydotxyz avatar Aug 12 '22 13:08 andydotxyz

I thought it is something like rust optimized build or something like that, turns out I am wrong.

Andy Williams @.***> 於 2022年8月12日 週五 晚上9:32寫道:

The -release flag sets up the package for distribution. for Windows this is a .appx file ready for the store. If you don't know what a certificate are then I guess that isn't what you were looking for?

@lucor https://github.com/lucor perhaps we should investigate something between "development" and "release" which is "not-developer-but-not-going-to-store". I would like to see this as well, for packaging non-debug builds for internal distribution.

— Reply to this email directly, view it on GitHub https://github.com/fyne-io/fyne-cross/issues/126#issuecomment-1213113774, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQAHPKJQKZ6YUPF6OCIM5LVYZG6RANCNFSM56LI4DUQ . You are receiving this because you authored the thread.Message ID: @.***>

foxwhite25 avatar Aug 12 '22 16:08 foxwhite25

I thought it is something like rust optimized build or something like that, turns out I am wrong.

Well, the fyne command does work like that (with "fyne package -release") but fyne-cross does not (it runs "fyne release" internally). So you were half right - and we need to improve our naming.

andydotxyz avatar Aug 15 '22 08:08 andydotxyz

fyne-cross does have the -no-strip-debug flag to not strip binary of their debug information. Basically what fyne package -release would do. So by default fyne-cross is building without debug information, except on ios, android and windows. This is corrected by #127 .

Bluebugs avatar Aug 23 '22 21:08 Bluebugs

I think this is resolved now

andydotxyz avatar Nov 21 '22 23:11 andydotxyz