diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-05-01 14:45:13 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-05-04 14:59:17 +0200 |
commit | fe34e6b7447059f25c6c6cbc00d70e597c0e2d37 (patch) | |
tree | fb86c9a453a3d17e1fe111564fa8f48a6b3465a1 /gui | |
parent | 161a9cf7f4acf14090224b85997f8651e45a144b (diff) |
[pkg] build snap from scratch
this is mainly a workaround for #497
Diffstat (limited to 'gui')
-rwxr-xr-x | gui/build.sh | 28 | ||||
-rw-r--r-- | gui/providers/providers.json | 2 | ||||
-rw-r--r-- | gui/qml/main.qml | 17 |
3 files changed, 31 insertions, 16 deletions
diff --git a/gui/build.sh b/gui/build.sh index 0a6e681..56e3d66 100755 --- a/gui/build.sh +++ b/gui/build.sh @@ -6,6 +6,7 @@ set -e # -------------------- XBUILD=${XBUILD-no} +LRELEASE=${LRELEASE-lrelease} VENDOR_PATH=${VENDOR_PATH-providers/riseup} OSX_TARGET=10.11 @@ -18,6 +19,7 @@ SOURCE_GOLIB=gui/backend.go QTBUILD=build/qt RELEASE=$QTBUILD/release +DEBUGP=$QTBUILD/debug PLATFORM=$(uname -s) LDFLAGS="" @@ -75,29 +77,37 @@ function buildQmake { echo "[+] Now building Qml app with Qt qmake" echo "[+] Using qmake in:" $QMAKE mkdir -p $QTBUILD - $QMAKE -o "$QTBUILD/Makefile" CONFIG-=debug CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT + $QMAKE -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT + #CONFIG=+force_debug_info CONFIG+=debug CONFIG+=debug_and_release } function renameOutput { # i would expect that passing QMAKE_TARGET would produce the right output, but nope. if [ "$PLATFORM" == "Linux" ] then - mv $RELEASE/bitmask $RELEASE/$TARGET - strip $RELEASE/$TARGET - echo "[+] Binary is in" $RELEASE/$TARGET + if [ "$DEBUG" == "1" ] + then + echo "[+] Selecting DEBUG build" + mv $DEBUGP/bitmask $RELEASE/$TARGET + else + echo "[+] Selecting RELEASE build" + mv $RELEASE/bitmask $RELEASE/$TARGET + strip $RELEASE/$TARGET + fi + echo "[+] Binary is in" $RELEASE/$TARGET elif [ "$PLATFORM" == "Darwin" ] then - rm -rf $RELEASE/$TARGET.app - mv $RELEASE/bitmask.app/ $RELEASE/$TARGET.app/ - echo "[+] App is in" $RELEASE/$TARGET + rm -rf $RELEASE/$TARGET.app + mv $RELEASE/bitmask.app/ $RELEASE/$TARGET.app/ + echo "[+] App is in" $RELEASE/$TARGET else # for MINGWIN or CYGWIN - mv $RELEASE/bitmask.exe $RELEASE/$TARGET.exe + mv $RELEASE/bitmask.exe $RELEASE/$TARGET.exe fi } function buildDefault { echo "[+] Building BitmaskVPN" - lrelease bitmask.pro + $LRELEASE bitmask.pro if [ "$BUILD_GOLIB" == "yes" ] then buildGoLib diff --git a/gui/providers/providers.json b/gui/providers/providers.json index d0d3a62..0de5900 100644 --- a/gui/providers/providers.json +++ b/gui/providers/providers.json @@ -15,7 +15,7 @@ "apiURL": "https://api.black.riseup.net/", "geolocationAPI": "https://api.black.riseup.net:9001/json", "caCertString": "-----BEGIN CERTIFICATE-----\nMIIFjTCCA3WgAwIBAgIBATANBgkqhkiG9w0BAQ0FADBZMRgwFgYDVQQKDA9SaXNl\ndXAgTmV0d29ya3MxGzAZBgNVBAsMEmh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UE\nAwwXUmlzZXVwIE5ldHdvcmtzIFJvb3QgQ0EwHhcNMTQwNDI4MDAwMDAwWhcNMjQw\nNDI4MDAwMDAwWjBZMRgwFgYDVQQKDA9SaXNldXAgTmV0d29ya3MxGzAZBgNVBAsM\nEmh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UEAwwXUmlzZXVwIE5ldHdvcmtzIFJv\nb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC76J4ciMJ8Sg0m\nTP7DF2DT9zNe0Cs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h95qn+lG6/2jk7\n3AmihLOKYMlPwPakJg4PYczm3icFLgTpjV5sq2md9bRyAg3oPGfAuWHmKj2Ikqch\nTd5CHKGxEEWbGUWEMP0s1A/JHWiCbDigc4Cfxhy56CWG4q0tYtnc2GMw8OAUO6Wf\nXu5pYKNkzKSEtT/MrNJt44tTZWbKV/Pi/N2Fx36my7TgTUj7g3xcE9eF4JV2H/sg\ntsK3pwE0FEqGnT4qMFbixQmc8bGyuakr23wjMvfO7eZUxBuWYR2SkcP26sozF9PF\ntGhbZHQVGZUTVPyvwahMUEhbPGVerOW0IYpxkm0x/eaWdTc4vPpf/rIlgbAjarnJ\nUN9SaWRlWKSdP4haujnzCoJbM7dU9bjvlGZNyXEekgeT0W2qFeGGp+yyUWw8tNsp\n0BuC1b7uW/bBn/xKm319wXVDvBgZgcktMolak39V7DVO\n-----END CERTIFICATE-----", - "timeStamp": "2021-02-08 23:57:09" + "timeStamp": "2021-05-04 12:59:11" } ] }
\ No newline at end of file diff --git a/gui/qml/main.qml b/gui/qml/main.qml index cc984f0..5ea3c27 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -1,12 +1,11 @@ import QtQuick 2.9 -import QtQuick.Window 2.2 -import QtQuick.Dialogs 1.2 +import QtQuick.Dialogs 1.2 // TODO use native dialogs in labs.platform import QtQuick.Layouts 1.12 -import QtQuick.Controls 2.12 +import QtQuick.Controls 2.4 import Qt.labs.platform 1.0 -Window { +ApplicationWindow { id: app visible: true width: 500 @@ -20,6 +19,11 @@ Window { property var loginDone property var allowEmptyPass + onSceneGraphError: function(error, msg) { + console.debug("ERROR while initializing scene") + console.debug(msg) + } + // TODO get a nice background color for this mainwindow. It should be customizable. // TODO refactorize all this mess into discrete components. TabBar { @@ -165,6 +169,7 @@ Window { backend.useLocation(currentText.toString()) } + delegate: ItemDelegate { // TODO: we could use icons // https://doc.qt.io/qt-5/qml-qtquick-controls2-abstractbutton.html#icon-prop @@ -482,10 +487,10 @@ Window { systray.icon.source = icons["off"] tooltip = qsTr("Checking status…") console.debug("systray init completed") - hide() + //hide() if (systrayVisible) { console.log("show systray") - show() + //show() if (Qt.platform.os === "windows") { let appname = ctx ? ctx.appName : "VPN" showNotification( |