akavel / rsrc

Tool for embedding .ico & manifest resources in Go programs for Windows.
MIT License
1.22k stars 122 forks source link

Manifest does not work #29

Closed vadtam closed 4 years ago

vadtam commented 4 years ago

App dir "my_app/" --- main.go --- myicon.ico --- main.manifest

Manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity type="win32" version="1.0.0.0" processorArchitecture="ia64" name="Company.Department.MyApp"/>
</assembly>

syso I generate the .syso file using the command: rsrc -ico myicon.ico -manifest main.manifest -o main.syso

Build I build the exe using the command: go build

Issue The exe is compiled and works. The exe icon is shown. But when I look at the properties of the executable, it is the default. The name is not set, for example. How to fix this?

go1.14.2.windows-amd64 rsrc - latest version

fcharlie commented 4 years ago

Is it because the processor architecture ia64 is not supported? try to change to the following settings:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity type="win32" version="1.0.0.0" processorArchitecture="*" name="Company.Department.MyApp"/>
</assembly>
vadtam commented 4 years ago

fcharlie commented: Is it because the processor architecture ia64 is not supported? try to change to the following settings..

I have tried. The product name and version are still empty.

akavel commented 4 years ago

I'm afraid I personally probably don't know enough about this to help you. The only things that come to my mind are:

  1. I think (though I may be wrong) that the "version" showed by Windows on an .exe file doesn't actually come from manifest file, but from data stored in binary in a similar way as .ico files are stored - see #10. I unfortunately currently lack capacity to work on rsrc anymore to add this; to verify if this works for you, you could consider trying https://github.com/josephspurrier/goversioninfo
  2. Other than that, I'm confused as to what processor architecture you're using. You mention amd64 version of Go - does it show up as so when you run go env GOARCH? If yes, for .syso files, you should run rsrc with -arch=amd64, which you don't mention - why? If you run without -arch=amd64, then I would expect you to get compilation errors from Go compiler when linking with .syso - but you don't mention errors either, which again confuses me. Finally, AFAIU, ia64 is something very different than amd64, so again I'm super confused why do you seem to be trying to mix both? Do I miss something?
fcharlie commented 4 years ago

You can also use bali

vadtam commented 4 years ago

Other than that, I'm confused as to what processor architecture you're using. You mention amd64 version of Go - does it show up as so when you run go env GOARCH? If yes, for .syso files, you should run rsrc with -arch=amd64, which you don't mention - why? If you run without -arch=amd64, then I would expect you to get compilation errors from Go compiler when linking with .syso - but you don't mention errors either, which again confuses me.

go env GOARCH shows amd64 I ran rsrc without -arch=amd64 and no compilation errors were reported. If I run it with -arch=amd64 option, nothing changes.

Ok, I will use either goversioninfo or bali.