summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-05-01 14:45:13 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-05-04 14:59:17 +0200
commitfe34e6b7447059f25c6c6cbc00d70e597c0e2d37 (patch)
treefb86c9a453a3d17e1fe111564fa8f48a6b3465a1
parent161a9cf7f4acf14090224b85997f8651e45a144b (diff)
[pkg] build snap from scratch
this is mainly a workaround for #497
-rw-r--r--Makefile4
-rw-r--r--bitmask.pro5
-rw-r--r--branding/templates/snap/snapcraft-template.yaml222
-rwxr-xr-xgui/build.sh28
-rw-r--r--gui/providers/providers.json2
-rw-r--r--gui/qml/main.qml17
6 files changed, 218 insertions, 60 deletions
diff --git a/Makefile b/Makefile
index 09ffc1d..b9ddda5 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,8 @@
XBUILD ?= no
RELEASE ?= no
+QMAKE ?= qmake
+LRELEASE ?= lrelease
SKIP_CACHECK ?= no
VENDOR_PATH ?= providers
APPNAME ?= $(shell VENDOR_PATH=${VENDOR_PATH} branding/scripts/getparam appname | tail -n 1)
@@ -138,7 +140,7 @@ build_gui: relink_vendor
@echo "==============BUILD GUI==============="
@echo "TARGET: ${TARGET}"
@echo "VENDOR_PATH: ${VENDOR_PATH}"
- @XBUILD=no TARGET=${TARGET} VENDOR_PATH=${VENDOR_PATH} gui/build.sh --skip-golib
+ @XBUILD=no QMAKE=${QMAKE} LRELEASE=${LRELEASE} TARGET=${TARGET} VENDOR_PATH=${VENDOR_PATH} gui/build.sh --skip-golib
@echo "============BUILD GUI================="
build: build_golib build_helper build_gui
diff --git a/bitmask.pro b/bitmask.pro
index 32c701d..4a091cc 100644
--- a/bitmask.pro
+++ b/bitmask.pro
@@ -1,6 +1,9 @@
#TARGET = $$BINARY_NAME
CONFIG += qt staticlib
+CONFIG+=force_debug_info
+CONFIG+=debug_and_release
+#CONFIG+=release
windows:CONFIG -= console
unix:DEBUG:CONFIG += debug
lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5")
@@ -25,7 +28,7 @@ win32 {
RC_ICONS = $$VENDOR_PATH/assets/icon.ico
}
-QT += qml quick widgets
+QT += qml widgets quick
SOURCES += \
gui/main.cpp \
diff --git a/branding/templates/snap/snapcraft-template.yaml b/branding/templates/snap/snapcraft-template.yaml
index fe081e9..0840d88 100644
--- a/branding/templates/snap/snapcraft-template.yaml
+++ b/branding/templates/snap/snapcraft-template.yaml
@@ -9,9 +9,13 @@ grade: stable
confinement: classic
icon: snap/gui/icon.svg
base: core20
+compression: lzo
-parts:
+architectures:
+ - build-on: amd64
+ - build-on: i386
+parts:
bitmask-root:
plugin: dump
source: helpers
@@ -43,7 +47,8 @@ parts:
mkdir -p $SNAPCRAFT_PRIME/snap/
echo ${version} > $SNAPCRAFT_PRIME/snap/version.txt
make build_golib
- QT_SELECT=5 XBUILD=no TARGET=${binaryName} make build_gui
+ ln -fs /usr/lib/qt5/bin/lrelease /root/parts/qt5/install/usr/lib/qt5/bin/lrelease
+ QMAKE=/root/parts/qt5/install/usr/lib/qt5/bin/qmake LRELEASE=/usr/lib/qt5/bin/lrelease QT_SELECT=5 XBUILD=no TARGET=${binaryName} make build_gui
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
mv build/qt/release/${binaryName} $SNAPCRAFT_PART_INSTALL/bin/
override-prime: |
@@ -55,29 +60,28 @@ parts:
- golang
- git
- make
- - qt5-qmake
- qttools5-dev-tools
- - qtdeclarative5-dev
- stage-packages: # for some reason they're not picked from here - duplicating in desktop-qt5.
- - libqt5qml5
- - libqt5quick5
- - qml-module-qtquick-controls
- - qml-module-qtquick-controls2
- - qml-module-qtquick-dialogs
- - qml-module-qtquick-extras
+ stage-packages:
- qml-module-qt-labs-platform
after: [desktop-qt5]
+ desktop-integration:
+ plugin: nil
+ stage-packages:
+ - libx11-data
+ - libx11-xcb1
+ - xkb-data
+
desktop-qt5:
- source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
+ source: https://github.com/desktop-app/snapcraft-desktop-helpers.git
source-subdir: qt
plugin: make
make-parameters: ["FLAVOR=qt5"]
build-packages:
- build-essential
- - qtbase5-dev
- dpkg-dev
stage-packages:
+ - libjpeg-turbo8
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
@@ -85,46 +89,180 @@ parts:
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
+ - libgdk-pixbuf2.0-0
- locales-all
- xdg-user-dirs
- fcitx-frontend-qt5
+ - libglib2.0-bin
+ stage:
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libjpeg.so.8.2.2
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5Core.so.5
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5DBus.so.5
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5EglFSDeviceIntegration.so.5
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5Gui.so.5
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5Network.so.5
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libQt5XcbQpa.so.5
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/bearer/libqconnmanbearer.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/bearer/libqgenericbearer.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/bearer/libqnmbearer.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/egldeviceintegrations/libqeglfs-emu-integration.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/generic/libqevdevkeyboardplugin.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/generic/libqevdevmouseplugin.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/generic/libqevdevtabletplugin.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/generic/libqevdevtouchplugin.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/generic/libqtuiotouchplugin.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/imageformats/libqgif.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/imageformats/libqico.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/imageformats/libqjpeg.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqeglfs.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqlinuxfb.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqminimal.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqminimalegl.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqoffscreen.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqvnc.so
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms/libqxcb.so
+ after:
+ - qt5
+
+ qt5:
+ plugin: nil
+ build-packages:
+ - libdbus-1-dev
+ - libegl-dev
+ - libfontconfig1-dev
+ - libfreetype-dev
+ - libgl-dev
+ - libglib2.0-dev
+ - libharfbuzz-dev
+ - libicu-dev
+ - libpcre2-dev
+ - libpng-dev
+ - libwayland-dev
+ - libx11-dev
+ - libx11-xcb-dev
+ - libxcb1-dev
+ - libxcb-glx0-dev
+ - libxcb-icccm4-dev
+ - libxcb-image0-dev
+ - libxcb-keysyms1-dev
+ - libxcb-randr0-dev
+ - libxcb-render0-dev
+ - libxcb-render-util0-dev
+ - libxcb-shape0-dev
+ - libxcb-shm0-dev
+ - libxcb-sync-dev
+ - libxcb-util-dev
+ - libxcb-xfixes0-dev
+ - libxcb-xinerama0-dev
+ - libxcb-xinput-dev
+ - libxcb-xkb-dev
+ - libxcursor-dev
+ - libxkbcommon-dev
+ - libxkbcommon-x11-dev
+ - zlib1g-dev
+ stage-packages:
+ - libdbus-1-3
+ - libegl1
+ - libfontconfig1
+ - libfreetype6
+ - libgl1
+ - libglib2.0-0
+ - libharfbuzz0b
+ - libicu66
+ - libpcre2-16-0
+ - libpng16-16
+ #- libwayland-client0
+ #- libwayland-cursor0
+ #- libwayland-egl1
+ - libx11-6
+ - libx11-xcb1
- libxcb1
- - libqt5gui5
- - libgdk-pixbuf2.0-0
- - libqt5svg5
- - libqt5qml5
- - libqt5quick5
- - qt5-style-plugins
- - qml-module-qtquick2
- - qml-module-qtquick-controls
- - qml-module-qtquick-controls2
- - qml-module-qtquick-dialogs
- - qml-module-qtquick-extras
- - qml-module-qt-labs-platform
+ - libxcb-glx0
+ - libxcb-icccm4
+ - libxcb-image0
+ - libxcb-keysyms1
+ - libxcb-randr0
+ - libxcb-render0
+ - libxcb-render-util0
+ - libxcb-shape0
+ - libxcb-shm0
+ - libxcb-sync1
+ - libxcb-util1
+ - libxcb-xfixes0
+ - libxcb-xinerama0
+ - libxcb-xinput0
+ - libxcb-xkb1
+ - libxcursor1
+ - libxkbcommon0
+ - libxkbcommon-x11-0
+ - zlib1g
- try: [appmenu-qt5] # not available on core18
+ override-pull: |
+ QT=5_15_2
+ git clone -b v5.15.2 --depth=1 git://code.qt.io/qt/qt5.git .
+ perl init-repository --module-subset=qtbase,qtimageformats,qtsvg,qtdeclarative,qtgraphicaleffects,qtquickcontrols,qtquickcontrols2,qtscript
+ git submodule update qtbase qtimageformats qtsvg qtdeclarative qtgraphicaleffects qtquickcontrols qtquickcontrols2 qtscript
+ override-build: |
+ ./configure \
+ -prefix /usr \
+ -bindir /usr/lib/qt5/bin \
+ -libdir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET \
+ -docdir /usr/share/qt5/doc \
+ -headerdir /usr/include/$SNAPCRAFT_ARCH_TRIPLET/qt5 \
+ -datadir /usr/share/qt5 \
+ -archdatadir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5 \
+ -plugindir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins \
+ -importdir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/imports \
+ -translationdir /usr/share/qt5/translations \
+ -hostdatadir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5 \
+ -sysconfdir /etc/xdg \
+ -examplesdir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/examples \
+ -release \
+ -opensource \
+ -confirm-license \
+ -no-gtk \
+ -no-feature-xcb-sm \
+ -no-openssl \
+ -nomake examples \
+ -nomake tests \
+ -opengl desktop \
+ -I $SNAPCRAFT_STAGE/usr/include \
+ -L $SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET
+ make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT
+ make INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL" install
+ stage:
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libjpeg.so.8.2.2
+ prime:
+ - -./usr/include
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cmake
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/bin
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/mkspecs
+ - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/examples
+ - -./usr/lib/qt5
+ - -./usr/share
apps:
-
bitmask-root:
command: bin/bitmask-root
openvpn:
command: usr/sbin/openvpn
- environment:
- LD_LIBRARY_PATH: &library-path
- $SNAP/lib:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET
launcher:
- command: bin/${binaryName}
- environment:
- QT_PLUGIN_PATH: &path
- $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml
- LD_LIBRARY_PATH:
- $SNAP/lib:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$LD_LIBRARY_PATH
- QML2_IMPORT_PATH:
- $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml:$SNAP/usr/lib/x86_64-linux-gnu/qt5/qml
- # debug -------------
- #QT_DEBUG_PLUGINS: 1
- SNAP_DESKTOP_DEBUG: 1
- QT_STYLE_OVERRIDE: Fusion
- # debug -------------
+ command: bin/${binaryName} -platform xcb
+
+environment:
+ QT_PLUGIN_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/platforms:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml/QtQuick/Controls.2/:$SNAP/usr/lib/x86_64-linux-gnu/qt5/plugins:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins/xcbglintegrations
+ QT_QPA_PLATFORM_PLUGIN_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins:$SNAP/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms
+ # QT_STYLE_OVERRIDE: Fusion
+ QML2_IMPORT_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/qml
+ DISABLE_WAYLAND: 1
+ LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri
+ # debug -------------
+ # QT_OPENGL: software
+ # QT_DEBUG_PLUGINS: 1
+ SNAP_DESKTOP_DEBUG: 1
+ # debug -------------
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\nTP7DF2DT9zNe0Csk4myoMFC57rfJeqsAlJCv1XMzBmXrw8wq/9z7XHv6n/0sWU7a\n7cF2hLR33ktjwODlx7vorU39/lXLndo492ZBhXQtG1INMShyv+nlmzO6GT7ESfNE\nLliFitEzwIegpMqxCIHXFuobGSCWF4N0qLHkq/SYUMoOJ96O3hmPSl1kFDRMtWXY\niw1SEKjUvpyDJpVs3NGxeLCaA7bAWhDY5s5Yb2fA1o8ICAqhowurowJpW7n5ZuLK\n5VNTlNy6nZpkjt1QycYvNycffyPOFm/Q/RKDlvnorJIrihPkyniV3YY5cGgP+Qkx\nHUOT0uLA6LHtzfiyaOqkXwc4b0ZcQD5Vbf6Prd20Ppt6ei0zazkUPwxld3hgyw58\nm/4UIjG3PInWTNf293GngK2Bnz8Qx9e/6TueMSAn/3JBLem56E0WtmbLVjvko+LF\nPM5xA+m0BmuSJtrD1MUCXMhqYTtiOvgLBlUm5zkNxALzG+cXB28k6XikXt6MRG7q\nhzIPG38zwkooM55yy5i1YfcIi5NjMH6A+t4IJxxwb67MSb6UFOwg5kFokdONZcwj\nshczHdG9gLKSBIvrKa03Nd3W2dF9hMbRu//STcQxOailDBQCnXXfAATj9pYzdY4k\nha8VCAREGAKTDAex9oXf1yRuktES4QIDAQABo2AwXjAdBgNVHQ4EFgQUC4tdmLVu\nf9hwfK4AGliaet5KkcgwDgYDVR0PAQH/BAQDAgIEMAwGA1UdEwQFMAMBAf8wHwYD\nVR0jBBgwFoAUC4tdmLVuf9hwfK4AGliaet5KkcgwDQYJKoZIhvcNAQENBQADggIB\nAGzL+GRnYu99zFoy0bXJKOGCF5XUXP/3gIXPRDqQf5g7Cu/jYMID9dB3No4Zmf7v\nqHjiSXiS8jx1j/6/Luk6PpFbT7QYm4QLs1f4BlfZOti2KE8r7KRDPIecUsUXW6P/\n3GJAVYH/+7OjA39za9AieM7+H5BELGccGrM5wfl7JeEz8in+V2ZWDzHQO4hMkiTQ\n4ZckuaL201F68YpiItBNnJ9N5nHr1MRiGyApHmLXY/wvlrOpclh95qn+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(