mirror of
https://github.com/allankoechke/foodrescue-app.git
synced 2026-11-30 10:17:37 +00:00
removing KDE AppStream metadata generation
KDE AppStream metadata is provided in metadata-kde.xml. It is however maintained manually, allowing more fine-grained control and simpler makefiles.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
<icon type="stock">preferences-desktop-theme</icon>
|
||||
|
||||
<launchable type="desktop-id">org.fairirect.foodrescue.desktop</launchable>
|
||||
<launchable type="desktop-id">org.fairdirect.foodrescue.desktop</launchable>
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
|
||||
@@ -1,30 +1,32 @@
|
||||
# ------------------------- BEGIN: lists to maintain manually -------------------------
|
||||
|
||||
# Define the application source files to be compiled.
|
||||
# Application source files to be compiled.
|
||||
set(foodrescue_SRCS
|
||||
main.cpp
|
||||
)
|
||||
|
||||
# Bundle the files listed in Qt Resource Collection (.qrc) files.
|
||||
# Qt Resource Collection (.qrc) files, listing files to include into the executable.
|
||||
qt5_add_resources(RESOURCES
|
||||
resources.qrc
|
||||
)
|
||||
|
||||
# Define libraries to bundle and link with the application.
|
||||
# (Needed on Android only, as desktop systems should supply these system-wide.)
|
||||
# Libraries to statically link into the Android executable.
|
||||
# (Desktop systems will supply these system-wide as dynamic libraries.)
|
||||
# TODO: What happens on iOS?
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
find_package(KF5Kirigami2 ${KF5_DEP_VERSION})
|
||||
set(foodrescue_EXTRA_LIBS Qt5::AndroidExtras
|
||||
KF5::Kirigami2
|
||||
KF5::I18n # TODO: Remove if not using KDE i18n.
|
||||
# FIXME: Linking with QQC2 should not be needed. But if we don't, the lib will not be
|
||||
# included into the Android APK package.
|
||||
# FIXME: Static linking with QQC2 should not be needed, as it should be a dynamic
|
||||
# library coming in the APK. But if not listed here, the lib is omitted from the APK.
|
||||
Qt5::QuickControls2
|
||||
)
|
||||
endif()
|
||||
|
||||
# Include in-use Breeze icons with the Android APK package.
|
||||
# To browse available icons to choose from, execute as per https://askubuntu.com/a/1246673 :
|
||||
# In-use Breeze icons, to bundle into the Android APK.
|
||||
#
|
||||
# To browse available icons to choose from, execute (as per https://askubuntu.com/a/1246673):
|
||||
# pcmanfm-qt "search:///usr/share/icons/breeze?recursive=1&name_regex=*&mime_types=image/*"
|
||||
#
|
||||
# Also note that some Breeze icons are used by Kirigami components themselves and already
|
||||
@@ -46,37 +48,6 @@ endif()
|
||||
# ------------------------- END: lists to maintain manually -------------------------
|
||||
|
||||
|
||||
# Generate KDE AppStream meta information about the application, to integrate it with KDE.
|
||||
# (This is not an essential build step though. Disable when not working.)
|
||||
find_program(kpackagetool_cmd kpackagetool5)
|
||||
if (kpackagetool_cmd)
|
||||
set(component org.fairdirect.foodrescue)
|
||||
set(APPDATAFILE "${CMAKE_CURRENT_BINARY_DIR}/${component}.appdata.xml")
|
||||
|
||||
message(STATUS "${kpackagetool_cmd} --appstream-metainfo ${CMAKE_CURRENT_SOURCE_DIR}/data --appstream-metainfo-output ${APPDATAFILE}")
|
||||
execute_process(
|
||||
COMMAND ${kpackagetool_cmd} --appstream-metainfo ${CMAKE_CURRENT_SOURCE_DIR} --appstream-metainfo-output ${APPDATAFILE}
|
||||
ERROR_VARIABLE appstreamerror
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
|
||||
if (NOT result EQUAL 0)
|
||||
message(WARNING "couldn't generate metainfo for ${component}: ${appstreamerror}")
|
||||
else()
|
||||
if(appstreamerror)
|
||||
message(WARNING "warnings during generation of metainfo for ${component}: ${appstreamerror}")
|
||||
endif()
|
||||
|
||||
install(
|
||||
FILES ${APPDATAFILE}
|
||||
DESTINATION ${KDE_INSTALL_METAINFODIR}
|
||||
OPTIONAL # Because "NoDisplay" .desktop files will render no XML.
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Could not find command kpackagetool5. Appstream information won't be generated for ${component}.")
|
||||
endif()
|
||||
|
||||
# Define executable to generate, and its required inputs.
|
||||
# (Represented as "[hammer icon] foodrescue" in the Qt Creator project outline.)
|
||||
add_executable(foodrescue ${foodrescue_SRCS} ${RESOURCES})
|
||||
@@ -93,5 +64,5 @@ target_link_libraries(foodrescue
|
||||
${foodrescue_EXTRA_LIBS}
|
||||
)
|
||||
|
||||
# Install the binary generated in this makefile.
|
||||
# Install the binary generated by this makefile.
|
||||
install(TARGETS foodrescue ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Food Rescue
|
||||
Name[de]=LebensmittelRetter
|
||||
GenericName=Food Rescue Information Browser
|
||||
GenericName[de]=Lebensmittel-Haltbarkeits-Informierer
|
||||
Comment=Helps to assess if food is still edible.
|
||||
Comment[de]=Hilft zu entscheiden, ob Lebensmittel noch essbar sind.
|
||||
|
||||
Type=Application
|
||||
Exec=foodrescue
|
||||
Icon=preferences-desktop-theme
|
||||
Categories=Qt;KDE;
|
||||
|
||||
X-KDE-ParentApp=
|
||||
X-KDE-PluginInfo-Author=Matthias Ansorg
|
||||
X-KDE-PluginInfo-Email=matthias@ansorgs.de
|
||||
X-KDE-PluginInfo-Name=org.fairdirect.foodrescue
|
||||
X-KDE-PluginInfo-Version=0.1
|
||||
X-KDE-PluginInfo-Website=
|
||||
X-KDE-PluginInfo-Category=
|
||||
X-KDE-PluginInfo-Depends=
|
||||
X-KDE-PluginInfo-License=
|
||||
X-KDE-PluginInfo-EnabledByDefault=false
|
||||
X-Plasma-MainScript=
|
||||
@@ -4,7 +4,6 @@
|
||||
<file>qml/BaseApp.qml</file>
|
||||
<file>qml/MobileApp.qml</file>
|
||||
<file>qtquickcontrols2.conf</file>
|
||||
<file>metadata.desktop</file>
|
||||
<file>images/secondfood-applogo-256x188.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Reference in New Issue
Block a user