summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@win>2020-10-15 18:12:46 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-10-23 23:22:55 +0200
commit4ac0fd8ecfa1bf0aa394c38d5b7f4f60ca23842b (patch)
tree83d6b353c38cd03f96f274382a034833be08b997
parenta540f3f4e5524b5daf813b0bb831707f58545d43 (diff)
[pkg] install tap driver on windows
-rw-r--r--Makefile4
-rw-r--r--branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js5
-rw-r--r--docs/build.windows.rst4
3 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9faf55c..5de5d44 100644
--- a/Makefile
+++ b/Makefile
@@ -36,6 +36,8 @@ MACDEPLOYQT_OPTS = -appstore-compliant -qmldir=gui/qml -always-overwrite
SCRIPTS = branding/scripts
TEMPLATES = branding/templates
+TAP_WINDOWS = https://build.openvpn.net/downloads/releases/tap-windows-9.24.2-I601-Win10.exe
+
ifeq ($(PLATFORM), windows)
HAS_QTIFW := $(shell which binarycreator.exe)
else
@@ -131,6 +133,8 @@ ifeq (${PLATFORM}, windows)
@cp "/c/Program Files/OpenVPN/bin/"*.dll ${INST_DATA}
# XXX add sign options
@windeployqt --qmldir gui/qml ${INST_DATA}${TARGET}.exe
+ # TODO stage it to save time
+ @wget ${TAP_WINDOWS} -O ${INST_DATA}/tap-windows.exe
endif
ifeq (${PLATFORM}, linux)
@VERSION=${VERSION} ${SCRIPTS}/gen-qtinstaller linux ${INSTALLER}
diff --git a/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js b/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js
index d69f262..63ba10d 100644
--- a/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js
+++ b/branding/templates/qtinstaller/packages/bitmaskvpn/meta/install.js
@@ -91,9 +91,12 @@ Component.prototype.installationFinished = function()
}
function postInstallWindows() {
+ console.log("Trying to install OpenVPN tap driver");
+ component.addElevatedOperation("Execute", "@TargetDir@/tap-windows.exe"); /* TODO uninstall? */
+ console.log("Now trying to installer our helper");
component.addElevatedOperation("Execute", "@TargetDir@/helper.exe", "install", "UNDOEXECUTE", "@TargetDir@/helper.exe", "remove");
component.addElevatedOperation("Execute", "@TargetDir@/helper.exe", "start", "UNDOEXECUTE", "@TargetDir@/helper.exe", "stop");
- console.log("Adding shortcut entries");
+ console.log("Adding shortcut entries/...");
component.addElevatedOperation("Mkdir", "@StartMenuDir@");
component.addElevatedOperation("CreateShortcut", "@TargetDir@/$BINNAME.exe", "@StartMenuDir@/$APPNAME.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/icon.ico", "description=Start $APPNAME");
diff --git a/docs/build.windows.rst b/docs/build.windows.rst
index 1e8364d..818f813 100644
--- a/docs/build.windows.rst
+++ b/docs/build.windows.rst
@@ -2,9 +2,9 @@ windows build
=============
The build currently expects MINGW64 environment, on a native windows host.
-A cross-compiling procedure (at least for the application binaries) should be possible in the near future, using mxe.
+A cross-compiling procedure (at least for the application binaries) should be possible in the near future, using mxe. (There's already some support for it in `gui/build.sh`).
-You should install make, as well as a recent Qt5 version (for instance, with chocolatey: choco install make).
+You should instal: make, wget, as well as a recent Qt5 version (for instance, with chocolatey: choco install make && choco install wget).
(In order to avoid makefiles, you are welcome to submit a port of the build scripts using powershell or cscript - see the build.wsf script in openvpn-build for inspiration).