feat(updater): add native Windows ARM64 installer

This commit is contained in:
GeekMr committed 2026-09-24 14:11:16 +08:00
1 parent 9dc058d127
commit ba2e7eb756
11 files changed
+106 -18

No files matched your search

+2 -1
View File
@@ -34,7 +34,8 @@ $requiredPatterns = [ordered]@{
'Pebrel display name' = 'AppName=Pebrel'
'compatible installer identity' = 'AppId=\{\{61022144-7D0A-4E54-94F2-C329A8F58656\}'
'Pebrel default asset name' = '#define PackageBrand "Pebrel"'
'explicit package brand' = 'OutputBaseFilename=\{#PackageBrand\}-v\{#AppVersion\}-windows-x64-setup'
'architecture-specific package name' = 'OutputBaseFilename=\{#PackageBrand\}-v\{#AppVersion\}-windows-\{#Architecture\}-setup'
'native ARM64 gate' = '(?s)#if Architecture == "arm64".*ArchitecturesAllowed=arm64'
'localized Chinese context menu label' = 'chinesesimplified\.OpenInPebrel=\S.+'
'localized WSL context menu label' = 'english\.OpenInPebrelWsl=Open in Pebrel'
'localized Chinese WSL context menu label' = 'chinesesimplified\.OpenInPebrelWsl=\S.+'
+6 -1
View File
@@ -74,9 +74,14 @@ class PebrelBrandingTests(unittest.TestCase):
self.assertIn("Stale binary:", source)
installer = self.source("scripts/installer.iss")
self.assertIn('#define PackageBrand "Pebrel"', installer)
self.assertIn("OutputBaseFilename={#PackageBrand}-v{#AppVersion}-windows-x64-setup", installer)
self.assertIn(
"OutputBaseFilename={#PackageBrand}-v{#AppVersion}-windows-{#Architecture}-setup",
installer,
)
builder = self.source("scripts/build-installer.ps1")
self.assertIn("[ValidateSet('x64', 'arm64')]", builder)
self.assertIn('"/DPackageBrand=$PackageBrand"', builder)
self.assertIn('"/DArchitecture=$Architecture"', builder)
def test_update_asset_validation_shares_current_and_legacy_names(self):
check = self.source("nebula_app/src/update_check.rs")
+13 -2
View File
@@ -106,7 +106,8 @@ class StableReleaseTests(unittest.TestCase):
arm = workflow.split("\n windows-arm64:\n", 1)[1].split("\n aggregate:\n", 1)[0]
for required in ("runs-on: windows-11-arm", "host: aarch64-pc-windows-msvc",
"-Architecture arm64", "windows-arm64-report.json",
"scripts/build-windows-product.ps1", "--platform windows-aarch64"):
"scripts/build-windows-product.ps1", "scripts/build-installer.ps1",
"windows-arm64-setup.exe", "--platform windows-aarch64"):
self.assertIn(required, arm)
self.assertNotIn("continue-on-error", arm)
self.assertNotIn("always()", aggregate)
@@ -140,7 +141,8 @@ class StableReleaseTests(unittest.TestCase):
for version in ("1.7.0", "1.7.1", "1.10.0", "2.0.0"):
with self.subTest(version=version):
names = expected_asset_names(version)
self.assertEqual(len(names), 8 if tuple(map(int, version.split('.'))) >= (1, 9, 0) else 7)
parsed = tuple(map(int, version.split('.')))
self.assertEqual(len(names), 9 if parsed > (1, 9, 0) else 8 if parsed >= (1, 9, 0) else 7)
self.assertIn(f"Pebrel-v{version}-windows-x64-setup.exe", names)
self.assertNotIn(f"NebulaTerminal-{version}-windows-x64-setup.exe", names)
@@ -156,6 +158,15 @@ class StableReleaseTests(unittest.TestCase):
with self.assertRaisesRegex(StableReleaseError, "missing: Pebrel-v1.9.0-windows-arm64.zip"):
validate_assets(root, version)
def test_post_190_requires_native_windows_arm64_installer(self) -> None:
self.assertNotIn("Pebrel-v1.9.0-windows-arm64-setup.exe", expected_asset_names("1.9.0"))
for version in ("1.9.1", "1.10.0", "2.0.0"):
with self.subTest(version=version):
self.assertIn(
f"Pebrel-v{version}-windows-arm64-setup.exe",
expected_asset_names(version),
)
def test_17_assets_reject_retired_alias_and_missing_installer(self) -> None:
version = "1.7.0"
with tempfile.TemporaryDirectory() as directory: