> Is there a way to force the go linker to include the local manifest file? 
A syso file *is* the way. 

> Or somehow inject the manifest into a built exe?
Readup on *mt.exe*, I haven't used it on go programs but it might work.
https://docs.microsoft.com/en-us/cpp/build/how-to-embed-a-manifest-inside-a-c-cpp-application?view=vs-2019

Tho I'm not quite sure what you're trying to do and what the problem is. 
What do you mean by "locally-generated resource.syso" and how is it 
different from a syso file generated by goversioninfo?
Do you have a package that contains a syso manifest file checked into 
version control and you want to override it's contents on your system 
somehow?

On Tuesday, 15 September 2020 at 11:41:45 pm UTC+8 aro...@gmail.com wrote:

> I’m trying to embed windows manifest information into an exe. I’ve 
> generated the resource.syso file using goversioninfo and it works fine when 
> that file is in the target package. But now I want to do something slightly 
> different: I want to use go build module/package/cmd/binary with a 
> locally-generated resource.syso. Is there a way to force the go linker to 
> include the local manifest file? Or somehow inject the manifest into a 
> built exe? Currently I have two workarounds that I’m trying to avoid:
>
>    1. The main package of the target binary is incredibly thin and I 
>    duplicate the main package locally and compile with the generated syso 
> file.
>    2. I can use modcacherw to allow modifications of the imported module 
>    package and modify the source folder of the binary and inject the syso 
> file.
>
> Any way to make go build just link in the file?
>
> - Augusto
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c3add3f9-39f7-4262-88cf-5e8f2025ae8en%40googlegroups.com.

Reply via email to