Switch to go-winres to create Windows resources#43431
Conversation
|
Need more work on windows build side: https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-43431/1/pipeline/282#step-283-log-343 But cross is ok: https://github.com/moby/moby/runs/5704937248?check_suite_focus=true |
df9425c to
d6d7787
Compare
ad0ab2e to
07f92f2
Compare
|
One failure; looks related (but could be due to how the test is run); |
07f92f2 to
273261b
Compare
Yes version string is not propagated the same way in the powershell script. Should be ok now. |
0a5a835 to
b428dcf
Compare
|
@thaJeztah Looks unrelated: https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-43431/18/pipeline/288#step-289-log-1466 |
|
@crazy-max that's a genius way of figuring out the syntax to instruct
It doesn't look like that would help. https://docs.microsoft.com/en-us/windows/win32/wes/writing-an-instrumentation-manifest says
The message compiler it is referring to is |
💯 agreed; if instructions are needed on how to create this, we should add docs for that or a script (if possible). Not too long ago, I had to do a lot of digging to figure out how some fixtures were created (what options to pass), which was a bit of fun (see #42389)) Its ok to be hacky / minimal, as long as it's easy to discover "how to do this". |
|
Switch the implementation to use go-winres which supports event logging manifests. Also added instructions in case we want to regenerate it. PTAL @corhere @thaJeztah Edit: Message table entries can be generated for any windows platform. Tried to run dockerd on a windows 11 arm64 machine as a service: Events are registered: |
corhere
left a comment
There was a problem hiding this comment.
The broad strokes look good to me. There is one issue with the PowerShell script which would cause problems on Windows PowerShell v5.1. And I have some suggestions for your consideration.
| # Compile the messages | ||
| windmc hack\make\.resources-windows\event_messages.mc -h autogen\winresources\tmp -r autogen\winresources\tmp | ||
| if ($LASTEXITCODE -ne 0) { Throw "Failed to compile event message resources" } | ||
| $mkwinresContents = '{ |
There was a problem hiding this comment.
Nit: PowerShell has hash tables and JSON serialization built in so you don't need to build JSON by interpolating strings.
$mkwinresContents = @{
"RT_GROUP_ICON" = @{
"#1" = @{
"0409": "../../winresources/docker.ico"
}
}
# etc...
} | ConvertTo-Json1b986b3 to
9ad94ee
Compare
|
Issue on Jenkins looks unrelated: https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-43431/40/pipeline/279#step-280-log-1466 |
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
9ad94ee to
4039850
Compare
|
Kicked CI earlier, and all green, except for one flaky test on Windows; Let's get this one in |


follow-up docker/cli#3310 and #42872
- What I did
Replace windres with native Go implementation to be able to create a syso file which contains Microsoft Windows Version Information, an icon and the Windows Event Logging Manifest using go-winres.
- How I did it
Remove windres references and replace with go-winres. Also use
go:generatefor better integration and add legal copyright field.Also add cross target to the GHA ci workflow.
- How to verify it
docker buildx bake --set *.args.DOCKER_CROSSPLATFORMS=windows/amd64 cross