Skip to content

Commit

Permalink
Rename appstream appdata.xml to metainfo.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Oct 18, 2023
1 parent d776ee4 commit e5c64cc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .ci/flatpak/generate_flatpak_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 3.5...3.24)
# Automatically generate a Flatpak manifest from the template file
#
# Required input defines:
# - TEMPLATE_FILE: the full filename + path for the input net.wz2100.warzone2100.appdata.xml.in template file
# - OUTPUT_FILE: the full filename + path for the output net.wz2100.warzone2100.appdata.xml file
# - TEMPLATE_FILE: the full filename + path for the input net.wz2100.wz2100.yaml.in template file
# - OUTPUT_FILE: the full filename + path for the output net.wz2100.wz2100.yaml file
# - PROJECT_ROOT: the path the project root (${PROJECT_SOURCE_DIR})
#
# And also, these input defines:
Expand Down
2 changes: 1 addition & 1 deletion .snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ parts:
parse-info:
# Parse this appdata/metainfo file for summary, description,
# and icon. Use the installed path relative to the Snap's root
- usr/share/metainfo/net.wz2100.warzone2100.appdata.xml
- usr/share/metainfo/net.wz2100.warzone2100.metainfo.xml
override-pull: |
craftctl default
SNAP_VERSION_DESC=$(git describe --always | sed 's/[^a-zA-Z0-9\.\:\+\~\-]/~/g')
Expand Down
18 changes: 9 additions & 9 deletions icons/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ if(UNIX AND NOT APPLE AND NOT WIN32)
endif()

############################
# Generate appdata.xml (w/ autorevision)
# Generate metainfo.xml (w/ autorevision)

# IMPORTANT: Must set GENERATED property at this directory level for autorevision.h
set_source_files_properties("${wz2100_autorevision_cache_file}" PROPERTIES GENERATED TRUE)
set_source_files_properties("${wz2100_autorevision_h_file}" PROPERTIES GENERATED TRUE)

# Generate the appdata.xml info (with version info)
set(_appdata_xml_template_file "${CMAKE_CURRENT_SOURCE_DIR}/net.wz2100.warzone2100.appdata.xml.in")
set(_appdata_xml_output_file "${CMAKE_CURRENT_BINARY_DIR}/${WZ_APPSTREAM_ID}${WZ_OUTPUT_NAME_SUFFIX}.appdata.xml")
# Generate the metainfo.xml info (with version info)
set(_metainfo_xml_template_file "${CMAKE_CURRENT_SOURCE_DIR}/net.wz2100.warzone2100.metainfo.xml.in")
set(_metainfo_xml_output_file "${CMAKE_CURRENT_BINARY_DIR}/${WZ_APPSTREAM_ID}${WZ_OUTPUT_NAME_SUFFIX}.metainfo.xml")
add_custom_command(
OUTPUT "${_appdata_xml_output_file}"
COMMAND ${CMAKE_COMMAND} -DCACHEFILE=${wz2100_autorevision_cache_file} -DPROJECT_ROOT=${PROJECT_SOURCE_DIR} -DTEMPLATE_FILE=${_appdata_xml_template_file} -DOUTPUT_FILE=${_appdata_xml_output_file} -DWZ_OUTPUT_NAME_SUFFIX=${WZ_OUTPUT_NAME_SUFFIX} -DWZ_NAME_SUFFIX=${WZ_NAME_SUFFIX} -DWZ_APPSTREAM_ID=${WZ_APPSTREAM_ID} -P ${CMAKE_CURRENT_SOURCE_DIR}/autorevision_metainfo.cmake
OUTPUT "${_metainfo_xml_output_file}"
COMMAND ${CMAKE_COMMAND} -DCACHEFILE=${wz2100_autorevision_cache_file} -DPROJECT_ROOT=${PROJECT_SOURCE_DIR} -DTEMPLATE_FILE=${_metainfo_xml_template_file} -DOUTPUT_FILE=${_metainfo_xml_output_file} -DWZ_OUTPUT_NAME_SUFFIX=${WZ_OUTPUT_NAME_SUFFIX} -DWZ_NAME_SUFFIX=${WZ_NAME_SUFFIX} -DWZ_APPSTREAM_ID=${WZ_APPSTREAM_ID} -P ${CMAKE_CURRENT_SOURCE_DIR}/autorevision_metainfo.cmake
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
DEPENDS "${_appdata_xml_template_file}" "${wz2100_autorevision_cache_file}" "${CMAKE_CURRENT_SOURCE_DIR}/autorevision_metainfo.cmake"
DEPENDS "${_metainfo_xml_template_file}" "${wz2100_autorevision_cache_file}" "${CMAKE_CURRENT_SOURCE_DIR}/autorevision_metainfo.cmake"
VERBATIM
)

add_custom_target(autorevision_metainfo ALL
DEPENDS
"${_appdata_xml_output_file}"
"${_metainfo_xml_output_file}"
)
set_property(TARGET autorevision_metainfo PROPERTY FOLDER "_WZBuildProcessTargets")
add_dependencies(autorevision_metainfo autorevision) # Ensure ordering and non-concurrency
Expand All @@ -48,7 +48,7 @@ if(UNIX AND NOT APPLE AND NOT WIN32)
DESTINATION "${CMAKE_INSTALL_DATADIR}/applications"
COMPONENT Core
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${WZ_APPSTREAM_ID}${WZ_OUTPUT_NAME_SUFFIX}.appdata.xml"
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${WZ_APPSTREAM_ID}${WZ_OUTPUT_NAME_SUFFIX}.metainfo.xml"
DESTINATION "${CMAKE_INSTALL_DATADIR}/metainfo"
COMPONENT Core
)
Expand Down
6 changes: 3 additions & 3 deletions icons/autorevision_metainfo.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.5...3.24)

# Automatically update the Release and other info in the net.wz2100.warzone2100.appdata.xml.in file
# Automatically update the Release and other info in the net.wz2100.warzone2100.metainfo.xml.in file
#
# Required input defines:
# - CACHEFILE: the path to the autorevision.cache file generated for the build
# - PROJECT_ROOT: the path the project root (${PROJECT_SOURCE_DIR})
# - TEMPLATE_FILE: the full filename + path for the input net.wz2100.warzone2100.appdata.xml.in template file
# - OUTPUT_FILE: the full filename + path for the output net.wz2100.warzone2100.appdata.xml file
# - TEMPLATE_FILE: the full filename + path for the input net.wz2100.warzone2100.metainfo.xml.in template file
# - OUTPUT_FILE: the full filename + path for the output net.wz2100.warzone2100.metainfo.xml file
#
# And also, passed from the main CMake build:
# - WZ_OUTPUT_NAME_SUFFIX
Expand Down
File renamed without changes.

0 comments on commit e5c64cc

Please sign in to comment.