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: ship both license texts with every package

RoversX7800d5f10f63
diff --git a/ci/appimage.sh b/ci/appimage.sh
index aa9dc924..727755b3 100755
--- a/ci/appimage.sh
+++ b/ci/appimage.sh
@@ -15,6 +15,11 @@ install -Dm644 assets/wezterm.desktop AppDir/usr/share/applications/com.roversx.
install -Dm644 assets/wezterm.appdata.xml AppDir/usr/share/metainfo/com.roversx.thinkterm.appdata.xml
install -Dm644 assets/wezterm-nautilus.py AppDir/usr/share/nautilus-python/extensions/wezterm-nautilus.py
install -Dm644 NOTICE AppDir/usr/share/doc/thinkterm/NOTICE
+# Both license texts, not just the NOTICE that points at them: AUR and
+# linuxbrew unpack this AppImage for their own license dirs, so leaving
+# them out here leaves them out of every downstream Linux package.
+install -Dm644 LICENSE.md AppDir/usr/share/doc/thinkterm/LICENSE.md
+install -Dm644 LICENSE-MIT AppDir/usr/share/doc/thinkterm/LICENSE-MIT
# linuxdeploy publishes per-machine names (x86_64, aarch64); the rest of the
# release labels the same machine arm64, so normalise for the output name.
diff --git a/ci/deploy.sh b/ci/deploy.sh
index ff697ca0..e964fefc 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -43,9 +43,10 @@ case $OSTYPE in
cp assets/icon/ThinkTerm_simple.icns $zipdir/ThinkTerm.app/Contents/Resources/ThinkTerm_simple.icns
cp -r assets/shell-integration/* $zipdir/ThinkTerm.app/Contents/Resources
cp -r assets/shell-completion $zipdir/ThinkTerm.app/Contents/Resources
- # Third-party attributions (icon sets, detection manifests); their
- # licenses require the notice to ship with the binaries that embed them.
- cp NOTICE $zipdir/ThinkTerm.app/Contents/Resources/NOTICE
+ # The license texts (GPL-3 for this project, MIT for the upstream WezTerm
+ # code) and the third-party attributions; all of them have to ship with the
+ # binaries that embed the material they cover.
+ cp LICENSE.md LICENSE-MIT NOTICE $zipdir/ThinkTerm.app/Contents/Resources/
tic -xe wezterm -o $zipdir/ThinkTerm.app/Contents/Resources/terminfo termwiz/data/wezterm.terminfo
for bin in wezterm thinkterm thinkterm-mux-server thinkterm-gui strip-ansi-escapes ; do
@@ -156,6 +157,8 @@ case $OSTYPE in
assets/windows/conhost/OpenConsole.exe \
assets/windows/angle/libEGL.dll \
assets/windows/angle/libGLESv2.dll \
+ LICENSE.md \
+ LICENSE-MIT \
NOTICE \
$zipdir
@@ -301,10 +304,14 @@ install -Dm644 assets/wezterm.desktop %{buildroot}/usr/share/applications/com.ro
install -Dm644 assets/wezterm.appdata.xml %{buildroot}/usr/share/metainfo/com.roversx.thinkterm.appdata.xml
install -Dm644 assets/wezterm-nautilus.py %{buildroot}/usr/share/nautilus-python/extensions/wezterm-nautilus.py
install -Dm644 NOTICE %{buildroot}/usr/share/licenses/thinkterm/NOTICE
+install -Dm644 LICENSE.md %{buildroot}/usr/share/licenses/thinkterm/LICENSE.md
+install -Dm644 LICENSE-MIT %{buildroot}/usr/share/licenses/thinkterm/LICENSE-MIT
# A second copy owned by the standalone mux-server package: it links the
# same third-party material and installs without thinkterm-common, and
# one file owned by two packages would conflict on co-install.
install -Dm644 NOTICE %{buildroot}/usr/share/licenses/thinkterm-mux-server/NOTICE
+install -Dm644 LICENSE.md %{buildroot}/usr/share/licenses/thinkterm-mux-server/LICENSE.md
+install -Dm644 LICENSE-MIT %{buildroot}/usr/share/licenses/thinkterm-mux-server/LICENSE-MIT
%files
# Main package (metapackage) has no files
@@ -313,7 +320,7 @@ install -Dm644 NOTICE %{buildroot}/usr/share/licenses/thinkterm-mux-server/NOTIC
/usr/bin/thinkterm
/usr/bin/wezterm
/usr/bin/strip-ansi-escapes
-/usr/share/licenses/thinkterm/NOTICE
+/usr/share/licenses/thinkterm/*
/usr/share/zsh/site-functions/_thinkterm
/usr/share/fish/vendor_completions.d/thinkterm.fish
/usr/share/fish/vendor_completions.d/wezterm.fish
@@ -332,7 +339,7 @@ install -Dm644 NOTICE %{buildroot}/usr/share/licenses/thinkterm-mux-server/NOTIC
%files -n thinkterm-mux-server
/usr/bin/thinkterm-mux-server
-/usr/share/licenses/thinkterm-mux-server/NOTICE
+/usr/share/licenses/thinkterm-mux-server/*
%changelog
* Mon Oct 2 2023 Wez Furlong
@@ -422,6 +429,8 @@ EOF
ln -s thinkterm.fish pkg/debian/usr/share/fish/vendor_completions.d/wezterm.fish
install -Dm644 assets/shell-integration/* -t pkg/debian/etc/profile.d
install -Dm644 NOTICE pkg/debian/usr/share/doc/$pkgname/NOTICE
+ install -Dm644 LICENSE.md pkg/debian/usr/share/doc/$pkgname/LICENSE.md
+ install -Dm644 LICENSE-MIT pkg/debian/usr/share/doc/$pkgname/LICENSE-MIT
if [[ "$BUILD_REASON" == "Schedule" ]] ; then
debname=thinkterm-nightly.$distro$distver
@@ -480,6 +489,8 @@ source="
assets/icon/wezterm-icon.svg
termwiz/data/wezterm.terminfo
NOTICE
+ LICENSE.md
+ LICENSE-MIT
"
builddir="\$srcdir"
@@ -503,6 +514,8 @@ package() {
install -Dm644 "\$srcdir"/wezterm-icon.svg "\$pkgdir"/usr/share/icons/hicolor/scalable/apps/com.roversx.thinkterm.svg
install -Dm644 "\$builddir"/wezterm.terminfo "\$pkgdir"/usr/share/terminfo/w/wezterm
install -Dm644 "\$srcdir"/NOTICE "\$pkgdir"/usr/share/licenses/thinkterm/NOTICE
+ install -Dm644 "\$srcdir"/LICENSE.md "\$pkgdir"/usr/share/licenses/thinkterm/LICENSE.md
+ install -Dm644 "\$srcdir"/LICENSE-MIT "\$pkgdir"/usr/share/licenses/thinkterm/LICENSE-MIT
}
EOF
abuild -F checksum
diff --git a/ci/windows-installer.iss b/ci/windows-installer.iss
index 40a69c35..8cf24637 100644
--- a/ci/windows-installer.iss
+++ b/ci/windows-installer.iss
@@ -53,6 +53,8 @@ Source: "..\target\release\libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversio
Source: "..\target\release\conpty.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\target\release\OpenConsole.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\target\release\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
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
diff --git a/wezterm-gui/build.rs b/wezterm-gui/build.rs
index b008e4e6..88f8208e 100644
--- a/wezterm-gui/build.rs
+++ b/wezterm-gui/build.rs
@@ -119,13 +119,12 @@ BEGIN
BEGIN
BLOCK "040904E4"
BEGIN
- VALUE "CompanyName", "Wez Furlong\0"
- VALUE "FileDescription", "WezTerm - Wez's Terminal Emulator\0"
+ VALUE "CompanyName", "ThinkTerm\0"
+ VALUE "FileDescription", "ThinkTerm\0"
VALUE "FileVersion", "{version}\0"
- VALUE "LegalCopyright", "Wez Furlong, MIT licensed\0"
VALUE "InternalName", "\0"
VALUE "OriginalFilename", "\0"
- VALUE "ProductName", "WezTerm\0"
+ VALUE "ProductName", "ThinkTerm\0"
VALUE "ProductVersion", "{version}\0"
END
END
diff --git a/wezterm-mux-server/build.rs b/wezterm-mux-server/build.rs
index 44c7b120..6af614db 100644
--- a/wezterm-mux-server/build.rs
+++ b/wezterm-mux-server/build.rs
@@ -12,6 +12,38 @@ fn main() {
.unwrap();
let windows_dir = repo_dir.join("assets").join("windows");
+ // If a file named `.tag` is present, we'll take its contents for the
+ // version number, matching what wezterm-gui stamps into its resource.
+ let mut ci_tag = String::new();
+ if let Ok(tag) = std::fs::read("../.tag") {
+ if let Ok(s) = String::from_utf8(tag) {
+ ci_tag = s.trim().to_string();
+ println!("cargo:rerun-if-changed=../.tag");
+ }
+ }
+ let version = if ci_tag.is_empty() {
+ let mut cmd = std::process::Command::new("git");
+ cmd.args(&[
+ "-c",
+ "core.abbrev=8",
+ "show",
+ "-s",
+ "--format=%cd-%h",
+ "--date=format:%Y%m%d-%H%M%S",
+ ]);
+ if let Ok(output) = cmd.output() {
+ if output.status.success() {
+ String::from_utf8_lossy(&output.stdout).trim().to_owned()
+ } else {
+ "UNKNOWN".to_owned()
+ }
+ } else {
+ "UNKNOWN".to_owned()
+ }
+ } else {
+ ci_tag
+ };
+
let rcfile_name = Path::new(&std::env::var_os("OUT_DIR").unwrap()).join("resource.rc");
let mut rcfile = std::fs::File::create(&rcfile_name).unwrap();
write!(
@@ -19,8 +51,36 @@ fn main() {
r#"
#include <winres.h>
1 RT_MANIFEST "{win}\\console.manifest"
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+FILEFLAGS 0
+FILEOS VOS__WINDOWS32
+FILETYPE VFT_APP
+FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "ThinkTerm\0"
+ VALUE "FileDescription", "ThinkTerm Mux Server\0"
+ VALUE "FileVersion", "{version}\0"
+ VALUE "InternalName", "\0"
+ VALUE "OriginalFilename", "\0"
+ VALUE "ProductName", "ThinkTerm\0"
+ VALUE "ProductVersion", "{version}\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
"#,
win = windows_dir.display().to_string().replace("\\", "\\\\"),
+ version = version,
)
.unwrap();
drop(rcfile);
diff --git a/wezterm/build.rs b/wezterm/build.rs
index 44c7b120..69227287 100644
--- a/wezterm/build.rs
+++ b/wezterm/build.rs
@@ -12,6 +12,38 @@ fn main() {
.unwrap();
let windows_dir = repo_dir.join("assets").join("windows");
+ // If a file named `.tag` is present, we'll take its contents for the
+ // version number, matching what wezterm-gui stamps into its resource.
+ let mut ci_tag = String::new();
+ if let Ok(tag) = std::fs::read("../.tag") {
+ if let Ok(s) = String::from_utf8(tag) {
+ ci_tag = s.trim().to_string();
+ println!("cargo:rerun-if-changed=../.tag");
+ }
+ }
+ let version = if ci_tag.is_empty() {
+ let mut cmd = std::process::Command::new("git");
+ cmd.args(&[
+ "-c",
+ "core.abbrev=8",
+ "show",
+ "-s",
+ "--format=%cd-%h",
+ "--date=format:%Y%m%d-%H%M%S",
+ ]);
+ if let Ok(output) = cmd.output() {
+ if output.status.success() {
+ String::from_utf8_lossy(&output.stdout).trim().to_owned()
+ } else {
+ "UNKNOWN".to_owned()
+ }
+ } else {
+ "UNKNOWN".to_owned()
+ }
+ } else {
+ ci_tag
+ };
+
let rcfile_name = Path::new(&std::env::var_os("OUT_DIR").unwrap()).join("resource.rc");
let mut rcfile = std::fs::File::create(&rcfile_name).unwrap();
write!(
@@ -19,8 +51,36 @@ fn main() {
r#"
#include <winres.h>
1 RT_MANIFEST "{win}\\console.manifest"
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+FILEFLAGS 0
+FILEOS VOS__WINDOWS32
+FILETYPE VFT_APP
+FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "ThinkTerm\0"
+ VALUE "FileDescription", "ThinkTerm\0"
+ VALUE "FileVersion", "{version}\0"
+ VALUE "InternalName", "\0"
+ VALUE "OriginalFilename", "\0"
+ VALUE "ProductName", "ThinkTerm\0"
+ VALUE "ProductVersion", "{version}\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
"#,
win = windows_dir.display().to_string().replace("\\", "\\\\"),
+ version = version,
)
.unwrap();
drop(rcfile);