diff --git a/metadata-kde.xml b/metadata-kde.xml index 6cc4e78..55e7411 100644 --- a/metadata-kde.xml +++ b/metadata-kde.xml @@ -23,7 +23,7 @@ preferences-desktop-theme - org.fairirect.foodrescue.desktop + org.fairdirect.foodrescue.desktop diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0f7f15f..844194d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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}) diff --git a/src/metadata.desktop b/src/metadata.desktop deleted file mode 100644 index e3559b4..0000000 --- a/src/metadata.desktop +++ /dev/null @@ -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= diff --git a/src/resources.qrc b/src/resources.qrc index acdb5e6..ce89b1a 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -4,7 +4,6 @@ qml/BaseApp.qml qml/MobileApp.qml qtquickcontrols2.conf - metadata.desktop images/secondfood-applogo-256x188.png