Files
proxy-suite-flake/windows/tools/lib.sh
T
faumarayandClaude Opus 5.5 ae58bd1f12 windows: a setup program, and an uninstall entry in Settings > Apps
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>
2026-10-27 13:45:09 +03:00

31 lines
1.2 KiB
Bash

# Shared by tools/build-*.sh (sourced).
# clone_tag URL TAG DIR: a shallow clone of TAG into DIR, tried three times: a transfer that
# stalls (GitHub's sometimes do) is given up after a minute, a connection that hangs by curl's
# own timeout; a slow one is waited for. With SRC_CACHE set, a clone made is kept there and
# the next build copies it rather than fetching it again (the scripts check its commit either
# way).
clone_tag() {
local url=$1 tag=$2 dir=$3 try cached=""
if [ -n "${SRC_CACHE:-}" ]; then
cached="$SRC_CACHE/$(basename "$url")@$tag"
if [ -d "$cached/.git" ]; then
# Its files as its commit has them, whatever happened to the copy since.
rm -rf "$dir" && cp -a "$cached" "$dir" && git -C "$dir" reset -q --hard && git -C "$dir" clean -qfdx && return 0
fi
fi
for try in 1 2 3; do
rm -rf "$dir"
if git -c advice.detachedHead=false -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=60 \
clone -q --depth 1 --branch "$tag" "$url" "$dir"; then
if [ -n "$cached" ]; then
mkdir -p "$SRC_CACHE" && rm -rf "$cached.tmp" && cp -a "$dir" "$cached.tmp" && mv "$cached.tmp" "$cached"
fi
return 0
fi
echo "cloning $url ($tag) failed, try $try of 3" >&2
sleep 5
done
return 1
}