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

Windows missing version metadata when packaged #3046

Closed
bon-ami opened this issue Jun 7, 2022 · 4 comments
Closed

Windows missing version metadata when packaged #3046

bon-ami opened this issue Jun 7, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@bon-ami
Copy link

bon-ami commented Jun 7, 2022

Description

Packaged Windows binaries are missing version information when viewing the details inside Explorer.
A95713CD-E96F-4D0E-8CC3-8ACC38F8FDA5

Reproduction

  1. Package the Windows binary using fyne package.
  2. Right-click on the binary and open up the properties viewer.
  3. Navigate to the “Details” tab.
  4. Notice that the version information is missing.

Device (please complete the following information):

  • OS: Windows
  • Version: 10
  • Go version: 1.18
  • Fyne version: 2.1.4

Old description

Describe the bug:

on Windows using MSYS2.
According to #2813, "fyne package" is better than "go build". The latter does not show icon for exe. But the former does not show for fprint(). No version info can be shown for details of the exe (in explorer). So actually, one issue is print and the other is version info. The version problem is probably rooted in Go and all I know is to use "-ldflags -X main.Ver=..." to pass it to the code and cannot show it in Explorer. However fyne package can make it show as 0.0.0. This is puzzling me.
Thank you.
I have FyneApp.toml for Website,Icon, Name, ID.

To Reproduce:

Steps to reproduce the behaviour:

  1. fyne package --os windows --appVersion 5.0.0 --appBuild 1 --tags main.Ver=5.0.0,Bld=1
  2. run the exe in MINGW command window. it can print into terminal.
  3. run the exe in Windows command line. it cannot print into terminal.
  4. check detail of exe in Explorer. the file version of it shows 0.0.0.0
  5. in my code (package main), Ver & Bld are both "". How to pass a variable?
@bon-ami bon-ami added the unverified A bug that has been reported but not verified label Jun 7, 2022
@andydotxyz
Copy link
Member

The version info should appear - this seems like a bug thanks.

The trouble with printing is down to how your OS will launch graphical apps. macOS has the same issue. You see the console when developing but launching a complete graphical app will go to your system console not the terminal you started from.

in my code (package main), Ver & Bld are both "". How to pass a variable?

The usage of tags are not the same as ldflags. Go build tags just control which files will be included, they do not set variables.

@andydotxyz andydotxyz changed the title exe generated by fyne package does not print in command line Windows missing version metadata when packaged Jun 7, 2022
@andydotxyz andydotxyz added this to the Fixes (v2.2.x) milestone Jun 7, 2022
@Jacalz
Copy link
Member

Jacalz commented Jun 7, 2022

@bon-ami Can you please stick to one topic per issue in the future? Multiple things going on in one issue makes it a lot harder to read.

I added some more information to the description, which I think should make it a bit easier to track the issue that we need to fix here. Thanks for opening this issue.

@andydotxyz andydotxyz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Jun 7, 2022
@Bluebugs
Copy link
Contributor

I think the fix to this bug is that we currently do not set the version information during fyne build in a way that please the Windows explorer expectation. I tried to do a bit of research on the topic, but kind of failed as the only I could find was rcedit related command. Is there any documentation anywhere pointing toward main.Ver and Bld behing understood by Windows somehow?

andydotxyz added a commit that referenced this issue Jun 20, 2022
andydotxyz added a commit that referenced this issue Jun 20, 2022
@andydotxyz
Copy link
Member

Fixed on develop and will release in v2.2.2 as well

andydotxyz added a commit to andydotxyz/fyne that referenced this issue Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants