summaryrefslogtreecommitdiff
path: root/branding/templates/qtinstaller/packages
diff options
context:
space:
mode:
authorkali <kali@leap.se>2020-12-02 21:46:06 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-02-08 23:32:12 +0100
commitf5e7a5d2cab5fc3cfca8c5f75e57090cda27c4e1 (patch)
tree256ab35abca7e1995a0fb349167ddf86ca37fa51 /branding/templates/qtinstaller/packages
parentee566492264882b5024876180113d4800a29dbda (diff)
[pkg] add uninstaller to pre-install in osx
Diffstat (limited to 'branding/templates/qtinstaller/packages')
-rw-r--r--branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js b/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js
index 0b065d6..407ea39 100644
--- a/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js
+++ b/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js
@@ -70,6 +70,7 @@ Component.prototype.createOperations = function ()
if (systemInfo.productType === "windows") {
postInstallWindows();
} else if (systemInfo.productType === "osx") {
+ preInstallOSX();
postInstallOSX();
} else {
postInstallLinux();
@@ -91,6 +92,7 @@ Component.prototype.installationFinished = function()
}
function postInstallWindows() {
+ // TODO - check if we're on Windows10 or older, and use the needed tap-windows installer accordingly.
console.log("Installing OpenVPN tap driver");
component.addElevatedOperation("Execute", "@TargetDir@/tap-windows.exe", "/S", "/SELECT_UTILITIES=1"); /* TODO uninstall? */
console.log("Now trying to install our helper");
@@ -108,6 +110,16 @@ function postInstallWindows() {
);
}
+function preInstallOSX() {
+ console.log("Pre-installation for OSX");
+ // TODO use installer filepath??
+ component.addElevatedOperation(
+ "Execute", "{0}",
+ "@TargetDir@/uninstall.py", "pre",
+ "errormessage=There was an error during the pre-installation script, things might be broken. Please report this error and attach the pre-install.log file."
+ );
+}
+
function postInstallOSX() {
console.log("Post-installation for OSX");
component.addElevatedOperation(