Skip to content
Snippets Groups Projects
Unverified Commit a540f3f4 authored by kali's avatar kali Committed by Kali Kaneko
Browse files

[pkg] windows gui & installer fixes

parent 0176694c
No related branches found
No related tags found
No related merge requests found
......@@ -73,11 +73,15 @@ EXTRA_FLAGS =
endif
ifeq ($(PLATFORM), windows)
EXTRA_GO_LDFLAGS = "-H windowsgui"
EXTRA_GO_LDFLAGS = "-H=windowsgui"
endif
ifeq ($(PLATFORM), windows)
PKGFILES = $(wildcard "pkg/*") # syntax err in windows with find
else
PKGFILES = $(shell find pkg -type f -name '*.go')
endif
lib/%.a: $(PKGFILES)
@./gui/build.sh --just-golib
......@@ -118,9 +122,9 @@ ifeq (${PLATFORM}, darwin)
@cp -r "${QTBUILD}/release/${TARGET}.app"/ ${INST_DATA}/
endif
ifeq (${PLATFORM}, windows)
@VERSION=${VERSION} ${SCRIPTS}/gen-qtinstaller windows ${INSTALLER}
@VERSION=${VERSION} VENDOR_PATH=${VENDOR_PATH} ${SCRIPTS}/gen-qtinstaller windows ${INSTALLER}
@cp build/bin/${PLATFORM}/bitmask-helper ${INST_DATA}helper.exe
@cp branding/assets/${PROVIDER}/icon.ico ${INST_DATA}/icon.ico
@cp ${VENDOR_PATH}/${PROVIDER}/assets/icon.ico ${INST_DATA}/icon.ico
@cp ${QTBUILD}/release/${TARGET}.exe ${INST_DATA}${TARGET}.exe
# FIXME get the signed binaries with curl from openvpn downloads page - see if we have to adapt the openvpn-build to install tap drivers etc from our installer.
@cp "/c/Program Files/OpenVPN/bin/openvpn.exe" ${INST_DATA}
......@@ -146,13 +150,13 @@ endif
CROSS_WIN_FLAGS = CGO_ENABLED=1 GOARCH=386 GOOS=windows CC="/usr/bin/i686-w64-mingw32-gcc" CGO_LDFLAGS="-lssp" CXX="i686-w64-mingw32-c++"
PLATFORM_WIN = PLATFORM=windows
EXTRA_LDFLAGS_WIN = EXTRA_LDFLAGS="-H windowsgui"
EXTRA_LDFLAGS_WIN = EXTRA_LDFLAGS="-H=windowsgui"
build_cross_win:
@echo "[+] Cross-building for windows..."
@$(CROSS_WIN_FLAGS) $(PLATFORM_WIN) $(EXTRA_LDFLAGS_WIN) $(MAKE) _buildparts
# workaround for helper: we use the go compiler
@echo "[+] Compiling helper with the Go compiler to work around missing stdout bug..."
cd cmd/bitmask-helper && GOOS=windows GOARCH=386 go build -ldflags "-X main.version=`git describe --tags` -H windowsgui" -o ../../build/bin/windows/bitmask-helper-go
cd cmd/bitmask-helper && GOOS=windows GOARCH=386 go build -ldflags "-X main.version=`git describe --tags` -H=windowsgui" -o ../../build/bin/windows/bitmask-helper-go
CROSS_OSX_FLAGS = MACOSX_DEPLOYMENT_TARGET=10.10 CGO_ENABLED=1 GOOS=darwin CC="o64-clang"
PLATFORM_OSX = PLATFORM=darwin
......
......@@ -14,7 +14,7 @@
</RemoteRepositories>
-->
<MaintenanceToolName>Uninstall-$APPNAME</MaintenanceToolName>
<MaintenanceToolName>uninstall</MaintenanceToolName>
$PLATFORM_BLOCK
......
windows build notes (still some manual steps needed, this should be further automated).
=======================================================================================
(deprecated)
PROVIDER=DemoLib make helper
INSTALLER_DATA=branding/qtinstaller/packages/root.win_x86_64/data/
mkdir -p INSTALLER_DATA
mv main.exe ${INSTALLER_DATA}/helper.exe
TARGET=demolib-vpn make build
TARGET=demolib-vpn make installer_win
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.
You should install make, as well as a recent Qt5 version (for instance, with chocolatey: choco install make).
(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).
For the installer, install QtIFW for windows (tested with version 3.2.2).
Assuming you have the vendor path in place and correctly configured, all you need to do is `make build_installer`::
export PATH="/c/Qt/Qt5/bin/":"/c/Qt/QtIFW-3.2.2/bin":$PATH
VENDOR_PATH=providers/
make build_installer
......@@ -88,28 +88,13 @@ ApplicationWindow {
Component.onCompleted: {
loginDone = false;
console.debug("Platform:", Qt.platform.os);
console.debug("DEBUG: Pre-seeded providers:");
console.debug(providers.getJson());
allowEmptyPass = shouldAllowEmptyPass();
allowEmptyPass = shouldAllowEmptyPass()
console.debug("DEBUG platform":, Qt.platform.os)
if ("osx" == Qt.platform.os || "linux" == Qt.platform.os ) {
app.visible = false;
}
if ("windows" == Qt.platform.os) {
/* FIXME stupid as it sounds, windows doesn't like to have the systray icon
not being attached to an actual application window??
We can still use this quirk, and can use the AppWindow with deferred
Loaders as a placeholder for all the many dialogs, or to load
a nice splash screen etc... */
app.visible = true;
app.show();
app.hide();
}
/* TODO get appVisible flag from backend */
app.visible = false;
}
function toHuman(st) {
......
......@@ -29,7 +29,7 @@ func ConfigureLogger(logPath string) (io.Closer, error) {
if os.IsNotExist(err) {
err := os.MkdirAll(dir, 0700)
if err == nil {
log.Println("ERROR: cannot create data dir")
log.Println("ERROR: cannot create data dir:", dir)
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment