-
Checklist
Describe the bugHello, Thanks for your great work on the fyne project. Since the sample code on the fyne website (to create one dialog with one button) built into a 30 MB executable I followed the information here: #2393. I tried doing this command as suggested: package build -ldflags "-w -s -H=windowsgui" and it seemed to build, but the executable size didn't change. Is there a way to fix this? I'm using linux. Thanks for any assistance. How to reproduceJust read what I did above, I guess. ScreenshotsNo response Example codepackage build -ldflags "-w -s -H=windowsgui" package main import ( func main() {
} Fyne version2.5.1 Go compiler version1.23.1 Operating system and versionLinux Mint 20.1 Additional InformationSorry, I wasn't sure what you wanted for sample code. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Coming from the fact that you are using Linux, I would guess that the Windows specific linker option PS: Please use Discussions for questions. The issue tracker is for bugs and feature requests. |
Beta Was this translation helpful? Give feedback.
-
FYI using "fyne package -release" will provide an optimised package using the correct flags for the target operating system. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the info, When I tried "fyne package -release" the executable was larger (around 22 MB) than when I tried "fyne package tags -ldflags -w -s" (a little under 15 MB). Removing "H=windowsgui" did the trick, I guess. Thanks again. |
Beta Was this translation helpful? Give feedback.
Coming from the fact that you are using Linux, I would guess that the Windows specific linker option
-H=windowsgui
causes the compiler to abort because it isn't supported on Linux. Are you sure that it actually built a new binary?PS: Please use Discussions for questions. The issue tracker is for bugs and feature requests.