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>
This commit is contained in:
1 parent
ae31e499ca
commit
ae58bd1f12
14 files changed
+421
-33
No files matched your search
@@ -5,6 +5,7 @@
|
||||
#
|
||||
# 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
|
||||
@@ -25,7 +26,7 @@ pip download -q --require-hashes --no-deps --only-binary=:all: --platform win_am
|
||||
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
|
||||
|
||||
git -c advice.detachedHead=false clone -q --depth 1 --branch "$TG_TAG" https://github.com/Flowseal/tg-ws-proxy "$WORK/src"
|
||||
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/"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#
|
||||
# tools/build-whitelist-bypass.sh OUT_DIR [GOOS] (needs git, go, sed; GOOS: windows)
|
||||
set -euo pipefail
|
||||
. "$(dirname "$0")/lib.sh"
|
||||
OUT=$(realpath -m "${1:?output directory}")
|
||||
GOOS=${2:-windows}
|
||||
VERSION=0.4.4
|
||||
@@ -13,7 +14,7 @@ COMMIT=7c19a7ec40900940fe0c43ea1db7768ee632393d
|
||||
WORK=$(mktemp -d)
|
||||
trap 'rm -rf "$WORK"' EXIT
|
||||
|
||||
git -c advice.detachedHead=false clone -q --depth 1 --branch "v$VERSION" https://github.com/kulikov0/whitelist-bypass "$WORK/src"
|
||||
clone_tag https://github.com/kulikov0/whitelist-bypass "v$VERSION" "$WORK/src"
|
||||
[ "$(git -C "$WORK/src" rev-parse HEAD)" = "$COMMIT" ] || { echo "tag v$VERSION moved off $COMMIT"; exit 1; }
|
||||
cd "$WORK/src"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#
|
||||
# tools/build-wireproxy-awg.sh OUT_DIR [GOOS] (needs git, go, patch; GOOS: windows)
|
||||
set -euo pipefail
|
||||
. "$(dirname "$0")/lib.sh"
|
||||
OUT=$(realpath -m "${1:?output directory}")
|
||||
GOOS=${2:-windows}
|
||||
cd "$(dirname "$0")"
|
||||
@@ -15,7 +16,7 @@ PATCHES=$(realpath ../../pkgs/patches)
|
||||
WORK=$(mktemp -d)
|
||||
trap 'rm -rf "$WORK"' EXIT
|
||||
|
||||
git -c advice.detachedHead=false clone -q --depth 1 --branch "v$VERSION" https://github.com/artem-russkikh/wireproxy-awg "$WORK/src"
|
||||
clone_tag https://github.com/artem-russkikh/wireproxy-awg "v$VERSION" "$WORK/src"
|
||||
[ "$(git -C "$WORK/src" rev-parse HEAD)" = "$COMMIT" ] || { echo "tag v$VERSION moved off $COMMIT"; exit 1; }
|
||||
cd "$WORK/src"
|
||||
patch -s -p1 <"$PATCHES/wireproxy-awg-fwmark.patch"
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
; Proxy Suite's setup program. 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:
|
||||
; that stops what runs, copies the release into Program Files, registers the service, PATH, the
|
||||
; Start Menu entry, the app at sign-in and the entry in Settings > Apps, and starts it all.
|
||||
; Unpacked straight into Program Files instead, an upgrade would find its files in use.
|
||||
; The uninstaller is that entry's: uninstall.cmd, which the release carries.
|
||||
;
|
||||
; makensis -INPUTCHARSET UTF8 -DVERSION=0.2.0-pre.1 -DVERSION4=0.2.0.0 -DRELEASE=<release dir>
|
||||
; -DICON=crates/ps-gui/assets/proxy-suite.ico -DOUT=<setup.exe> tools/installer.nsi
|
||||
;
|
||||
; Everything the programs need is in the release: the C runtime is linked in, WinDivert, wintun,
|
||||
; Python and the rest are components. Windows' OpenSSH Client (the SSH tunnel) is Windows' own:
|
||||
; offered, unchecked, for a Windows that had it removed.
|
||||
|
||||
Unicode true
|
||||
ManifestDPIAware true
|
||||
RequestExecutionLevel admin
|
||||
; Solid, with a dictionary that keeps the build's memory modest: the release is ~600 MB of
|
||||
; programs, many alike (whitelist-bypass's nine).
|
||||
SetCompressor /SOLID /FINAL lzma
|
||||
SetCompressorDictSize 32
|
||||
|
||||
!include MUI2.nsh
|
||||
!include LogicLib.nsh
|
||||
!include x64.nsh
|
||||
!include WinVer.nsh
|
||||
|
||||
Name "Proxy Suite"
|
||||
OutFile "${OUT}"
|
||||
InstallDir "$PROGRAMFILES64\ProxySuite"
|
||||
BrandingText "Proxy Suite ${VERSION}"
|
||||
ShowInstDetails show
|
||||
|
||||
VIProductVersion "${VERSION4}"
|
||||
VIAddVersionKey /LANG=0 "ProductName" "Proxy Suite"
|
||||
VIAddVersionKey /LANG=0 "ProductVersion" "${VERSION}"
|
||||
VIAddVersionKey /LANG=0 "FileVersion" "${VERSION}"
|
||||
VIAddVersionKey /LANG=0 "FileDescription" "Proxy Suite setup"
|
||||
VIAddVersionKey /LANG=0 "LegalCopyright" "MIT License"
|
||||
|
||||
!define MUI_ICON "${ICON}"
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_FINISHPAGE_TITLE "$(FinishTitle)"
|
||||
!define MUI_FINISHPAGE_TEXT "$(FinishText)"
|
||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "${RELEASE}/LICENSE"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
; The first is the default; Windows' own language picks among them.
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
|
||||
LangString NeedX64 ${LANG_ENGLISH} "Proxy Suite needs 64-bit Windows."
|
||||
LangString NeedX64 ${LANG_RUSSIAN} "Для Proxy Suite нужна 64-битная Windows."
|
||||
LangString NeedBuild ${LANG_ENGLISH} "Proxy Suite needs Windows 10 version 1903 or later, or Windows 11."
|
||||
LangString NeedBuild ${LANG_RUSSIAN} "Для Proxy Suite нужна Windows 10 версии 1903 или новее либо Windows 11."
|
||||
LangString Failed ${LANG_ENGLISH} "Setup did not finish: the details are in the list above. Nothing that was installed before is lost."
|
||||
LangString Failed ${LANG_RUSSIAN} "Установка не завершена: подробности в списке выше. Установленное ранее не потеряно."
|
||||
LangString MainName ${LANG_ENGLISH} "Proxy Suite"
|
||||
LangString MainName ${LANG_RUSSIAN} "Proxy Suite"
|
||||
LangString MainDesc ${LANG_ENGLISH} "The service, the app, proxy-ctl and every component (sing-box, XRay, zapret, zapret2, Tor, tg-ws-proxy, wireproxy-awg, whitelist-bypass), into Program Files. Settings already made are kept."
|
||||
LangString MainDesc ${LANG_RUSSIAN} "Служба, приложение, proxy-ctl и все компоненты (sing-box, XRay, zapret, zapret2, Tor, tg-ws-proxy, wireproxy-awg, whitelist-bypass) в Program Files. Сделанные ранее настройки сохраняются."
|
||||
LangString SshName ${LANG_ENGLISH} "Windows OpenSSH Client"
|
||||
LangString SshName ${LANG_RUSSIAN} "Клиент OpenSSH Windows"
|
||||
LangString SshDesc ${LANG_ENGLISH} "For the SSH tunnel only. Windows 10 1809 and later have it already; this adds it from Windows Update where it was removed."
|
||||
LangString SshDesc ${LANG_RUSSIAN} "Нужен только для SSH-туннеля. В Windows 10 1809 и новее он уже есть; здесь он добавляется из Центра обновления, если его удалили."
|
||||
LangString SshThere ${LANG_ENGLISH} "The OpenSSH Client is there already."
|
||||
LangString SshThere ${LANG_RUSSIAN} "Клиент OpenSSH уже установлен."
|
||||
LangString SshFailed ${LANG_ENGLISH} "The OpenSSH Client could not be added (is Windows Update reachable?). Everything else works without it; add it later in Settings > System > Optional features."
|
||||
LangString SshFailed ${LANG_RUSSIAN} "Не удалось добавить клиент OpenSSH (доступен ли Центр обновления?). Всё остальное работает без него; его можно добавить позже: Параметры > Система > Дополнительные компоненты."
|
||||
LangString FinishTitle ${LANG_ENGLISH} "Proxy Suite is installed"
|
||||
LangString FinishTitle ${LANG_RUSSIAN} "Proxy Suite установлен"
|
||||
LangString FinishText ${LANG_ENGLISH} "Its service runs, and the app is in the tray (the shield) and the Start Menu; it starts at every sign-in.$\r$\n$\r$\nIn a new terminal: proxy-ctl status.$\r$\n$\r$\nTo remove it: Settings > Apps > Proxy Suite."
|
||||
LangString FinishText ${LANG_RUSSIAN} "Служба запущена, приложение в трее (щит) и в меню «Пуск»; оно запускается при каждом входе в систему.$\r$\n$\r$\nВ новом терминале: proxy-ctl status.$\r$\n$\r$\nУдаление: Параметры > Приложения > Proxy Suite."
|
||||
|
||||
Function .onInit
|
||||
${IfNot} ${RunningX64}
|
||||
MessageBox MB_ICONSTOP "$(NeedX64)" /SD IDOK
|
||||
Abort
|
||||
${EndIf}
|
||||
${IfNot} ${AtLeastBuild} 18362
|
||||
MessageBox MB_ICONSTOP "$(NeedBuild)" /SD IDOK
|
||||
Abort
|
||||
${EndIf}
|
||||
InitPluginsDir
|
||||
FunctionEnd
|
||||
|
||||
Section "$(MainName)" SecMain
|
||||
SectionIn RO
|
||||
SetOutPath "$PLUGINSDIR\release"
|
||||
File /r "${RELEASE}/*"
|
||||
DetailPrint "proxy-suite-service install"
|
||||
nsExec::ExecToLog '"$PLUGINSDIR\release\proxy-suite-service.exe" install'
|
||||
Pop $0
|
||||
; Out of the folder, so that it goes with $PLUGINSDIR when setup ends.
|
||||
SetOutPath "$TEMP"
|
||||
${If} $0 != 0
|
||||
DetailPrint "$(Failed)"
|
||||
MessageBox MB_ICONSTOP "$(Failed)" /SD IDOK
|
||||
SetErrorLevel 2
|
||||
Abort
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
Section /o "$(SshName)" SecSsh
|
||||
; This setup runs as a 32-bit program: Sysnative is the real System32.
|
||||
${If} ${FileExists} "$WINDIR\Sysnative\OpenSSH\ssh.exe"
|
||||
DetailPrint "$(SshThere)"
|
||||
${Else}
|
||||
nsExec::ExecToLog '"$WINDIR\Sysnative\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -NonInteractive -Command "Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 | Out-Null; if (-not (Test-Path $$env:SystemRoot\System32\OpenSSH\ssh.exe)) { exit 1 }"'
|
||||
Pop $0
|
||||
${If} $0 != 0
|
||||
DetailPrint "$(SshFailed)"
|
||||
MessageBox MB_ICONEXCLAMATION "$(SshFailed)" /SD IDOK
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecMain} "$(MainDesc)"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecSsh} "$(SshDesc)"
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
@@ -0,0 +1,30 @@
|
||||
# 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
|
||||
}
|
||||
@@ -1,16 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# The release: ProxySuite-<version>-windows-x64.zip in dist/, with the programs (the service,
|
||||
# proxy-ctl, the app), every component (fetched and verified), the install scripts, the README
|
||||
# and the licenses.
|
||||
# The release, in dist/: ProxySuite-<version>-windows-x64-setup.exe, the setup program, and
|
||||
# ProxySuite-<version>-windows-x64.zip, the same unpacked with install.cmd. Both hold the
|
||||
# programs (the service, proxy-ctl, the app), every component (fetched and verified), the
|
||||
# install scripts, the README and the licenses.
|
||||
#
|
||||
# nix develop --command tools/package.sh (needs curl, git, unzip, zip, pip, go; nix
|
||||
# for the app's shader compiler, tools/fxc-wine.sh)
|
||||
# nix develop --command tools/package.sh (needs curl, git, unzip, zip, pip, go, makensis;
|
||||
# nix for the app's shader compiler, tools/fxc-wine.sh)
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)
|
||||
NAME=ProxySuite-$VERSION-windows-x64
|
||||
DIST=dist/$NAME
|
||||
CACHE=${CACHE:-${XDG_CACHE_HOME:-$HOME/.cache}/proxy-suite-windows}
|
||||
# The sources tools/build-*.sh clone, kept for the next build.
|
||||
export SRC_CACHE=$CACHE/src
|
||||
rm -rf "$DIST" "dist/$NAME.zip"
|
||||
mkdir -p "$DIST/components"
|
||||
|
||||
@@ -30,6 +33,8 @@ GPUI_FXC_PATH="$PWD/tools/fxc-wine.sh" cargo xwin build -q --release -p ps-gui -
|
||||
for exe in proxy-suite-service proxy-ctl proxy-suite; do
|
||||
cp "target/x86_64-pc-windows-msvc/release/$exe.exe" "$DIST/"
|
||||
done
|
||||
# Its build only warns without its icon (cargo -q shows no warning): the release has it.
|
||||
llvm-readobj --coff-resources "$DIST/proxy-suite.exe" | grep 'Type: ICON' >/dev/null || { echo "proxy-suite.exe has no icon"; exit 1; }
|
||||
cp ../LICENSE README.md "$DIST/"
|
||||
cp tools/install.cmd tools/uninstall.cmd "$DIST/"
|
||||
|
||||
@@ -73,4 +78,11 @@ echo "== THIRD-PARTY.md"
|
||||
echo "== zip"
|
||||
(cd dist && zip -qr "$NAME.zip" "$NAME")
|
||||
(cd dist && sha256sum "$NAME.zip" | tee "$NAME.zip.sha256")
|
||||
du -h "dist/$NAME.zip"
|
||||
|
||||
echo "== setup"
|
||||
# Windows' file version takes four numbers: 0.2.0-pre.1 is 0.2.0.0.
|
||||
VERSION4=$(sed 's/-.*//' <<<"$VERSION").0
|
||||
rm -f "dist/$NAME-setup.exe"
|
||||
makensis -V2 -INPUTCHARSET UTF8 -DVERSION="$VERSION" -DVERSION4="$VERSION4" -DRELEASE="$PWD/$DIST" -DICON="$PWD/crates/ps-gui/assets/proxy-suite.ico" -DOUT="$PWD/dist/$NAME-setup.exe" tools/installer.nsi
|
||||
(cd dist && sha256sum "$NAME-setup.exe" | tee "$NAME-setup.exe.sha256")
|
||||
du -h "dist/$NAME.zip" "dist/$NAME-setup.exe"
|
||||
Executable
+85
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/env bash
|
||||
# The setup program under Wine: a silent install into Program Files (every file, the
|
||||
# components' manifests among them), the entry in Settings > Apps, the service registered and
|
||||
# answering over its pipe; the same setup again over the running install (an upgrade); then the
|
||||
# entry's quiet uninstall, after which the service, the files and the entry are gone.
|
||||
#
|
||||
# nix shell nixpkgs#wineWow64Packages.stable -c tools/wine-setup-test.sh dist/ProxySuite-<version>-windows-x64-setup.exe [RELEASE_DIR]
|
||||
#
|
||||
# RELEASE_DIR (the unpacked release the setup was made of): its files are compared with the
|
||||
# installed ones.
|
||||
set -euo pipefail
|
||||
SETUP=$(realpath "${1:?the setup program}")
|
||||
REL=${2:+$(realpath "$2")}
|
||||
WORK=$(mktemp -d)
|
||||
export WINEPREFIX=${WINEPREFIX:-$WORK/prefix} WINEDEBUG=-all
|
||||
trap 'wineserver -k 2>/dev/null || true; rm -rf "$WORK"' EXIT
|
||||
wineboot -i >/dev/null 2>&1 || true
|
||||
for key in Tcpip Tcpip6; do
|
||||
wine reg add "HKLM\\SYSTEM\\CurrentControlSet\\Services\\$key\\Parameters\\Interfaces" /f >/dev/null 2>&1
|
||||
done
|
||||
PF="$WINEPREFIX/drive_c/Program Files/ProxySuite"
|
||||
KEY='HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\ProxySuite'
|
||||
fail() { echo "FAIL: $*"; exit 1; }
|
||||
|
||||
state() { local st; st=$(wine sc query ProxySuite 2>/dev/null || true); st=${st//$'\r'/}; grep STATE <<<"$st" | grep -o '[A-Z_]*$' || echo NONE; }
|
||||
# Wine's manager often fails the first start right after a create (wine-install-test.sh says
|
||||
# more); a second start works.
|
||||
running() {
|
||||
local s last=""
|
||||
for _ in $(seq 60); do
|
||||
s=$(state)
|
||||
[ "$s" = "$last" ] || echo " $s"
|
||||
last=$s
|
||||
[ "$s" = RUNNING ] && return 0
|
||||
[ "$s" = STOPPED ] && { wine sc start ProxySuite >/dev/null 2>&1 || true; }
|
||||
sleep 3
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
echo "== setup /S"
|
||||
wine "$SETUP" /S && rc=0 || rc=$?
|
||||
echo " exit code $rc"
|
||||
[ "$rc" = 0 ] || fail "setup exited with $rc"
|
||||
[ -f "$PF/proxy-suite-service.exe" ] || fail "nothing in Program Files"
|
||||
ls "$PF" | sed 's/^/ /'
|
||||
if [ -n "$REL" ]; then
|
||||
# Every file of the release, dotfiles too (the components' .files.json and .version).
|
||||
missing=$(cd "$REL" && find . -type f | while read -r f; do [ -f "$PF/$f" ] || echo "$f"; done)
|
||||
[ -z "$missing" ] || fail "not installed: $missing"
|
||||
echo " every file of the release is there ($(cd "$REL" && find . -type f | wc -l))"
|
||||
fi
|
||||
ls "$PF"/components/*/.files.json >/dev/null || fail "no component manifests"
|
||||
|
||||
echo "== Settings > Apps"
|
||||
entry=$(wine reg query "$KEY" 2>/dev/null | tr -d '\r') || fail "no uninstall entry"
|
||||
sed 's/^/ /' <<<"$entry"
|
||||
for v in DisplayName DisplayVersion UninstallString QuietUninstallString InstallLocation EstimatedSize; do
|
||||
grep -q "$v" <<<"$entry" || fail "the entry has no $v"
|
||||
done
|
||||
|
||||
echo "== the service"
|
||||
running || fail "the service is $(state)"
|
||||
for _ in $(seq 30); do wine "$PF/proxy-ctl.exe" status >/dev/null 2>&1 && break; sleep 1; done
|
||||
wine "$PF/proxy-ctl.exe" components | tr -d '\r' | sed 's/^/ /' || fail "no answer over the pipe"
|
||||
|
||||
echo "== setup /S again, over the running install"
|
||||
wine "$SETUP" /S && rc=0 || rc=$?
|
||||
[ "$rc" = 0 ] || fail "the upgrade exited with $rc"
|
||||
running || fail "after the upgrade the service is $(state)"
|
||||
for _ in $(seq 30); do wine "$PF/proxy-ctl.exe" status >/dev/null 2>&1 && break; sleep 1; done
|
||||
wine "$PF/proxy-ctl.exe" status >/dev/null 2>&1 || fail "no answer after the upgrade"
|
||||
echo " upgraded, running, answering"
|
||||
|
||||
echo "== the entry's quiet uninstall"
|
||||
quiet=$(wine reg query "$KEY" /v QuietUninstallString | tr -d '\r' | sed -n 's/.*REG_SZ *//p')
|
||||
echo " $quiet"
|
||||
# Its command line, as Windows would run it: the quoted program, then its argument.
|
||||
prog=${quiet#\"}; prog=${prog%%\"*}
|
||||
wine "$prog" uninstall
|
||||
sleep 6
|
||||
[ "$(state)" = NONE ] || fail "the service is still there: $(state)"
|
||||
wine reg query "$KEY" >/dev/null 2>&1 && fail "the entry is still there"
|
||||
[ ! -e "$PF" ] || fail "Program Files\\ProxySuite is still there: $(ls "$PF")"
|
||||
echo "OK: installed, upgraded and removed by the setup program and its entry"
|
||||
Reference in new issue
Block a user