summaryrefslogtreecommitdiff
path: root/installer/packages/riseupvpn/meta
diff options
context:
space:
mode:
Diffstat (limited to 'installer/packages/riseupvpn/meta')
-rw-r--r--installer/packages/riseupvpn/meta/install.js51
-rw-r--r--installer/packages/riseupvpn/meta/package.xml11
2 files changed, 62 insertions, 0 deletions
diff --git a/installer/packages/riseupvpn/meta/install.js b/installer/packages/riseupvpn/meta/install.js
new file mode 100644
index 0000000..e5174e1
--- /dev/null
+++ b/installer/packages/riseupvpn/meta/install.js
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 LEAP
+**
+****************************************************************************/
+
+function Component() {
+}
+
+Component.prototype.createOperations = function ()
+{
+ // This will actually install the files
+ component.createOperations();
+
+ // And now our custom actions.
+ // See https://doc.qt.io/qtinstallerframework/operations.html for reference
+ //
+ // We can also use this to register different components (different architecture for instance)
+ // See https://doc.qt.io/qtinstallerframework/qt-installer-framework-systeminfo-packages-root-meta-installscript-qs.html
+
+ console.log("Post installation. Checking platform...")
+ if (systemInfo.productType === "windows") {
+ console.log("Platform: windows");
+ postInstallWindows();
+ } else if (systemInfo.productType === "osx") {
+ console.log("Platform: osx");
+ postInstallOSX();
+ } else {
+ console.log("Platform: linux");
+ postInstallLinux();
+ }
+}
+
+function postInstallWindows() {
+ component.addOperation("CreateShortcut",
+ "@TargetDir@/README.txt",
+ "@StartMenuDir@/README.lnk",
+ "workingDirectory=@TargetDir@",
+ "iconPath=%SystemRoot%/system32/SHELL32.dll",
+ "iconId=2");
+}
+
+function postInstallOSX() {
+ console.log("TODO: should do osx post-installation");
+}
+
+function postInstallLinux() {
+ console.log("TODO: should do linux post-installation");
+ console.log("Maybe you want to use your package manager instead?");
+ component.addOperation("AppendFile", "/tmp/riseupvpn.log", "this is a test - written from the installer");
+}
diff --git a/installer/packages/riseupvpn/meta/package.xml b/installer/packages/riseupvpn/meta/package.xml
new file mode 100644
index 0000000..4dd7ae9
--- /dev/null
+++ b/installer/packages/riseupvpn/meta/package.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Package>
+ <DisplayName>RiseupVPN</DisplayName>
+ <Description>RiseupVPN</Description>
+ <Version>0.20.6-1</Version>
+ <ReleaseDate>2020-07-01</ReleaseDate>
+ <Default>false</Default>
+ <RequiresAdminRights>true</RequiresAdminRights>
+ <Script>install.js</Script>
+ <ForcedInstallation>true</ForcedInstallation>
+</Package>