mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
Cleanup berfore uninstall, post-uninstall refactoring
This commit is contained in:
@@ -70,7 +70,6 @@ rem if not exist "%OUT_APP_DIR:"=%\%APP_FILENAME:"=%" break
|
||||
echo "Deploying..."
|
||||
|
||||
copy "%WORK_DIR:"=%\service\server\release\%APP_NAME:"=%-service.exe" %OUT_APP_DIR%
|
||||
copy "%WORK_DIR:"=%\platform\post-uninstall\release\post-uninstall.exe" %OUT_APP_DIR%
|
||||
|
||||
echo "Signing exe"
|
||||
cd %OUT_APP_DIR%
|
||||
@@ -84,8 +83,6 @@ echo "Copying deploy data..."
|
||||
xcopy %DEPLOY_DATA_DIR% %OUT_APP_DIR% /s /e /y /i /f
|
||||
copy "%WORK_DIR:"=%\service\wireguard-service\release\wireguard-service.exe" %OUT_APP_DIR%\wireguard\
|
||||
|
||||
del %OUT_APP_DIR%\botand.dll
|
||||
|
||||
cd %SCRIPT_DIR%
|
||||
xcopy %SCRIPT_DIR:"=%\installer %RELEASE_DIR:"=%\installer /s /e /y /i /f
|
||||
mkdir %INSTALLER_DATA_DIR%
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
set AmneziaPath=%~dp0
|
||||
echo %AmneziaPath%
|
||||
|
||||
"%AmneziaPath%\AmneziaVPN.exe" -c
|
||||
timeout /t 1
|
||||
sc stop AmneziaVPN-service
|
||||
sc delete AmneziaVPN-service
|
||||
@@ -0,0 +1,7 @@
|
||||
set AmneziaPath=%~dp0
|
||||
echo %AmneziaPath%
|
||||
|
||||
"%AmneziaPath%\AmneziaVPN.exe" -c
|
||||
timeout /t 1
|
||||
sc stop AmneziaVPN-service
|
||||
sc delete AmneziaVPN-service
|
||||
@@ -84,10 +84,11 @@ Component.prototype.createOperations = function()
|
||||
console.log("Microsoft Visual C++ 2017 Redistributable already installed");
|
||||
}
|
||||
|
||||
let pu_path = installer.value("TargetDir").replace(/\//g, '\\') + "\\"
|
||||
component.addElevatedOperation("Execute",
|
||||
["sc", "create", serviceName(), "binpath=", installer.value("TargetDir").replace(/\//g, '\\') + "\\" + serviceName() + ".exe",
|
||||
["sc", "create", serviceName(), "binpath=", pu_path + serviceName() + ".exe",
|
||||
"start=", "auto", "depend=", "BFE/nsi"],
|
||||
"UNDOEXECUTE", ["post-uninstall.exe"]);
|
||||
"UNDOEXECUTE", "cmd", "/c", pu_path + "post_uninstall.cmd");
|
||||
|
||||
} else if (runningOnMacOS()) {
|
||||
component.addElevatedOperation("Execute", "@TargetDir@/post_install.sh", "UNDOEXECUTE", "@TargetDir@/post_uninstall.sh");
|
||||
|
||||
Reference in New Issue
Block a user