refactor: rename the GUI binary to tty7-app, freeing tty7 for the CLI

The package name and every display name ("tty7" in menus, tray, .desktop
Name, CFBundleName, installer AppName, shortcuts) stay as they were; only
the executable file is now tty7-app / tty7-app.exe, per docs/cli-design.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014JPaaZVK7rfQPKyrymzsYv
This commit is contained in:
thomas
2026-07-31 09:28:00 +08:00
co-authored by Claude Fable 5
parent 66b238ee8f
commit 10b6741368
10 changed files with 34 additions and 34 deletions
+4 -4
View File
@@ -52,8 +52,8 @@ APPDIR="dist/AppDir"
rm -rf "$APPDIR"
mkdir -p "$APPDIR/usr/bin"
cp "target/${TARGET}/release/tty7" "$APPDIR/usr/bin/tty7"
chmod +x "$APPDIR/usr/bin/tty7"
cp "target/${TARGET}/release/tty7-app" "$APPDIR/usr/bin/tty7-app"
chmod +x "$APPDIR/usr/bin/tty7-app"
# A desktop entry + icon are mandatory AppImage metadata; linuxdeploy places
# them and generates AppRun. Icon basename must match the desktop's Icon= key.
@@ -62,7 +62,7 @@ cat > "$TOOLS/tty7.desktop" <<'DESKTOP'
Type=Application
Name=tty7
Comment=A fast, native terminal
Exec=tty7
Exec=tty7-app
Icon=tty7
Categories=System;TerminalEmulator;
Terminal=false
@@ -76,7 +76,7 @@ convert assets/app-icon.png -resize 256x256 "$TOOLS/tty7.png"
# install the desktop/icon into their standard locations.
"$LINUXDEPLOY" \
--appdir "$APPDIR" \
--executable "$APPDIR/usr/bin/tty7" \
--executable "$APPDIR/usr/bin/tty7-app" \
--desktop-file "$TOOLS/tty7.desktop" \
--icon-file "$TOOLS/tty7.png"
+3 -3
View File
@@ -27,11 +27,11 @@ STAGE="dist/${NAME}"
rm -rf dist
mkdir -p "$STAGE"
cp "target/${TARGET}/release/tty7" "$STAGE/tty7"
chmod +x "$STAGE/tty7"
cp "target/${TARGET}/release/tty7-app" "$STAGE/tty7-app"
chmod +x "$STAGE/tty7-app"
# Release builds keep symbols (thin LTO, no profile strip); drop them here so
# the archive isn't ~100 MB of debug info.
strip "$STAGE/tty7" || echo "⚠️ strip unavailable — shipping unstripped binary"
strip "$STAGE/tty7-app" || echo "⚠️ strip unavailable — shipping unstripped binary"
mkdir -p "$STAGE/completions"
cp assets/completions/*.json "$STAGE/completions/"
cp LICENSE "$STAGE/LICENSE"
+4 -4
View File
@@ -25,8 +25,8 @@ APP="dist/tty7.app"
rm -rf dist
mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
cp "target/${TARGET}/release/tty7" "$APP/Contents/MacOS/tty7"
chmod +x "$APP/Contents/MacOS/tty7"
cp "target/${TARGET}/release/tty7-app" "$APP/Contents/MacOS/tty7-app"
chmod +x "$APP/Contents/MacOS/tty7-app"
cp assets/tty7.icns "$APP/Contents/Resources/tty7.icns"
# Completion signatures are loaded at runtime (not embedded), resolved relative
# to the executable as ../Resources/completions — see terminal::signature.
@@ -44,7 +44,7 @@ cat > "$APP/Contents/Info.plist" <<PLIST
<key>CFBundleIdentifier</key><string>com.github.tty7</string>
<key>CFBundleVersion</key><string>${VERSION}</string>
<key>CFBundleShortVersionString</key><string>${VERSION}</string>
<key>CFBundleExecutable</key><string>tty7</string>
<key>CFBundleExecutable</key><string>tty7-app</string>
<key>CFBundleIconFile</key><string>tty7</string>
<key>CFBundlePackageType</key><string>APPL</string>
<key>NSHighResolutionCapable</key><true/>
@@ -96,7 +96,7 @@ ENT
# Sign inner-out: the executable first, then the bundle.
codesign --force --options runtime --timestamp --entitlements "$ENTITLEMENTS" \
--sign "$SIGN_ID" "$APP/Contents/MacOS/tty7"
--sign "$SIGN_ID" "$APP/Contents/MacOS/tty7-app"
codesign --force --options runtime --timestamp --entitlements "$ENTITLEMENTS" \
--sign "$SIGN_ID" "$APP"
codesign --verify --strict --verbose=2 "$APP"
+3 -3
View File
@@ -5,7 +5,7 @@
# (Program Files or per-user, Start Menu shortcut, "Apps" uninstall entry)
#
# Fonts are embedded via include_bytes! and the app icon is compiled into the
# executable as a resource (see build.rs). So the payload is tty7.exe plus a
# executable as a resource (see build.rs). So the payload is tty7-app.exe plus a
# sibling completions\ dir (loaded at runtime — see terminal::signature) and the
# license/readme. Both artifacts are unsigned builds — SmartScreen will
# warn on first launch.
@@ -20,7 +20,7 @@ $Stage = "dist/$Name"
Remove-Item -Recurse -Force dist -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Force -Path $Stage | Out-Null
Copy-Item "target/$Target/release/tty7.exe" "$Stage/tty7.exe"
Copy-Item "target/$Target/release/tty7-app.exe" "$Stage/tty7-app.exe"
New-Item -ItemType Directory -Force -Path "$Stage/completions" | Out-Null
Copy-Item "assets/completions/*.json" "$Stage/completions/"
Copy-Item LICENSE "$Stage/LICENSE.txt"
@@ -29,7 +29,7 @@ Copy-Item README.md "$Stage/README.md"
# The Linux musl `tty7-server`, staged at server/ so a WSL distro can be handed
# the binary this client shipped with (WSL downloads nothing). The
# lookup path is a contract with `daemon::install::wsl` — it searches
# <dir of tty7.exe>/server/<asset> first — so this directory name is not free to
# <dir of tty7-app.exe>/server/<asset> first — so this directory name is not free to
# change on its own. Missing is a warning, not an error, matching `server-musl`'s
# own skip-don't-fail probe; WSL then fails at connect time with a message
# naming the directories it searched.
+14 -14
View File
@@ -3,7 +3,7 @@
; payload and passes every path in via /D defines:
;
; /DAppVersion=<semver> version parsed from Cargo.toml
; /DStageDir=<abs path> staged payload (tty7.exe, completions\, LICENSE.txt, README.md)
; /DStageDir=<abs path> staged payload (tty7-app.exe, completions\, LICENSE.txt, README.md)
; /DOutputDir=<abs path> where the setup exe is written
; /DOutputName=<basename> setup exe filename, without ".exe"
;
@@ -35,14 +35,14 @@ ArchitecturesInstallIn64BitMode=x64compatible
MinVersion=10.0
LicenseFile={#StageDir}\LICENSE.txt
SetupIconFile=..\..\assets\favicon.ico
UninstallDisplayIcon={app}\tty7.exe
UninstallDisplayIcon={app}\tty7-app.exe
OutputDir={#OutputDir}
OutputBaseFilename={#OutputName}
Compression=lzma2
SolidCompression=yes
WizardStyle=modern
; The persistent daemon (tty7.exe --daemon) is a detached background process
; that outlives the GUI and holds the running image of tty7.exe, so Windows
; The persistent daemon (tty7-app.exe --daemon) is a detached background process
; that outlives the GUI and holds the running image of tty7-app.exe, so Windows
; locks the file and an upgrade can't replace it. We stop it explicitly in
; PrepareToInstall below; keep the Restart Manager as a backstop but don't let
; it relaunch anything (the GUI respawns the daemon itself on next start).
@@ -53,7 +53,7 @@ RestartApplications=no
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "{#StageDir}\tty7.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#StageDir}\tty7-app.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#StageDir}\completions\*"; DestDir: "{app}\completions"; Flags: ignoreversion recursesubdirs
Source: "{#StageDir}\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#StageDir}\README.md"; DestDir: "{app}"; Flags: ignoreversion
@@ -63,26 +63,26 @@ Source: "{#StageDir}\README.md"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#StageDir}\server\*"; DestDir: "{app}\server"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist
[Icons]
Name: "{autoprograms}\tty7"; Filename: "{app}\tty7.exe"
Name: "{autodesktop}\tty7"; Filename: "{app}\tty7.exe"; Tasks: desktopicon
Name: "{autoprograms}\tty7"; Filename: "{app}\tty7-app.exe"
Name: "{autodesktop}\tty7"; Filename: "{app}\tty7-app.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\tty7.exe"; Description: "{cm:LaunchProgram,tty7}"; Flags: nowait postinstall skipifsilent
Filename: "{app}\tty7-app.exe"; Description: "{cm:LaunchProgram,tty7}"; Flags: nowait postinstall skipifsilent
[UninstallRun]
; Stop the daemon before the uninstaller deletes tty7.exe — the running daemon
; Stop the daemon before the uninstaller deletes tty7-app.exe — the running daemon
; is the locked image of that file, so removing it fails otherwise. This runs at
; the start of uninstallation, before any files are removed. The installed binary
; is this version, which understands the flag; runhidden suppresses any flash and
; the call returns without opening a window. RunOnceId keys the entry so a repeated
; uninstall doesn't run it twice.
Filename: "{app}\tty7.exe"; Parameters: "--stop-daemon"; Flags: runhidden waituntilterminated; RunOnceId: "StopDaemon"
Filename: "{app}\tty7-app.exe"; Parameters: "--stop-daemon"; Flags: runhidden waituntilterminated; RunOnceId: "StopDaemon"
[Code]
(* Gracefully stop the persistent daemon before we overwrite tty7.exe. We can't
(* Gracefully stop the persistent daemon before we overwrite tty7-app.exe. We can't
run the *installed* binary here — on an upgrade from an older build it may not
understand --stop-daemon and would launch the GUI instead — so we extract the
*new* tty7.exe to {tmp} and run that. It connects to the running daemon, hangs
*new* tty7-app.exe to {tmp} and run that. It connects to the running daemon, hangs
up every shell, waits for it to exit (releasing the file lock), then returns
without opening a window. Best effort: any failure falls through to the Restart
Manager backstop, and a fresh install simply has no daemon to stop. *)
@@ -90,8 +90,8 @@ function PrepareToInstall(var NeedsRestart: Boolean): String;
var
ResultCode: Integer;
begin
ExtractTemporaryFile('tty7.exe');
Exec(ExpandConstant('{tmp}\tty7.exe'), '--stop-daemon', '',
ExtractTemporaryFile('tty7-app.exe');
Exec(ExpandConstant('{tmp}\tty7-app.exe'), '--stop-daemon', '',
SW_HIDE, ewWaitUntilTerminated, ResultCode);
Result := '';
end;