Skip to content

Use VS SDK to create syso file from Manifest#2694

Open
helsaawy wants to merge 2 commits intomicrosoft:mainfrom
helsaawy:switch-manifest-syso
Open

Use VS SDK to create syso file from Manifest#2694
helsaawy wants to merge 2 commits intomicrosoft:mainfrom
helsaawy:switch-manifest-syso

Conversation

@helsaawy
Copy link
Copy Markdown
Contributor

Switch from using github.com/josephspurrier/goversioninfo/cmd/goversioninfo and checked in *.syso binary files to using mt.exe to embed manifest files into the final binary.

Generate resource COFF Object file from syso file.

@helsaawy helsaawy force-pushed the switch-manifest-syso branch from e225139 to 1d689e0 Compare April 20, 2026 17:29
Comment thread cmd/runhcs/runhcs.exe.manifest Outdated
@helsaawy helsaawy force-pushed the switch-manifest-syso branch from 1d689e0 to bcf7763 Compare April 20, 2026 17:52
Switch from using `github.com/josephspurrier/goversioninfo/cmd/goversioninfo`
and checked in `*.syso` binary files to using Windows SDK to generate resource
object files with embedded manifest directly.

Auto-generate manifest XML using common template instead of having
redundant files throughout repo.

Add *.syso to `.gitignore` to keep binaries from being tracked or checked in.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
@helsaawy helsaawy force-pushed the switch-manifest-syso branch 2 times, most recently from 1f416c2 to 5532a26 Compare April 21, 2026 20:05
Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
@helsaawy helsaawy force-pushed the switch-manifest-syso branch from 5532a26 to f5eeb17 Compare April 21, 2026 20:17
@helsaawy helsaawy marked this pull request as ready for review April 21, 2026 20:18
@helsaawy helsaawy requested a review from a team as a code owner April 21, 2026 20:18
# Processors architecture to target.
# Use all to generate for all supported architectures.
[ValidateSet('amd64', 'arm64', 'all')]
$Architecture = 'all',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the build env arch specific though? Why all?

<asmv3:application>
<!-- https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation -->
<asmv3:windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<ws2:longPathAware>true</ws2:longPathAware>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

package manifest

//go:generate go tool github.com/josephspurrier/goversioninfo/cmd/goversioninfo -platform-specific
//go:generate pwsh -Command "../../../scripts/New-ResourceObjectFile.ps1 -ErrorAction 'Stop' -Destination '.' -Name 'hcsshim-test' -UseVersionFile -Architecture 'all'"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont what this is? Why is there a pkg/manifest? What does it do?

Comment thread .gitignore
*.dylib

# generated
*.syso
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also manifest.xml?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants