feat(installer,web): one canonical bundle per target; robust in-place upgrades; update-check feedback (#142)
Co-authored-by: Yaowei Zheng <hiyouga@buaa.edu.cn> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
24 files changed
+1081
-465
No files matched your search
@@ -12,10 +12,13 @@ set -eu
|
||||
# Download to a file first, then run it: piping straight into `sh` would execute
|
||||
# a truncated download line by line, and the real installer removes the old
|
||||
# bin/lib/web/node before moving the new ones in — a cut connection mid-way
|
||||
# would leave no install at all.
|
||||
TMP="$(mktemp)"
|
||||
trap 'rm -f "$TMP"' EXIT
|
||||
curl -fsSL "https://github.com/Prism-Shadow/penguin-harness/releases/latest/download/install.sh" -o "$TMP"
|
||||
# would leave no install at all. The file lives in a private mktemp -d (0700)
|
||||
# directory: the real installer picks up a payload sitting next to a script
|
||||
# named install.sh (the extracted-bundle offline path), and a shared /tmp must
|
||||
# never offer that seam to other local users.
|
||||
TMP_DIR="$(mktemp -d)"
|
||||
trap 'rm -rf "$TMP_DIR"' EXIT
|
||||
curl -fsSL "https://github.com/Prism-Shadow/penguin-harness/releases/latest/download/install.sh" -o "$TMP_DIR/install.sh"
|
||||
rc=0
|
||||
sh "$TMP" "$@" || rc=$?
|
||||
sh "$TMP_DIR/install.sh" "$@" || rc=$?
|
||||
exit "$rc"
|
||||
@@ -25,20 +25,21 @@ export const INSTALL_CMD = "curl -fsSL https://penguin.ooo/install.sh | sh";
|
||||
export const INSTALL_CMD_WINDOWS = "irm https://penguin.ooo/install.ps1 | iex";
|
||||
|
||||
/**
|
||||
* Offline-bundle install commands, per OS tab of the install switcher. Each Release
|
||||
* attaches five self-contained bundles (see scripts/package-offline-bundles.sh); the
|
||||
* commands show the most common architecture — the localized hint strings name the
|
||||
* alternative archive. Language-neutral, like the one-liners above.
|
||||
* Offline install commands, per OS tab of the install switcher. Each Release attaches one
|
||||
* installer bundle per target (see scripts/package-release-bundles.sh) and the same file
|
||||
* serves online and offline installation; the commands show the most common architecture —
|
||||
* the localized hint strings name the alternative archive. Language-neutral, like the
|
||||
* one-liners above.
|
||||
*/
|
||||
export const OFFLINE_INSTALL_CMDS: Record<"linux" | "macos" | "windows", string> = {
|
||||
linux: `mkdir penguin-offline
|
||||
tar -xzf penguin-linux-x64-offline.tar.gz -C penguin-offline
|
||||
./penguin-offline/install.sh`,
|
||||
macos: `mkdir penguin-offline
|
||||
tar -xzf penguin-darwin-arm64-offline.tar.gz -C penguin-offline
|
||||
./penguin-offline/install.sh`,
|
||||
windows: `Expand-Archive penguin-win32-x64-offline.zip -DestinationPath penguin-offline
|
||||
cd penguin-offline
|
||||
linux: `mkdir penguin-install
|
||||
tar -xzf penguin-linux-x64.tar.gz -C penguin-install
|
||||
./penguin-install/install.sh`,
|
||||
macos: `mkdir penguin-install
|
||||
tar -xzf penguin-darwin-arm64.tar.gz -C penguin-install
|
||||
./penguin-install/install.sh`,
|
||||
windows: `Expand-Archive penguin-win32-x64.zip -DestinationPath penguin-install
|
||||
cd penguin-install
|
||||
.\\install.cmd`,
|
||||
};
|
||||
|
||||
|
||||
@@ -71,11 +71,10 @@ export const en: Strings = {
|
||||
online: "Online install",
|
||||
offline: "Offline package",
|
||||
offlineNote:
|
||||
"Every GitHub Release attaches five self-contained offline bundles (Linux / macOS in x64 and arm64, Windows in x64), each carrying the program archive, its SHA256 checksum and the installer: download on a networked machine, copy to the target, and install with no network at all.",
|
||||
"Every GitHub Release attaches one package per target (Linux / macOS in x64 and arm64, Windows in x64) and the same file serves online and offline installation. Each package seals the program payload, its SHA256 checksum and the installer: download that one file on a networked machine, copy it to the target, extract once and install with no network at all.",
|
||||
offlineHints: {
|
||||
linux: "On arm64 machines, use penguin-linux-arm64-offline.tar.gz.",
|
||||
macos:
|
||||
"Apple silicon uses the arm64 bundle; on Intel, use penguin-darwin-x64-offline.tar.gz.",
|
||||
linux: "On arm64 machines, use penguin-linux-arm64.tar.gz.",
|
||||
macos: "Apple silicon uses the arm64 package; on Intel, use penguin-darwin-x64.tar.gz.",
|
||||
windows: "After unzipping you can also just double-click install.cmd.",
|
||||
},
|
||||
offlineRelease: "Download offline packages from GitHub Releases",
|
||||
|
||||
@@ -77,10 +77,10 @@ export const zh = {
|
||||
online: "在线安装",
|
||||
offline: "离线安装包",
|
||||
offlineNote:
|
||||
"每个 GitHub Release 附带五个自包含离线安装包(Linux / macOS 各 x64 与 arm64,Windows 为 x64),内含程序包、SHA256 校验文件与安装器:在有网机器下载,拷贝到目标机器安装,全程无需联网。",
|
||||
"每个 GitHub Release 每个目标只附带一个安装包(Linux / macOS 各 x64 与 arm64,Windows 为 x64),同一个文件同时服务在线与离线安装。包内封入程序负载、SHA256 校验文件与安装器:在有网机器下载这一个文件,拷贝到目标机器解压安装,全程无需联网。",
|
||||
offlineHints: {
|
||||
linux: "arm64 机器换用 penguin-linux-arm64-offline.tar.gz。",
|
||||
macos: "Apple 芯片用 arm64 包,Intel 芯片换用 penguin-darwin-x64-offline.tar.gz。",
|
||||
linux: "arm64 机器换用 penguin-linux-arm64.tar.gz。",
|
||||
macos: "Apple 芯片用 arm64 包,Intel 芯片换用 penguin-darwin-x64.tar.gz。",
|
||||
windows: "解压后也可直接双击 install.cmd 完成安装。",
|
||||
},
|
||||
offlineRelease: "前往 GitHub Releases 下载离线安装包",
|
||||
|
||||
Reference in new issue
Block a user