Repository navigation
build: Windows on ARM64, stage 1 (CI, scripts, ARM64 rhwp and Unhwp) - #822
Merged
Merged
Conversation
- build/build-native.py (was build-linux-native.py) also builds Unhwp's native library from the commit its NuGet package names, and builds rhwp and Unhwp on Windows with the C runtime linked statically. - linux-native builds libunhwp.so for linux-arm64; the arm64 tests and package use it (-p:UnhwpNativeLibrary, build-portable.ps1 -UnhwpOverride). - New workflow windows-arm64-native.yml builds rhwp.exe and unhwp.dll for win-arm64 to host on dl.filee.sh; fetch-engines.ps1 pins them (empty until hosted) plus the official 7-Zip ARM64 build, and fails clearly while unpinned. - UnhwpConverter reports Unhwp as available where its library loads. - build-explorer-menu.ps1 -Architecture arm64; the Explorer menu is offered when Filee runs natively on x64 or ARM64 Windows 11. - build-installer.ps1 and fetch-engines.ps1 take -Runtime (default win-x64). - CI: build (win-arm64) job on windows-11-arm. Refs #236 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #236 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #236 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #236 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #236 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Windows 11 on ARM runs them under emulation; Windows 10 on ARM gets none. The bundled rhwp and 7-Zip stay ARM64 builds of the same versions. Refs #236 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the win-arm64 runner Pandoc is fetched but rhwp isn't (its ARM64 build isn't pinned yet), so Markup → PDF takes Pandoc's route and the asserts for hwpx-writer → rhwp failed. Skip them unless rhwp is available, as DocumentEngineTests does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Built by "Windows ARM64 native" (run 41040250454) from the pinned sources, hosted on dl.filee.sh; both downloads checked against the run's SHA256SUMS.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
The pins are filled in (5660b9a). rhwp 0.8.7 and Unhwp 0.13.0 for Windows ARM64 are hosted on dl.filee.sh, and both downloads match the native run's CI is green on every job:
Merging stage 1. Release, signing and store work stays for stage 2 (#236). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Stage 1 of native Windows on ARM64: Filee builds and tests natively on a
windows-11-armrunner, the build scripts can make a win-arm64 Setup and portable zip, and Unhwp and rhwp get ARM64 builds (Unhwp on Linux ARM64 too, where it was off until now). Release workflow, signing and store manifests are left for stage 2.Refs #236
Unhwp on ARM64
build/build-native.py(renamed frombuild-linux-native.py) gains anunhwpsubcommand:cargo build --release --locked -p unhwp --lib --features ffiat405b17e, the commit the Unhwp 0.13.0 nuspec names. Upstream's bindings workflow uses the same command. It loads the result and checks thatunhwp_version()returns 0.13.0.checknow also fails whenDirectory.Packages.propsmoves to another Unhwp version.linux-nativejob buildslibunhwp.soon Ubuntu 22.04 ARM, next to rhwp. The glibc 2.35 check covers it. The arm64 tests are built with it (-p:UnhwpNativeLibrary=...), and so is the package (build-portable.ps1 -UnhwpOverride).smoke-portable.ps1loadslibunhwp.sofrom every Linux package.Filee.Engines.csproj: whenUnhwpNativeLibraryis set, the library is copied next to the app on build and publish. That is where Unhwp's own resolver looks for it. When the property is unset, which covers every x64 and macOS build, nothing changes.UnhwpConverter.GetStatus()now asks the library for its version through Unhwp's own P/Invoke instead of checking a hard-coded architecture list. It caches the answer. If the library can't be loaded, the engine reportsengine.reason.unsupported_platform. One exception on Windows: ifunhwp.dllis there but won't load (the C++ runtime is missing), the engine stays listed and the conversion still reportserror.runtime_missing, the same as before.rhwp and Unhwp for Windows ARM64: built once, then pinned
.github/workflows/windows-arm64-native.ymlbuildsrhwp.exeandunhwp.dllonwindows-11-armfrom the same pinned commits. It uses+crt-static, so neither file imports a Visual C++ runtime DLL (the script checks the PE import table and the machine type). It uploadsrhwp-v0.8.7-windows-aarch64.zip,unhwp-0.13.0-win-arm64.dllandSHA256SUMS.txt. It runs from the Actions tab, and also on pull requests that change the build script or the workflow, so this PR already has a run.I followed the Magick.Native pattern for Windows instead of building in every CI run as
linux-nativedoes. Reasons:The pins live in
$arm64Pinsinbuild/fetch-engines.ps1. The URLs on dl.filee.sh are filled in;sha256stays empty until the files are hosted. While a pin is empty, a win-arm64 build stops with a message that names the workflow and the URL. Linux ARM64 Unhwp is built in the existing native job, like rhwp, because that job already exists and caches by script hash.Packaging for win-arm64
build/fetch-engines.ps1 -Runtime win-arm64(defaultwin-x64):unhwp\unhwp.dllcome from the ARM64 pins.7z2605-arm64.exe, the same version as x64, pinned by SHA-256. It is a 7z SFX that Windows'tar.execan't unpack correctly (it can't undo the ARM64 branch filter, so the CRC check fails), so the x64 7-Zip from the MSI unpacks it, under emulation on ARM64. Only7z.exe,7z.dll,License.txtandreadme.txtare kept, as on x64.-RuntimeTois refused for win-arm64.-MissingPinslists the win-arm64 pins that aren't filled in yet (CI uses it).build/build-installer.ps1 -Runtime win-arm64:-p:UnhwpNativeLibrary;Filee-<v>-win-arm64-Setup.exe,-win-arm64-Portable.zipand-win-arm64-SHA256SUMS.txt. The x64 names are unchanged.build/build-explorer-menu.ps1 -Architecture x64|arm64: the pinned x64 Zig cross-compilesaarch64-windows-gnu, and the package saysarm64(ExplorerMenuPackage.CreateManifest(architecture)).ExplorerMenuRegistration.IsSupportedOsnow requires Windows 11 on x64 or ARM64 with Filee running natively, so an x64 Filee on ARM64 still gets no menu, as before.CI
New
build (win-arm64)job onwindows-11-arm, using the samechangesfilter asbuild. It does restore, build, Explorer menu (arm64), the UI tests on their own, the other tests, andbuild-installer.ps1 -CheckOnly -Runtime win-arm64, which runs the ARM64 Setup in its sandbox. Until both pins are filled in, it warns and the rhwp and Unhwp tests skip. After that, it also tests with the pinned files and uploadswindows-arm64-package.For the maintainer
windows-arm64-nativeartifact from this PR's "Windows ARM64 native" run (or run the workflow after merging).rhwp-v0.8.7-windows-aarch64.ziptohttps://dl.filee.sh/engines/rhwp/0.8.7/andunhwp-0.13.0-win-arm64.dlltohttps://dl.filee.sh/engines/unhwp/0.13.0/.SHA256SUMS.txtinto$arm64Pinsinbuild/fetch-engines.ps1. CI's win-arm64 job then also tests rhwp and Unhwp and builds the package.Left for stage 2
UpdateServicelooks for-win-Setup.exe, so an ARM64 install would be offered the x64 Setup.EngineDownloadsreadscomponentsonly forwin-x64, so on win-arm64 the app and Setup offer no downloads yet. It needs a decision on whether to offer the x64 engines under emulation (Windows 11 only).Type of change
How was it tested?
dotnet format --verify-no-changesdotnet test: locally on x64, the Unhwp, HWPX writer, document engine and Explorer menu tests, plusbuild-installer.ps1 -CheckOnly. CI runs the rest, including onwindows-11-arm.0xAA64; imports only kernel32, user32, ole32, shell32 and shlwapi) and ran the package test against it; ranfetch-engines.ps1 -Runtime win-arm64 -Only 7zip(ARM647z.exe/7z.dll); checked that-Only rhwp,unhwpandbuild-installer.ps1 -Runtime win-arm64stop with the "not pinned yet" message; checked that-p:UnhwpNativeLibrarylands in the publish folder.Checklist
THIRD-PARTY-NOTICES.md🤖 Generated with Claude Code