mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Add snap packaging (#93)
* snapcraft init * update packaging * update packaging * update packaging * update packaging * update packaging * update packaging * snap worked * fix locale warning * polish code * update metainfo * update icon * update icon * update message
This commit is contained in:
@@ -4,7 +4,11 @@ project(GPClient)
|
||||
|
||||
set(gpclient_GENERATED_SOURCES)
|
||||
|
||||
qt5_add_dbus_interface(gpclient_GENERATED_SOURCES ${CMAKE_BINARY_DIR}/com.yuezk.qt.GPService.xml gpserviceinterface)
|
||||
qt5_add_dbus_interface(
|
||||
gpclient_GENERATED_SOURCES
|
||||
${CMAKE_BINARY_DIR}/com.yuezk.qt.GPService.xml
|
||||
gpserviceinterface
|
||||
)
|
||||
|
||||
add_executable(gpclient
|
||||
cdpcommand.cpp
|
||||
@@ -34,7 +38,13 @@ add_3rdparty(
|
||||
SingleApplication
|
||||
GIT_REPOSITORY https://github.com/itay-grudev/SingleApplication.git
|
||||
GIT_TAG v3.3.0
|
||||
CMAKE_ARGS -DQAPPLICATION_CLASS=QApplication
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH}
|
||||
-DCMAKE_PREFIX_PATH=$ENV{CMAKE_PREFIX_PATH}
|
||||
-DCMAKE_INCLUDE_PATH=$ENV{CMAKE_INCLUDE_PATH}
|
||||
-DCMAKE_LIBRARY_PATH=$ENV{CMAKE_LIBRARY_PATH}
|
||||
-DQAPPLICATION_CLASS=QApplication
|
||||
)
|
||||
|
||||
add_3rdparty(
|
||||
@@ -69,10 +79,13 @@ target_link_libraries(gpclient
|
||||
Qt5::WebEngine
|
||||
Qt5::WebEngineWidgets
|
||||
Qt5::DBus
|
||||
QtSignals
|
||||
)
|
||||
|
||||
target_compile_definitions(gpclient PUBLIC QAPPLICATION_CLASS=QApplication)
|
||||
|
||||
install(TARGETS gpclient DESTINATION "/usr/bin")
|
||||
install(FILES com.yuezk.qt.gpclient.metainfo.xml DESTINATION "/usr/share/metainfo")
|
||||
install(FILES com.yuezk.qt.gpclient.desktop DESTINATION "/usr/share/applications")
|
||||
install(FILES com.yuezk.qt.GPClient.svg DESTINATION "/usr/share/icons/hicolor/scalable/apps")
|
||||
install(FILES com.yuezk.qt.GPClient.svg DESTINATION "/usr/share/pixmaps")
|
||||
|
43
GPClient/com.yuezk.qt.gpclient.metainfo.xml
Normal file
43
GPClient/com.yuezk.qt.gpclient.metainfo.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>com.yuezk.qt.gpclient</id>
|
||||
|
||||
<name>globalprotect-openconnect</name>
|
||||
<summary>A GlobalProtect VPN client powered by OpenConnect</summary>
|
||||
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>AGPL-3.0-or-later</project_license>
|
||||
|
||||
<description>
|
||||
<p>A GlobalProtect VPN client (GUI) for Linux based on OpenConnect and built with Qt5, supports the SAML auth mode.</p>
|
||||
</description>
|
||||
|
||||
<categories>
|
||||
<category>Network</category>
|
||||
</categories>
|
||||
|
||||
<update_contact>k3vinyue_AT_gmail.com</update_contact>
|
||||
<developer_name>Kevin Yue</developer_name>
|
||||
|
||||
<url type="homepage">https://github.com/yuezk/GlobalProtect-openconnect</url>
|
||||
<url type="bugtracker">https://github.com/yuezk/GlobalProtect-openconnect/issues</url>
|
||||
<url type="help">https://github.com/yuezk/GlobalProtect-openconnect/issues</url>
|
||||
|
||||
<keywords>
|
||||
<keyword>globalprotect</keyword>
|
||||
<keyword>openconnect</keyword>
|
||||
<keyword>vpn</keyword>
|
||||
<keyword>saml</keyword>
|
||||
</keywords>
|
||||
|
||||
<launchable type="desktop-id">com.yuezk.qt.gpclient.desktop</launchable>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://user-images.githubusercontent.com/3297602/133869036-5c02b0d9-c2d9-4f87-8c81-e44f68cfd6ac.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<provides>
|
||||
<binary>/usr/bin/gpclient</binary>
|
||||
<dbus type="system">com.yuezk.qt.GPService</dbus>
|
||||
</provides>
|
||||
</component>
|
@@ -23,6 +23,7 @@ public:
|
||||
~GPClient();
|
||||
|
||||
void activate();
|
||||
void quit();
|
||||
|
||||
private slots:
|
||||
void onSettingsButtonClicked();
|
||||
@@ -97,6 +98,5 @@ private:
|
||||
void setCurrentGateway(const GPGateway gateway);
|
||||
|
||||
void clearSettings();
|
||||
void quit();
|
||||
};
|
||||
#endif // GPCLIENT_H
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#include "singleapplication.h"
|
||||
#include "gpclient.h"
|
||||
#include "enhancedwebview.h"
|
||||
#include "sigwatch.h"
|
||||
#include "version.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@@ -37,5 +38,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
QObject::connect(&app, &SingleApplication::instanceStarted, &w, &GPClient::activate);
|
||||
|
||||
UnixSignalWatcher sigwatch;
|
||||
sigwatch.watchForSignal(SIGINT);
|
||||
sigwatch.watchForSignal(SIGTERM);
|
||||
sigwatch.watchForSignal(SIGQUIT);
|
||||
sigwatch.watchForSignal(SIGHUP);
|
||||
QObject::connect(&sigwatch, &UnixSignalWatcher::unixSignal, &w, &GPClient::quit);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
Reference in New Issue
Block a user