update packaging

This commit is contained in:
Kevin Yue
2021-09-30 17:28:56 +08:00
parent ce2360be61
commit 8f220b11c0
48 changed files with 828 additions and 1192 deletions

View File

@@ -4,6 +4,9 @@ project(GPClient)
set(gpclient_GENERATED_SOURCES)
configure_file(com.yuezk.qt.gpclient.desktop.in com.yuezk.qt.gpclient.desktop)
configure_file(com.yuezk.qt.gpclient.metainfo.xml.in com.yuezk.qt.gpclient.metainfo.xml)
qt5_add_dbus_interface(
gpclient_GENERATED_SOURCES
${CMAKE_BINARY_DIR}/com.yuezk.qt.GPService.xml
@@ -40,10 +43,9 @@ add_3rdparty(
GIT_TAG v3.3.0
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
-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
)
@@ -51,7 +53,10 @@ add_3rdparty(
plog
GIT_REPOSITORY https://github.com/SergiusTheBest/plog.git
GIT_TAG 1.1.5
CMAKE_ARGS -DPLOG_BUILD_SAMPLES=OFF
CMAKE_ARGS
-DPLOG_BUILD_SAMPLES=OFF
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
)
ExternalProject_Get_Property(SingleApplication-${PROJECT_NAME} SOURCE_DIR BINARY_DIR)
@@ -82,10 +87,13 @@ target_link_libraries(gpclient
QtSignals
)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
target_compile_options(gpclient PUBLIC "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
endif()
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")
install(TARGETS gpclient DESTINATION bin)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.yuezk.qt.gpclient.metainfo.xml" DESTINATION share/metainfo)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.yuezk.qt.gpclient.desktop" DESTINATION share/applications)
install(FILES "com.yuezk.qt.gpclient.svg" DESTINATION share/icons/hicolor/scalable/apps)

View File

@@ -1,11 +0,0 @@
[Desktop Entry]
Type=Application
Version=1.0.0
Name=GlobalProtect VPN
Comment=GlobalProtect VPN client, supports SAML auth mode
Exec=/usr/bin/gpclient
Icon=com.yuezk.qt.GPClient
Categories=Network;VPN;Utility;Qt;
Keywords=GlobalProtect;Openconnect;SAML;connection;VPN;
StartupWMClass=gpclient

View File

@@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=GlobalProtect VPN
Comment=A GlobalProtect VPN client (GUI) for Linux based on OpenConnect and built with Qt5, supports SAML auth mode.
GenericName=GlobalProtect VPN client, supports SAML auth mode
Categories=Network;Dialup;
Exec=@CMAKE_INSTALL_PREFIX@/bin/gpclient
Icon=com.yuezk.qt.gpclient
Keywords=GlobalProtect;Openconnect;SAML;connection;VPN;
StartupWMClass=gpclient

View File

@@ -37,7 +37,7 @@
</screenshot>
</screenshots>
<provides>
<binary>/usr/bin/gpclient</binary>
<binary>@CMAKE_INSTALL_PREFIX@/bin/gpclient</binary>
<dbus type="system">com.yuezk.qt.GPService</dbus>
</provides>
</component>

View File

@@ -16,7 +16,7 @@
viewBox="0 0 96 96"
style="enable-background:new 0 0 96 96;"
xml:space="preserve"
sodipodi:docname="com.yuezk.qt.GPClient.svg"
sodipodi:docname="com.yuezk.qt.gpclient.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14"><metadata
id="metadata14"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -1,6 +1,6 @@
<RCC>
<qresource prefix="/images">
<file alias="logo.svg">com.yuezk.qt.GPClient.svg</file>
<file alias="logo.svg">com.yuezk.qt.gpclient.svg</file>
<file>connected.png</file>
<file>pending.png</file>
<file>not_connected.png</file>

View File

@@ -9,7 +9,7 @@ SAMLLoginWindow::SAMLLoginWindow(QWidget *parent)
: QDialog(parent)
, webView(new EnhancedWebView(this))
{
setWindowTitle("GlobalProtect SAML Login");
setWindowTitle("GlobalProtect Login");
setModal(true);
resize(700, 550);