summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2020-07-21 21:41:53 +0200
committerRuben Pollan <meskio@sindominio.net>2020-10-13 19:08:35 +0200
commitf1fc8004fa91f227c544662101a198377cbbb386 (patch)
treedd42b31b4272f8a870f248b2cc9188487c3b90a8
parent75d723cf167136a18342402a9a6e82e51c13b700 (diff)
[pkg] add app payload in osx
-rw-r--r--Makefile52
-rw-r--r--installer/bitmask-installer.pro13
-rw-r--r--installer/packages/riseupvpn/data/README.txt4
3 files changed, 43 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index f4ab19c..2ea9458 100644
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,6 @@ depends:
dependsLinux:
@sudo apt install golang pkg-config dh-golang golang-golang-x-text-dev cmake devscripts fakeroot debhelper curl g++ qt5-qmake qttools5-dev-tools qtdeclarative5-dev qml-module-qtquick-controls libqt5qml5 qtdeclarative5-dev qml-module-qt-labs-platform qml-module-qt-labs-qmlmodels qml-module-qtquick-extras qml-module-qtquick-dialogs
-
@make -C docker deps
@# debian needs also: snap install snapcraft --classic; snap install multipass --beta --classic
@@ -54,14 +53,17 @@ dependsDarwin:
@brew install python3 golang make pkg-config curl
@brew install --default-names gnu-sed
-build: build_helper
- @gui/build.sh
+golib:
+ CGO_ENABLED=1 go build -buildmode=c-archive -o ${TARGET_GOLIB} ${SOURCE_GOLIB}
build_helper:
@echo "PLATFORM: ${PLATFORM}"
@mkdir -p build/bin/${PLATFORM}
go build -o build/bin/${PLATFORM}/bitmask-helper -ldflags "-X main.AppName=${PROVIDER}VPN -X main.Version=${VERSION}" ./cmd/bitmask-helper/
+build: build_helper
+ @gui/build.sh
+
build_old:
ifeq (${XBUILD}, yes)
$(MAKE) build_cross_win
@@ -77,28 +79,13 @@ else
@gui/build.sh
endif
+build_installer: build
+ # TODO check for binarycreator in path
+ cp -r qtbuild/release/${PROVIDER}-vpn.app installer/packages/${PROVIDER}vpn/data/
+ cp build/bin/${PLATFORM}/bitmask-helper installer/packages/${PROVIDER}vpn/data/
+ cd installer && qmake && make
-build_old_%:
- @echo "PLATFORM: ${PLATFORM}"
- @mkdir -p build/bin/${PLATFORM}
- go build -tags $(TAGS) -ldflags "-s -w -X main.version=`git describe --tags` ${EXTRA_LDFLAGS}" -o build/bin/${PLATFORM}/$* ./cmd/$*
- -@rm -rf build/${PROVIDER}/staging/${PLATFORM} && mkdir -p build/${PROVIDER}/staging/${PLATFORM}
- -@ln -s ../../../bin/${PLATFORM}/$* build/${PROVIDER}/staging/${PLATFORM}/$*
-
-test:
- @go test -tags "integration $(TAGS)" ./pkg/...
-
-golib:
- CGO_ENABLED=1 go build -buildmode=c-archive -o ${TARGET_GOLIB} ${SOURCE_GOLIB}
-
-test_ui: golib
- @qmake -o tests/Makefile test.pro
- @make -C tests clean
- @make -C tests
- @./tests/build/test_ui
-
-build_win:
- powershell -Command '$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*'
+# ----------- FIXME ------- old build, reuse or delete -----------------------------
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
@@ -123,6 +110,8 @@ _build_xbuild_done:
@echo
@echo 'Done. You can do "make packages" now.'
+# --------- FIXME -----------------------------------------------------------------------
+
clean:
@rm -rf build/
@unlink branding/assets/default
@@ -134,6 +123,21 @@ clean:
build_all_providers:
branding/scripts/build-all-providers
+########################################################################
+# tests
+#########################################################################
+
+
+test:
+ @go test -tags "integration $(TAGS)" ./pkg/...
+
+test_ui: golib
+ @qmake -o tests/Makefile test.pro
+ @make -C tests clean
+ @make -C tests
+ @./tests/build/test_ui
+
+
#########################################################################
# packaging templates
#########################################################################
diff --git a/installer/bitmask-installer.pro b/installer/bitmask-installer.pro
index c526283..c91a618 100644
--- a/installer/bitmask-installer.pro
+++ b/installer/bitmask-installer.pro
@@ -17,5 +17,16 @@ OTHER_FILES += \
packages/riseupvpn/meta/package.xml \
packages/riseupvpn/meta/install.js \
packages/riseupvpn/data/README.txt \
- packages/riseupvpn/data/riseup-vpn
+macx {
+ OTHER_FILES += "packages/riseupvpn/data/riseup-vpn.app"
+ OTHER_FILES += "packages/riseupvpn/data/bitmask-helper"
+}
+linux {
+ OTHER_FILES += "packages/riseupvpn/data/riseup-vpn"
+ OTHER_FILES += "packages/riseupvpn/data/bitmask-helper"
+}
+win32{
+ OTHER_FILES += "packages/riseupvpn/data/riseup-vpn.exe"
+ OTHER_FILES += "packages/riseupvpn/data/helper.exe"
+}
diff --git a/installer/packages/riseupvpn/data/README.txt b/installer/packages/riseupvpn/data/README.txt
index 616eb29..c71984f 100644
--- a/installer/packages/riseupvpn/data/README.txt
+++ b/installer/packages/riseupvpn/data/README.txt
@@ -1 +1,3 @@
-RiseupVPN README
+This is the RiseupVPN README.
+It should be replaced with something more meaningful
+(give links to issue tracker, repos, uninstaller etc).