Comments (11)
Hello.
rsrc has at least one bug : it doesn't align resources, while this seems mandatory (most tools can't read them properly otherwise)
windres aligns them on 8 bytes.
Edit : Tried a quick and dirty fix on pitw's test repo. It worked.
go get github.com/tc-hib/goversioninfo/cmd/goversioninfo
go generate
go build
⇨ No error.
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo
go generate
go build
⇨ .rsrc merge failure: corrupt .rsrc section
from goversioninfo.
@ldstein and others: if you are still using my fork please use the original one again as the bug has been properly fixed by akavel.
I've developed my own tool too: https://github.com/tc-hib/go-winres
And I'd like to delete my forks of rsrc and goversioninfo as my quick fix was bad.
from goversioninfo.
I'm sorry, looks like I talked a bit too early. Current version of rsrc still seems to require a bug fix.
from goversioninfo.
Did you end up fixing this at all?
from goversioninfo.
I don't have a Windows machine handy unfortunately - can you post the files so we can reproduce?
from goversioninfo.
Is there any way you can post the minimal fully executable code for me to test with?
from goversioninfo.
I have a similar problem. Created a test repo here:
https://github.com/pitw/test-goversioninfo
from goversioninfo.
While I don't use goversioninfo, I did experience the same issue when generating syso files using rsrc on Windows 10.
.syso files generated with rcrc -arch amd64 -manifest main.manifest -ico main.ico -o main.rsrc
leads to a failure: corrupt .rsrc section
error during "go build".
However, .syso files generated with rcrc -arch amd64 -manifest main.manifest -o main.rsrc
work fine.
I finally managed to resolve the issue by downgrading from TDM-GCC 9.2.0 to TDM-GCC 5.1.0-2.
Kudos to @rodolfoag whose answer I found here.
@pitw Can confirm your test project compiles successfully using TDM-GCC 5.1.0-2.
from goversioninfo.
Nice, replaced github.com/akavel/rsrc
with github.com/tc-hib/rsrc
in my project. Now building successfully with TDM-GCC 9.2.0.
Thanks for the heads up @tc-hib
from goversioninfo.
When having C code to compile (such as github.com/mattn/go-sqlite3
) + resource.syso
exists, this error may occur
from goversioninfo.
Just updated github.com/akavel/rsrc to v0.10.2. but as @tc-hib said, looks like there is still a bug.
from goversioninfo.
Related Issues (20)
- How to request admin rights? HOT 5
- undefined: pe.IMAGE_FILE_MACHINE_ARMNT HOT 4
- 32 bit build request HOT 1
- "goversioninfo": executable file not found in $PATH HOT 5
- Program terminates without errors when using the resource.syso
- Is it possible to speed up the runtime of goversioninfo? HOT 2
- JSON observations HOT 1
- Add Support for ARM builds HOT 3
- make versioninfo.json optional HOT 3
- Cannot specify new icon HOT 5
- dependencies not found (anymore) HOT 2
- Is there any similar library in linux HOT 2
- update go 1.18 - no goversion found HOT 9
- Windows arm64 support HOT 1
- Setting the IDI_APPLICATION icon? HOT 1
- set -file-version from shell
- file-version argument do nothing if other fields has null values? HOT 4
- Unable to set the copyrights symbol "©"
- How to use with Golang 1.22 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goversioninfo.