Unverified Commit ba05fbef authored by Kali Kaneko's avatar Kali Kaneko Committed by meskio

[pkg] fix windows paths after testing

parent 1106467f
......@@ -45,7 +45,8 @@ prepare: generate relink_default
cp branding/templates/makefile/Makefile build/${PROVIDER}/Makefile
VERSION=${VERSION} PROVIDER_CONFIG=${PROVIDER_CONFIG} branding/scripts/generate-vendor-make.py build/${PROVIDER}/vendor.mk
branding/scripts/check-ca-crt.py ${PROVIDER} ${PROVIDER_CONFIG}
-@make icon
# FIXME trouble in win - better get into repo
#-@make icon
prepare_win:
mkdir -p build/${PROVIDER}/windows/
......
......@@ -50,28 +50,26 @@ openvpn_cross_win:
cp $(STAGING)/openvpn/bin/openvpn.exe $(STAGING)/openvpn
cp $(STAGING)/openvpn/bin/*.dll $(STAGING)
cp $(STAGING)/openvpn/lib/engines-1_1/*.dll $(STAGING)
helper_win:
go build -ldflags "-s -w" -o $(STAGING)/$(HELPER_BIN).exe $(SYSTRAY)/cmd/bitmask-helper
systray_win:
go get -u $(SYSTRAY)/cmd/bitmask-vpn
powershell '$$gopath=go env GOPATH;$$version=git -C $$gopath/src/$(SYSTRAY) describe --tags; go build -ldflags "-H windowsgui -s -w -X main.version=$$version" -o $(STAGING)/$(SYSTRAY_BIN).exe $(SYSTRAY)/cmd/bitmask-vpn'
build_win: staging\nssm.exe helper_win systray_win
# since it's tedious, I assume you did bootstrap openvpn_win manually already.
# TODO no need to build systray in windows, but move this powershell hack to main build makefile
#powershell '$$gopath=go env GOPATH;$$version=git -C $$gopath/src/$(SYSTRAY) describe --tags; go build -ldflags "-H windowsgui -s -w -X main.version=$$version" -o $(STAGING)/$(SYSTRAY_BIN).exe $(SYSTRAY)/cmd/bitmask-vpn'
package_win: staging\nssm.exe helper_win systray_win
# I assume you did bootstrap openvpn_win manually already.
echo "[+] building windows"
if not exist dist mkdir dist
powershell '$$gopath=go env GOPATH;$$version=git -C $$gopath/src/$(SYSTRAY) describe --tags; $(MAKE) -C win VERSION=$$version'
"C:\Program Files (x86)\NSIS\makensis.exe" win/RiseupVPN-installer.nsi
"C:\Program Files (x86)\NSIS\makensis.exe" windows/$(APPNAME)-installer.nsi
sign_win:
echo "[+] signing windows build"
python win/sign.py $(WIN_CERT_PATH) $(WIN_CERT_PASS)
python windowns/sign.py $(WIN_CERT_PATH) $(WIN_CERT_PASS)
# TODO move to main build makefile
build_cross_win: staging/nssm.exe
echo "!define VERSION $(VERSION)" > $(STAGING)/version.nsh
$(CROSS_FLAGS) $(MAKE) helper_win
$(CROSS_FLAGS) go get $(SYSTRAY)/cmd/bitmask-vpn
$(CROSS_FLAGS) go build -ldflags "-H windowsgui -s -w -X main.version=$(VERSION)" -o $(STAGING)/$(SYSTRAY_BIN).exe $(SYSTRAY)/cmd/bitmask-vpn
mkdir -p dist
make -C win VERSION=$(VERSION)
makensis win/RiseupVPN-installer.nsi
makensis win/$(APPNAME)-installer.nsi
# -----------------------------------------------------------------------------
# OSX
......
......@@ -8,6 +8,6 @@ libpkcs11-helper-1.dll
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
padlock.dll
bitmask_helper.exe
bitmask-helper.exe
bitmask-vpn.exe
tap-windows.exe
......@@ -4,7 +4,7 @@ SetCompressor /SOLID lzma
!include "MUI2.nsh"
Name "$applicationName"
Outfile "..\bin\$applicationName-$version.exe"
Outfile "..\dist\$applicationName-$version.exe"
;TODO make the installdir configurable - and set it in the registry.
InstallDir "C:\Program Files\$applicationName\"
RequestExecutionLevel admin
......@@ -87,7 +87,7 @@ SectionEnd
Section "InstallService"
; Easy service management thanks to nssm
ExecWait '"$INSTDIR\nssm.exe" install $applicationNameLower-helper "$INSTDIR\bitmask_helper.exe"'
ExecWait '"$INSTDIR\nssm.exe" install $applicationNameLower-helper "$INSTDIR\bitmask-helper.exe"'
ExecWait '"$INSTDIR\nssm.exe" set $applicationNameLower-helper AppDirectory "$INSTDIR"'
ExecWait '"$INSTDIR\nssm.exe" start $applicationNameLower-helper'
SectionEnd
......
......@@ -15,7 +15,7 @@
package main
//go:generate ../../branding/scripts/vendorize.py ../../branding/templates/bitmaskvpn/config.go ../../branding/config/vendor.conf ../../pkg/config/config.go
//go:generate python3 ../../branding/scripts/vendorize.py ../../branding/templates/bitmaskvpn/config.go ../../branding/config/vendor.conf ../../pkg/config/config.go
import (
"flag"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment