ProxySuite-<version>-windows-x64-setup.exe (NSIS, English and Russian): it unpacks the release into its temporary folder and runs the release's own proxy-suite-service.exe install from there, as install.cmd does from the zip (unpacked straight into Program Files, an upgrade would find its files in use). It refuses 32-bit Windows and anything before 10 1903, and offers Windows' OpenSSH Client, unchecked, for the SSH tunnel. install now writes the entry in Settings > Apps (uninstall.cmd; quietly, the service's uninstall), and uninstall removes it, with WinDivert's driver service when it is the suite's own. The release workflow publishes the setup beside the zip. The app's icon and GPUI's manifest share one resource (llvm-rc for both); the build scripts' clones retry, and are kept for the next build. Tested under Wine: tools/wine-setup-test.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.8 KiB
Bash
Executable File
38 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# tg-ws-proxy for Windows: Flowseal's source (the headless proxy, not the tray app) on the
|
|
# official embeddable CPython, with its dependencies as pinned win_amd64 wheels. Everything is
|
|
# verified: the Python archive and every wheel by hash, the source by its commit.
|
|
#
|
|
# tools/build-tg-ws-proxy.sh OUT_DIR (needs curl, git, unzip, pip)
|
|
set -euo pipefail
|
|
. "$(dirname "$0")/lib.sh"
|
|
OUT=$(realpath -m "${1:?output directory}")
|
|
cd "$(dirname "$0")"
|
|
PY_VERSION=3.12.10
|
|
PY_URL=https://www.python.org/ftp/python/$PY_VERSION/python-$PY_VERSION-embed-amd64.zip
|
|
PY_SHA256=4acbed6dd1c744b0376e3b1cf57ce906f9dc9e95e68824584c8099a63025a3c3
|
|
TG_TAG=v1.11.2
|
|
TG_COMMIT=307a384ab7f522e34bb1a045884d0bd90f40bee5
|
|
WORK=$(mktemp -d)
|
|
trap 'rm -rf "$WORK"' EXIT
|
|
|
|
rm -rf "$OUT" && mkdir -p "$OUT/python" "$OUT/app"
|
|
curl -sSfL -o "$WORK/python.zip" "$PY_URL"
|
|
echo "$PY_SHA256 $WORK/python.zip" | sha256sum -c --quiet
|
|
unzip -q "$WORK/python.zip" -d "$OUT/python"
|
|
|
|
pip download -q --require-hashes --no-deps --only-binary=:all: --platform win_amd64 \
|
|
--python-version 3.12 --implementation cp --dest "$WORK/wheels" -r tg-ws-proxy-requirements.txt
|
|
mkdir -p "$OUT/python/Lib/site-packages"
|
|
for w in "$WORK"/wheels/*.whl; do unzip -q -o "$w" -d "$OUT/python/Lib/site-packages"; done
|
|
|
|
clone_tag https://github.com/Flowseal/tg-ws-proxy "$TG_TAG" "$WORK/src"
|
|
[ "$(git -C "$WORK/src" rev-parse HEAD)" = "$TG_COMMIT" ] || { echo "tag $TG_TAG moved off $TG_COMMIT"; exit 1; }
|
|
cp -r "$WORK/src/proxy" "$WORK/src/utils" "$WORK/src/LICENSE" "$OUT/app/"
|
|
|
|
# The embeddable Python reads its path from this file alone: the standard library, the
|
|
# wheels, and the source.
|
|
printf 'python312.zip\n.\nLib\\site-packages\n..\\app\nimport site\n' > "$OUT/python/python312._pth"
|
|
echo "${TG_TAG#v}+py$PY_VERSION" > "$OUT/.version"
|
|
echo "tg-ws-proxy ${TG_TAG#v} on Python $PY_VERSION in $OUT"
|