cmd: fix winresources and move them out cli package#50269
cmd: fix winresources and move them out cli package#50269thaJeztah merged 3 commits intomoby:masterfrom
Conversation
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
a721b0e to
b01698b
Compare
| # Verify that the built binary contains windows resources | ||
| if [ "$(go env GOOS)" = "windows" ]; then | ||
| if command -v wrestool > /dev/null 2>&1; then | ||
| if ! wrestool -l "$DEST/$BINARY_FULLNAME" | grep -q -- '--type='; then | ||
| echo "No resources found in $DEST/$BINARY_FULLNAME" | ||
| exit 1 | ||
| fi | ||
| else | ||
| echo "WARNING: wrestool not found, skipping resources check" | ||
| fi | ||
| fi |
There was a problem hiding this comment.
We should do the same in make.ps1 as follow-up.
dmcgowan
left a comment
There was a problem hiding this comment.
Thanks for the quick fix. Would it be easy in the future to ensure that CI checks this?
This is done with |
|
Thanks! I added fixes/closes links to my old PR and the related ticket ❤️ |
thaJeztah
left a comment
There was a problem hiding this comment.
overall LGTM - left a question about the # syntax used 😅
| /* Do not edit this file manually. | ||
| This file is autogenerated by windmc. */ |
There was a problem hiding this comment.
I guess this comment is out of our control; would be nice if it could match the Go standardised "generated" format 😓
// Code generated by XYZ. DO NOT EDIT.
There was a problem hiding this comment.
Yes this is generated by windmc
| $mkwinresContents = '{ | ||
| "RT_GROUP_ICON": { | ||
| "#1": { |
There was a problem hiding this comment.
Still curious (not for this PR) if we could change all of this to be a go generate ./... without special scripts (at least, I could see that writing a JSON should be possible); devils is probably in the details (version strings?)
There was a problem hiding this comment.
I think that would work yes, can take a look as follow-up.
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
- What I did
Fixes regression from #50010 where win resources are not included in the binary anymore:
Previously:
This also:
./cmd/dockerdas winresources are not uses anymore bydocker-proxy. Effectively removingclipackage.windmc- How to verify it