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.

ci: build the Windows installer from the directory the binaries were built in

RoversX7a28ab48eb99
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 7f0605ac..7abf3a54 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -19,7 +19,7 @@ require_web_bundle() {
}
set -e
-TARGET_DIR=${1:-target}
+TARGET_DIR=${1:-${CARGO_TARGET_DIR:-target}}
# The cargo profile the binaries were built with: `release` (target/release)
# unless the caller built with `--profile dist` (target/dist), which is what
# the release workflow and `ci/macos-package.sh --profile dist` do.
@@ -232,11 +232,12 @@ case $OSTYPE in
fi
rm -rf $zipdir $zipname
mkdir $zipdir
- cp $TARGET_DIR/$PROFILE/thinkterm.exe \
- $TARGET_DIR/$PROFILE/wezterm.exe \
- $TARGET_DIR/$PROFILE/thinkterm-mux-server.exe \
- $TARGET_DIR/$PROFILE/thinkterm-gui.exe \
- $TARGET_DIR/$PROFILE/strip-ansi-escapes.exe \
+ artifact_dir=$(cd "$TARGET_DIR/$PROFILE" && pwd)
+ cp "$artifact_dir/thinkterm.exe" \
+ "$artifact_dir/wezterm.exe" \
+ "$artifact_dir/thinkterm-mux-server.exe" \
+ "$artifact_dir/thinkterm-gui.exe" \
+ "$artifact_dir/strip-ansi-escapes.exe" \
assets/windows/conhost/conpty.dll \
assets/windows/conhost/OpenConsole.exe \
assets/windows/angle/libEGL.dll \
@@ -250,9 +251,9 @@ case $OSTYPE in
# go into a zip of their own next to the package, not into it: they are
# for resolving crash reports, and they would double the download.
rm -rf $zipdir-pdb $zipdir-pdb.zip
- if ls $TARGET_DIR/$PROFILE/*.pdb >/dev/null 2>&1 ; then
+ if ls "$artifact_dir"/*.pdb >/dev/null 2>&1 ; then
mkdir $zipdir-pdb
- cp $TARGET_DIR/$PROFILE/*.pdb $zipdir-pdb
+ cp "$artifact_dir"/*.pdb $zipdir-pdb
7z a -tzip $zipdir-pdb.zip $zipdir-pdb >/dev/null
rm -rf $zipdir-pdb
fi
@@ -273,7 +274,8 @@ case $OSTYPE in
cp -Rp thinkterm-web/www/assets thinkterm-web/www/pkg thinkterm-web/www/fonts $zipdir/web/
fi
7z a -tzip $zipname $zipdir
- iscc.exe -DMyAppVersion=${TAG_NAME#nightly} -F${instname} ci/windows-installer.iss
+ installer_source_dir=$(cygpath -w "$artifact_dir")
+ iscc.exe "-DMyAppVersion=${TAG_NAME#nightly}" "-DMyAppSourceDir=$installer_source_dir" "-F${instname}" ci/windows-installer.iss
;;
linux-gnu|linux)
distro=$(lsb_release -is 2>/dev/null || sh -c "source /etc/os-release && echo \$NAME")
diff --git a/ci/windows-installer.iss b/ci/windows-installer.iss
index c0a2aa62..083dab43 100644
--- a/ci/windows-installer.iss
+++ b/ci/windows-installer.iss
@@ -7,6 +7,9 @@
#define MyAppPublisher "RoversX"
#define MyAppURL "https://github.com/RoversX/thinkterm"
#define MyAppExeName "thinkterm-gui.exe"
+#ifndef MyAppSourceDir
+ #error MyAppSourceDir must name the directory containing the built executables
+#endif
[Setup]
AppId={{56CBA99B-8F65-4EC0-8CE4-F13BFCB70274}
@@ -43,17 +46,17 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
-Source: "..\target\release\thinkterm.exe"; DestDir: "{app}"; Flags: ignoreversion
-Source: "..\target\release\wezterm.exe"; DestDir: "{app}"; Flags: ignoreversion
-Source: "..\target\release\thinkterm-gui.exe"; DestDir: "{app}"; Flags: ignoreversion
-Source: "..\target\release\thinkterm-mux-server.exe"; DestDir: "{app}"; Flags: ignoreversion
-Source: "..\target\release\mesa\opengl32.dll"; DestDir: "{app}\mesa"; Flags: ignoreversion
-Source: "..\target\release\libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion
-Source: "..\target\release\libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversion
-Source: "..\target\release\conpty.dll"; DestDir: "{app}"; Flags: ignoreversion
-Source: "..\target\release\OpenConsole.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#MyAppSourceDir}\thinkterm.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#MyAppSourceDir}\wezterm.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#MyAppSourceDir}\thinkterm-gui.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#MyAppSourceDir}\thinkterm-mux-server.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#MyAppSourceDir}\mesa\opengl32.dll"; DestDir: "{app}\mesa"; Flags: ignoreversion
+Source: "{#MyAppSourceDir}\libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#MyAppSourceDir}\libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#MyAppSourceDir}\conpty.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#MyAppSourceDir}\OpenConsole.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\thinkterm-web\www\*"; DestDir: "{app}\web"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
-Source: "..\target\release\strip-ansi-escapes.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "{#MyAppSourceDir}\strip-ansi-escapes.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\LICENSE.md"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\LICENSE-MIT"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\NOTICE"; DestDir: "{app}"; Flags: ignoreversion