Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorlouib <code@louib.net>2022-04-05 02:04:18 +0300
committerGitHub <noreply@github.com>2022-04-05 02:04:18 +0300
commit7cd824ae1cdbcb71b665557afa48b7e785e78b75 (patch)
treeafa4490708ad10ba55f02773de80bcef9bc1a09c /share
parent31db3c325d2ffc9dedc240d8ac5036fe6f1cf5c3 (diff)
Upstream Flathub patches (#7728)
Diffstat (limited to 'share')
-rw-r--r--share/CMakeLists.txt46
-rw-r--r--share/linux/keepassxc.xml.in (renamed from share/linux/keepassxc.xml)2
-rw-r--r--share/linux/org.keepassxc.KeePassXC.appdata.xml2
-rw-r--r--share/linux/org.keepassxc.KeePassXC.desktop.in (renamed from share/linux/org.keepassxc.KeePassXC.desktop)2
4 files changed, 40 insertions, 12 deletions
diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt
index 6d689df9e..34017e95c 100644
--- a/share/CMakeLists.txt
+++ b/share/CMakeLists.txt
@@ -23,15 +23,43 @@ install(FILES ${wordlists_files} DESTINATION ${DATA_INSTALL_DIR}/wordlists)
file(COPY "wordlists" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
if(UNIX AND NOT APPLE AND NOT HAIKU)
- install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
- FILES_MATCHING PATTERN "keepassx*.png" PATTERN "keepassx*.svg"
- PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE)
- install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
- FILES_MATCHING PATTERN "application-x-keepassxc.png" PATTERN "application-x-keepassxc.svg"
- PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE)
- install(FILES linux/org.keepassxc.KeePassXC.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
- install(FILES linux/org.keepassxc.KeePassXC.appdata.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)
- install(FILES linux/keepassxc.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
+ # Flatpak requires all host accessible files to use filenames based upon the app id
+ if(KEEPASSXC_DIST_FLATPAK)
+ set(APP_ICON_NAME "${APP_ID}")
+ set(MIME_ICON "${APP_ID}-application-x-keepassxc")
+ configure_file(linux/keepassxc.xml.in ${CMAKE_CURRENT_BINARY_DIR}/linux/${APP_ID}.xml @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/linux/${APP_ID}.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
+
+ file(GLOB_RECURSE ICON_FILES LIST_DIRECTORIES false
+ "icons/application/*/keepassxc*.png"
+ "icons/application/*/*keepassxc*.svg")
+ foreach(icon_match ${ICON_FILES})
+ get_filename_component(icon_name ${icon_match} NAME)
+ get_filename_component(icon_dir ${icon_match} DIRECTORY)
+ # Prefix all icons with application id: "org.keepassxc.KeePassXC"
+ string(REGEX REPLACE "^keepassxc(.*)?(\\.png|\\.svg)$" "${APP_ID}\\1\\2" icon_name ${icon_name})
+ string(REGEX REPLACE "^(application-x-keepassxc\\.svg)$" "${APP_ID}-\\1" icon_name ${icon_name})
+ # Find icon sub dir ex. "scalable/mimetypes/"
+ file(RELATIVE_PATH icon_subdir ${CMAKE_CURRENT_SOURCE_DIR}/icons/application ${icon_dir})
+ install(FILES ${icon_match} DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/${icon_subdir}
+ RENAME ${icon_name})
+ endforeach()
+ else()
+ set(APP_ICON_NAME "keepassxc")
+ set(MIME_ICON "application-x-keepassxc")
+ configure_file(linux/keepassxc.xml.in ${CMAKE_CURRENT_BINARY_DIR}/linux/keepassxc.xml @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/linux/keepassxc.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
+
+ install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
+ FILES_MATCHING PATTERN "keepassx*.png" PATTERN "keepassx*.svg"
+ PATTERN "status" EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE)
+ install(DIRECTORY icons/application/ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor
+ FILES_MATCHING PATTERN "application-x-keepassxc.svg" PATTERN "status"
+ EXCLUDE PATTERN "actions" EXCLUDE PATTERN "categories" EXCLUDE)
+ endif(KEEPASSXC_DIST_FLATPAK)
+ configure_file(linux/${APP_ID}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/linux/${APP_ID}.desktop @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/linux/${APP_ID}.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
+ install(FILES linux/${APP_ID}.appdata.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)
endif(UNIX AND NOT APPLE AND NOT HAIKU)
if(APPLE)
diff --git a/share/linux/keepassxc.xml b/share/linux/keepassxc.xml.in
index b26b4db25..15ec11189 100644
--- a/share/linux/keepassxc.xml
+++ b/share/linux/keepassxc.xml.in
@@ -3,6 +3,6 @@
<mime-type type="application/x-keepass2">
<comment>KeePass 2 Database</comment>
<glob pattern="*.kdbx"/>
- <icon name="application-x-keepassxc"/>
+ <icon name="@MIME_ICON@"/>
</mime-type>
</mime-info>
diff --git a/share/linux/org.keepassxc.KeePassXC.appdata.xml b/share/linux/org.keepassxc.KeePassXC.appdata.xml
index a3673da7e..1b74b2be3 100644
--- a/share/linux/org.keepassxc.KeePassXC.appdata.xml
+++ b/share/linux/org.keepassxc.KeePassXC.appdata.xml
@@ -94,7 +94,7 @@
<li>FdoSecrets: Major Refactor and Code Consolidation [#5747][#5660][#7043][#6915]</li>
<li>FdoSecrets: Implement unlock before search [#6943]</li>
<li>Reports: Add browser statistics report [#7197]</li>
- <li>Port crypto backend to [Botan](https://github.com/randombit/botan) [#6209]</li>
+ <li>Port crypto backend to Botan [#6209]</li>
<li>Improve attachment handling and security [#6606][#5034][#7083]</li>
<li>Allow selecting any open database in unlock dialog [#5427]</li>
<li>KeeShare: Remove checking signed container and QuaZip dependency [#7223]</li>
diff --git a/share/linux/org.keepassxc.KeePassXC.desktop b/share/linux/org.keepassxc.KeePassXC.desktop.in
index e8d4dccf4..eef24fe7f 100644
--- a/share/linux/org.keepassxc.KeePassXC.desktop
+++ b/share/linux/org.keepassxc.KeePassXC.desktop.in
@@ -37,7 +37,7 @@ Comment[et]=Kogukonna arendatav port Windowsi programmist KeePass Password Safe
Comment[ru]=Разработанный сообществом порт Windows-приложения KeePass Password Safe
Exec=keepassxc %f
TryExec=keepassxc
-Icon=keepassxc
+Icon=@APP_ICON_NAME@
StartupWMClass=keepassxc
StartupNotify=true
Terminal=false