feat(MINE): add <<open whit>> WIP
This commit is contained in:
1 parent
b6f51a76ff
commit
f3bb6efd96
4 files changed
+124
-2
No files matched your search
+45
-2
@@ -130,6 +130,49 @@ endif()
|
||||
install(FILES resources/icons/package.svg
|
||||
DESTINATION share/icons/hicolor/scalable/apps
|
||||
RENAME org.fws.PacManager.svg)
|
||||
|
||||
# Same route for the .fwspacm plugin packages, which the entry above does not
|
||||
# cover: the Flatpak types are declared by flatpak itself, so Dolphin already
|
||||
# knows them, but nothing declares ours. The XML gives the extension a MIME
|
||||
# type (and the icon a name), mimeapps.list says which application opens it.
|
||||
#
|
||||
# update-mime-database is run at install time because the spec requires it: it
|
||||
# is what merges the XML into the shared database the file managers read. It is
|
||||
# a hard requirement for .fwspacm to be recognised at all, so a missing one
|
||||
# fails the install rather than leaving a half-configured desktop behind.
|
||||
install(FILES resources/mime/fws-pacmanager.xml
|
||||
DESTINATION share/mime/packages)
|
||||
# Beside the desktop entry, which is the location XDG_DATA_DIRS/applications
|
||||
# reads. No patching needed: it names the desktop entry, not an absolute path.
|
||||
install(FILES resources/mime/mimeapps.list
|
||||
DESTINATION share/applications)
|
||||
install(FILES resources/icons/plugin-package.svg
|
||||
DESTINATION share/icons/hicolor/scalable/apps
|
||||
RENAME application-vnd.fws.pacmanager.plugin-package.svg)
|
||||
# Refreshing the database is a system-wide side effect, so it is skipped when
|
||||
# installing into a staging root (DESTDIR set): the packager runs it against the
|
||||
# real prefix once the package is deployed. That also means a packaging build
|
||||
# never needs shared-mime-info installed on the build machine.
|
||||
install(CODE "
|
||||
if(NOT \"\$ENV{DESTDIR}\" STREQUAL \"\")
|
||||
message(STATUS \"Skipping update-mime-database (DESTDIR is set)\")
|
||||
else()
|
||||
find_program(UPDATE_MIME_DATABASE update-mime-database)
|
||||
if(NOT UPDATE_MIME_DATABASE)
|
||||
message(FATAL_ERROR
|
||||
\"update-mime-database not found: install shared-mime-info, or \"
|
||||
\".fwspacm files will not be recognised by the desktop\")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND \"\${UPDATE_MIME_DATABASE}\" \"\${CMAKE_INSTALL_PREFIX}/share/mime\"
|
||||
RESULT_VARIABLE MIME_RESULT
|
||||
OUTPUT_VARIABLE MIME_OUTPUT
|
||||
ERROR_VARIABLE MIME_OUTPUT)
|
||||
if(NOT MIME_RESULT EQUAL 0)
|
||||
message(FATAL_ERROR \"update-mime-database failed: \${MIME_OUTPUT}\")
|
||||
endif()
|
||||
endif()
|
||||
")
|
||||
install(CODE "
|
||||
set(DESKTOP_DIR \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/share/applications\")
|
||||
file(MAKE_DIRECTORY \"\${DESKTOP_DIR}\")
|
||||
@@ -143,10 +186,10 @@ Exec=${CMAKE_INSTALL_PREFIX}/bin/PacManager %U
|
||||
Icon=org.fws.PacManager
|
||||
Terminal=false
|
||||
Categories=System;PackageManager;Qt;
|
||||
MimeType=application/vnd.flatpak.ref;application/vnd.flatpak.repo;application/vnd.flatpak;
|
||||
MimeType=application/vnd.flatpak.ref;application/vnd.flatpak.repo;application/vnd.flatpak;application/vnd.fws.pacmanager.plugin-package;
|
||||
StartupNotify=true
|
||||
\")
|
||||
")
|
||||
")
|
||||
install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME})
|
||||
|
||||
# Tests
|
||||
|
||||
Reference in new issue
Block a user