Skip to content

An open-source cross-platform alternative to AirDrop

ci: arm64 handling for windows zip

Tien Do Nam4eb367b1d995
diff --git a/.github/workflows/build_zip_arm64_test.yml b/.github/workflows/build_zip_arm64_test.yml
index 2d85b799..c615c445 100644
--- a/.github/workflows/build_zip_arm64_test.yml
+++ b/.github/workflows/build_zip_arm64_test.yml
@@ -55,9 +55,16 @@ jobs:
exit 1
}
- # Required by the CMake install step (app/windows/CMakeLists.txt installs localsend_msix_helper.msix)
+ # Required by the CMake install step (app/windows/CMakeLists.txt installs localsend_msix_helper.msix).
+ # The checked-in manifest declares x64; patch it so the package identity matches the arm64 executable.
- name: Build MSIX helper
run: |
+ $manifest = 'support\build\msix\content\AppxManifest.xml'
+ (Get-Content $manifest) -replace 'ProcessorArchitecture="x64"', 'ProcessorArchitecture="arm64"' | Set-Content $manifest
+ if (-not (Select-String -Path $manifest -Pattern 'ProcessorArchitecture="arm64"' -Quiet)) {
+ Write-Error "Failed to patch ProcessorArchitecture in $manifest"
+ exit 1
+ }
$makepri = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\makepri.exe' | Select-Object -Last 1
& $makepri.FullName new /pr support\build\msix\content /cf support\build\msix\priconfig.xml /mn support\build\msix\content\AppxManifest.xml /of support\build\msix\content\resources.pri /o
& 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\makeappx.exe' pack /o /d support\build\msix\content /nv /p app\windows\localsend_msix_helper.msix
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 176a24ec..657b8cd8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -482,9 +482,16 @@ jobs:
exit 1
}
- # Required by the CMake install step (app/windows/CMakeLists.txt installs localsend_msix_helper.msix)
+ # Required by the CMake install step (app/windows/CMakeLists.txt installs localsend_msix_helper.msix).
+ # The checked-in manifest declares x64; patch it so the package identity matches the arm64 executable.
- name: Build MSIX helper
run: |
+ $manifest = 'support\build\msix\content\AppxManifest.xml'
+ (Get-Content $manifest) -replace 'ProcessorArchitecture="x64"', 'ProcessorArchitecture="arm64"' | Set-Content $manifest
+ if (-not (Select-String -Path $manifest -Pattern 'ProcessorArchitecture="arm64"' -Quiet)) {
+ Write-Error "Failed to patch ProcessorArchitecture in $manifest"
+ exit 1
+ }
$makepri = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\makepri.exe' | Select-Object -Last 1
& $makepri.FullName new /pr support\build\msix\content /cf support\build\msix\priconfig.xml /mn support\build\msix\content\AppxManifest.xml /of support\build\msix\content\resources.pri /o
& 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\makeappx.exe' pack /o /d support\build\msix\content /nv /p app\windows\localsend_msix_helper.msix