mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Corrected issues with desktop and tray icons in snap build
This commit is contained in:
committed by
Jonathan White
parent
e53754d202
commit
91d746c5c0
@@ -52,6 +52,9 @@ set(KEEPASSXC_VERSION_MINOR "2")
|
|||||||
set(KEEPASSXC_VERSION_PATCH "1")
|
set(KEEPASSXC_VERSION_PATCH "1")
|
||||||
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}")
|
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}")
|
||||||
|
|
||||||
|
# Special flag for snap builds
|
||||||
|
set(KEEPASSXC_SNAP_BUILD OFF CACHE BOOL "Set whether this is a build for snap or not")
|
||||||
|
|
||||||
if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||||
set(CMAKE_COMPILER_IS_CLANG 1)
|
set(CMAKE_COMPILER_IS_CLANG 1)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ apps:
|
|||||||
keepassxc:
|
keepassxc:
|
||||||
command: desktop-launch keepassxc
|
command: desktop-launch keepassxc
|
||||||
plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media, raw-usb]
|
plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media, raw-usb]
|
||||||
desktop: share/applications/keepassxc.desktop
|
desktop: usr/share/applications/keepassxc.desktop
|
||||||
cli:
|
cli:
|
||||||
command: keepassxc-cli
|
command: keepassxc-cli
|
||||||
plugs: [gsettings, home, removable-media, raw-usb]
|
plugs: [gsettings, home, removable-media, raw-usb]
|
||||||
@@ -23,6 +23,8 @@ parts:
|
|||||||
plugin: cmake
|
plugin: cmake
|
||||||
configflags:
|
configflags:
|
||||||
- -DCMAKE_BUILD_TYPE=Release
|
- -DCMAKE_BUILD_TYPE=Release
|
||||||
|
- -DCMAKE_INSTALL_PREFIX=/usr
|
||||||
|
- -DKEEPASSXC_SNAP_BUILD=ON
|
||||||
- -DWITH_TESTS=OFF
|
- -DWITH_TESTS=OFF
|
||||||
- -DWITH_XC_AUTOTYPE=ON
|
- -DWITH_XC_AUTOTYPE=ON
|
||||||
- -DWITH_XC_HTTP=ON
|
- -DWITH_XC_HTTP=ON
|
||||||
@@ -39,6 +41,8 @@ parts:
|
|||||||
- libxtst-dev
|
- libxtst-dev
|
||||||
- libyubikey-dev
|
- libyubikey-dev
|
||||||
- libykpers-1-dev
|
- libykpers-1-dev
|
||||||
|
install: |
|
||||||
|
sed -i 's|Icon=keepassxc|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/keepassxc.png|g' $SNAPCRAFT_PART_INSTALL/usr/share/applications/keepassxc.desktop
|
||||||
after: [desktop-qt5]
|
after: [desktop-qt5]
|
||||||
|
|
||||||
# Redefine desktop-qt5 stage packages to work with Ubuntu 17.04
|
# Redefine desktop-qt5 stage packages to work with Ubuntu 17.04
|
||||||
@@ -55,10 +59,12 @@ parts:
|
|||||||
- locales-all
|
- locales-all
|
||||||
|
|
||||||
# Overcome limitation in snapd to support URL loading (CTRL+U)
|
# Overcome limitation in snapd to support URL loading (CTRL+U)
|
||||||
|
# client needs to install "snapd-xdg-open" on their system
|
||||||
snapd-xdg-open:
|
snapd-xdg-open:
|
||||||
source: https://github.com/ubuntu-core/snapd-xdg-open.git
|
source: https://github.com/ubuntu-core/snapd-xdg-open.git
|
||||||
plugin: dump
|
source-depth: 1
|
||||||
organize:
|
plugin: nil
|
||||||
data/xdg-open: bin/xdg-open
|
install: |
|
||||||
|
install -D -t $SNAPCRAFT_PART_INSTALL/usr/bin/ data/xdg-open
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- dbus
|
- dbus
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
#cmakedefine WITH_XC_AUTOTYPE
|
#cmakedefine WITH_XC_AUTOTYPE
|
||||||
#cmakedefine WITH_XC_YUBIKEY
|
#cmakedefine WITH_XC_YUBIKEY
|
||||||
|
|
||||||
|
#cmakedefine KEEPASSXC_SNAP_BUILD
|
||||||
|
|
||||||
#cmakedefine HAVE_PR_SET_DUMPABLE 1
|
#cmakedefine HAVE_PR_SET_DUMPABLE 1
|
||||||
#cmakedefine HAVE_RLIMIT_CORE 1
|
#cmakedefine HAVE_RLIMIT_CORE 1
|
||||||
#cmakedefine HAVE_PT_DENY_ATTACH 1
|
#cmakedefine HAVE_PT_DENY_ATTACH 1
|
||||||
|
|||||||
@@ -91,17 +91,29 @@ QString FilePath::pluginPath(const QString& name)
|
|||||||
|
|
||||||
QIcon FilePath::applicationIcon()
|
QIcon FilePath::applicationIcon()
|
||||||
{
|
{
|
||||||
|
#ifdef KEEPASSXC_SNAP_BUILD
|
||||||
|
return icon("apps", "keepassxc", false);
|
||||||
|
#else
|
||||||
return icon("apps", "keepassxc");
|
return icon("apps", "keepassxc");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon FilePath::trayIconLocked()
|
QIcon FilePath::trayIconLocked()
|
||||||
{
|
{
|
||||||
|
#ifdef KEEPASSXC_SNAP_BUILD
|
||||||
|
return icon("apps", "keepassxc-locked", false);
|
||||||
|
#else
|
||||||
return icon("apps", "keepassxc-locked");
|
return icon("apps", "keepassxc-locked");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon FilePath::trayIconUnlocked()
|
QIcon FilePath::trayIconUnlocked()
|
||||||
{
|
{
|
||||||
|
#ifdef KEEPASSXC_SNAP_BUILD
|
||||||
|
return icon("apps", "keepassxc-unlocked", false);
|
||||||
|
#else
|
||||||
return icon("apps", "keepassxc-unlocked");
|
return icon("apps", "keepassxc-unlocked");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon FilePath::icon(const QString& category, const QString& name, bool fromTheme)
|
QIcon FilePath::icon(const QString& category, const QString& name, bool fromTheme)
|
||||||
|
|||||||
Reference in New Issue
Block a user