mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-10-03 00:01:55 +00:00
feat(release): ship a native Windows ARM64 build (#1043)
Release and nightly now build the desktop app for aarch64-pc-windows-msvc alongside x64, publishing tty7-<version>-windows-arm64-setup.exe and tty7-<version>-windows-arm64.zip. - Cross-compiled on the x64 Windows runner, like server-windows' ARM64 leg, and marked experimental until it has shipped once: a failure drops the ARM64 packages instead of holding up the release. - Vendors Microsoft's arm64 ConPTY pair from the same package version as the x64 one, so ARM64 panes keep the OSC 11 fix (#345). - Each Windows package bundles the WSL server for its own architecture. - The installer's architecture comes in as a define: x64compatible for the x64 build (still installable on ARM64 under emulation), arm64 for the native one. One AppId, so either upgrades the other. - The in-app updater on an ARM64 build asks for the arm64 packages; an x64 build under emulation keeps taking x64 ones. Claude-Session: https://claude.ai/code/session_011mDkkQhwx4RJJBHee3yVpq
This commit is contained in:
@@ -50,7 +50,7 @@ Copy-Item README.md "$Stage/README.md"
|
||||
# swallows a pane's OSC 11 background query (#345); this pair forwards it. The
|
||||
# two files are one unit, so a missing half is an error rather than a warning.
|
||||
# See assets/windows/conpty/README.md.
|
||||
$ConptyArch = @{ 'x86_64-pc-windows-msvc' = 'x64' }[$Target]
|
||||
$ConptyArch = @{ 'x86_64-pc-windows-msvc' = 'x64'; 'aarch64-pc-windows-msvc' = 'arm64' }[$Target]
|
||||
if (-not $ConptyArch) { throw "no vendored ConPTY for $Target - see assets/windows/conpty/README.md" }
|
||||
foreach ($File in 'conpty.dll', 'OpenConsole.exe') {
|
||||
$Source = "assets/windows/conpty/$ConptyArch/$File"
|
||||
@@ -68,9 +68,14 @@ Copy-Item "assets/windows/conpty/LICENSE.txt" "$Stage/LICENSE-ConPTY.txt"
|
||||
# naming the directories it searched.
|
||||
#
|
||||
# The *filename* is a contract too, not just the directory: `wsl.rs` looks for
|
||||
# `<dir>/<asset name>`, so this string has to stay whatever
|
||||
# `install::asset::ASSET_X86_64` says it is.
|
||||
$ServerAsset = "tty7-server-linux-x86_64-musl"
|
||||
# `<dir>/<asset name>`, so these strings have to stay whatever
|
||||
# `install::asset::ASSET_X86_64` / `ASSET_AARCH64` say they are. A WSL distro
|
||||
# runs the host's architecture, so each package carries the one that matches it.
|
||||
$ServerAsset = @{
|
||||
'x86_64-pc-windows-msvc' = 'tty7-server-linux-x86_64-musl'
|
||||
'aarch64-pc-windows-msvc' = 'tty7-server-linux-aarch64-musl'
|
||||
}[$Target]
|
||||
if (-not $ServerAsset) { throw "no bundled WSL server asset known for $Target" }
|
||||
$ServerSrc = "bundled-server/$ServerAsset"
|
||||
if (Test-Path $ServerSrc) {
|
||||
New-Item -ItemType Directory -Force -Path "$Stage/server" | Out-Null
|
||||
@@ -94,6 +99,15 @@ if ($PackageUpdater) {
|
||||
Set-Content -Path "$Stage/.tty7-inno-install" -Value 'inno-v1' -NoNewline -Encoding ascii
|
||||
}
|
||||
|
||||
# Inno's architecture identifier for this payload. `x64compatible` also admits
|
||||
# ARM64 Windows, which runs the x64 build under emulation — so an ARM64 machine
|
||||
# can take either installer, and both upgrade the same install (one AppId).
|
||||
$InstallArch = @{
|
||||
'x86_64-pc-windows-msvc' = 'x64compatible'
|
||||
'aarch64-pc-windows-msvc' = 'arm64'
|
||||
}[$Target]
|
||||
if (-not $InstallArch) { throw "no Inno architecture known for $Target" }
|
||||
|
||||
# Installer, built from the same staged payload. ISCC is on PATH on GitHub's
|
||||
# windows-latest image; fall back to the default install location.
|
||||
$Iscc = (Get-Command ISCC.exe -ErrorAction SilentlyContinue).Source
|
||||
@@ -104,6 +118,7 @@ if (-not $Iscc) { $Iscc = "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" }
|
||||
"/DStageDir=$((Resolve-Path $Stage).Path)" `
|
||||
"/DOutputDir=$((Resolve-Path dist).Path)" `
|
||||
"/DOutputName=$Name-setup" `
|
||||
"/DArchitectures=$InstallArch" `
|
||||
.github/scripts/windows-installer.iss
|
||||
if ($LASTEXITCODE -ne 0) { throw "ISCC exited with $LASTEXITCODE" }
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
; /DStageDir=<abs path> staged payload (app, CLI, updater, marker, resources)
|
||||
; /DOutputDir=<abs path> where the setup exe is written
|
||||
; /DOutputName=<basename> setup exe filename, without ".exe"
|
||||
; /DArchitectures=<id> Inno architecture: x64compatible or arm64
|
||||
;
|
||||
; Defaults to a per-user install ({localappdata}\Programs\tty7 — no UAC
|
||||
; prompt), with an "install for all users" escape hatch in the dialog. The
|
||||
@@ -19,6 +20,9 @@
|
||||
#ifndef VersionInfoVersion
|
||||
#error Missing /DVersionInfoVersion — this script is meant to be compiled via bundle-windows.ps1
|
||||
#endif
|
||||
#ifndef Architectures
|
||||
#error Missing /DArchitectures — this script is meant to be compiled via bundle-windows.ps1
|
||||
#endif
|
||||
|
||||
[Setup]
|
||||
; Never change AppId: it is how Windows ties upgrades + the uninstall entry
|
||||
@@ -35,8 +39,8 @@ DefaultDirName={autopf}\tty7
|
||||
DisableProgramGroupPage=yes
|
||||
PrivilegesRequired=lowest
|
||||
PrivilegesRequiredOverridesAllowed=dialog
|
||||
ArchitecturesAllowed=x64compatible
|
||||
ArchitecturesInstallIn64BitMode=x64compatible
|
||||
ArchitecturesAllowed={#Architectures}
|
||||
ArchitecturesInstallIn64BitMode={#Architectures}
|
||||
MinVersion=10.0
|
||||
LicenseFile={#StageDir}\LICENSE.txt
|
||||
SetupIconFile=..\..\assets\favicon.ico
|
||||
|
||||
Reference in New Issue
Block a user