Skip to content

A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.

feat(update): fetch the arm64 installer on arm64

RoversX220e2be75d02
diff --git a/thinkterm-update/src/lib.rs b/thinkterm-update/src/lib.rs
index 02c07753..05e93657 100644
--- a/thinkterm-update/src/lib.rs
+++ b/thinkterm-update/src/lib.rs
@@ -284,6 +284,17 @@ pub fn download_asset_to(
}
}
+/// The installer ci/deploy.sh builds for `arch`. x86_64 keeps the name it
+/// had before there was an arm64 one, which every copy installed since
+/// looks for. An arm64 copy must not take that one: it installs over the
+/// native build in the same place, and the machine then runs it emulated.
+fn windows_installer_name(arch: &str, version: &str) -> String {
+ match arch {
+ "aarch64" => format!("ThinkTerm-{version}-arm64-setup.exe"),
+ _ => format!("ThinkTerm-{version}-setup.exe"),
+ }
+}
+
/// Windows: fetch the release's installer and hand over to it. Inno Setup
/// closes the running ThinkTerm, replaces the files and restarts it, so
/// this process must not wait for it -- it is one of the files.
@@ -297,7 +308,7 @@ pub fn run_windows_installer(
progress: &mut dyn FnMut(InstallProgress),
) -> anyhow::Result<()> {
let version = release.tag_name.trim_start_matches('v');
- let wanted = format!("ThinkTerm-{version}-setup.exe");
+ let wanted = windows_installer_name(std::env::consts::ARCH, version);
let asset = release
.assets
.iter()
@@ -1139,6 +1150,12 @@ mod tests {
assert_eq!(asset_name_for("windows", "x86_64", "desktop", "1.2.3"), None);
}
+ #[test]
+ fn windows_installer_follows_the_architecture() {
+ assert_eq!(windows_installer_name("x86_64", "1.2.3"), "ThinkTerm-1.2.3-setup.exe");
+ assert_eq!(windows_installer_name("aarch64", "1.2.3"), "ThinkTerm-1.2.3-arm64-setup.exe");
+ }
+
#[test]
fn glibc_versions_parse_from_getconf_output() {
assert_eq!(parse_glibc_version("glibc 2.31\n"), Some((2, 31)));