Skip to content

Commit

Permalink
Use standard names for desktop and AppData files
Browse files Browse the repository at this point in the history
Removes build options for renaming desktop and AppData files.
  • Loading branch information
hluk committed Feb 26, 2018
1 parent ec46a12 commit a8026c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
18 changes: 7 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ if (UNIX AND NOT APPLE)
set(ICON_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps" CACHE PATH "Install path for icons")
set(ICON_INSTALL_PREFIX_TEMPLATE "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/%SIZE%/apps" CACHE PATH "Install path for icons (%SIZE% is icon size)")
set(THEME_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/copyq/themes" CACHE PATH "Install path for themes")
set(DESKTOP_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/applications" CACHE PATH "Install path for \"copyq.desktop\"")
set(APPDATA_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/metainfo" CACHE PATH "Install path for \"copyq.appdata.xml\"")
set(DESKTOP_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/applications" CACHE PATH "Install path for desktop file")
set(APPDATA_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/metainfo" CACHE PATH "Install path for AppData file")
set(MANPAGE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/man/man1" CACHE PATH "Install path for manual pages")
set(TRANSLATION_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share/copyq/translations" CACHE PATH "Install path for translations")
set(DESKTOP_INSTALL_NAME "copyq.desktop" CACHE STRING "Name for desktop file")
set(APPDATA_INSTALL_NAME "copyq.appdata.xml" CACHE STRING "Name for appdata file")
set(ICON_NAME "copyq" CACHE STRING "Name for icon files")
endif()

Expand Down Expand Up @@ -60,8 +58,8 @@ endif()
set(copyq_ICON_PREFIX src/images/icon)
set(copyq_ICON_NORMAL src/images/icon.svg)
set(copyq_ICON_BUSY src/images/icon-running.svg)
set(copyq_DESKTOP shared/copyq.desktop)
set(copyq_APPDATA shared/copyq.appdata.xml)
set(copyq_DESKTOP shared/com.github.hluk.copyq.desktop)
set(copyq_APPDATA shared/com.github.hluk.copyq.appdata.xml)
set(copyq_MANPAGE debian/copyq.1)

# Be more strict while compiling debugging version
Expand Down Expand Up @@ -176,13 +174,11 @@ endif()
if (UNIX AND NOT APPLE)
install(FILES ${copyq_ICON_NORMAL} DESTINATION ${ICON_INSTALL_PREFIX} RENAME ${ICON_NAME}-normal.svg)
install(FILES ${copyq_ICON_BUSY} DESTINATION ${ICON_INSTALL_PREFIX} RENAME ${ICON_NAME}-busy.svg)
install(FILES ${copyq_APPDATA} DESTINATION ${APPDATA_INSTALL_PREFIX})
install(FILES ${copyq_MANPAGE} DESTINATION ${MANPAGE_INSTALL_PREFIX})

configure_file(${copyq_DESKTOP}.in ${copyq_DESKTOP})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${copyq_DESKTOP} DESTINATION ${DESKTOP_INSTALL_PREFIX} RENAME ${DESKTOP_INSTALL_NAME})

configure_file(${copyq_APPDATA}.in ${copyq_APPDATA})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${copyq_APPDATA} DESTINATION ${APPDATA_INSTALL_PREFIX} RENAME ${APPDATA_INSTALL_NAME})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${copyq_DESKTOP} DESTINATION ${DESKTOP_INSTALL_PREFIX})

foreach (copyq_ICON_EXTENT 16 22 24 32 48 64 128)
set(copyq_ICON_SIZE "${copyq_ICON_EXTENT}x${copyq_ICON_EXTENT}")
Expand All @@ -199,7 +195,7 @@ if (UNIX AND NOT APPLE)
add_definitions( -DCOPYQ_ICON_PREFIX="${ICON_INSTALL_PREFIX}/${ICON_NAME}" )
add_definitions( -DCOPYQ_THEME_PREFIX="${THEME_INSTALL_PREFIX}" )
add_definitions( -DCOPYQ_PLUGIN_PREFIX="${PLUGIN_INSTALL_PREFIX}" )
add_definitions( -DCOPYQ_DESKTOP_FILE="${DESKTOP_INSTALL_PREFIX}/${DESKTOP_INSTALL_NAME}" )
add_definitions( -DCOPYQ_DESKTOP_FILE="${DESKTOP_INSTALL_PREFIX}/${copyq_DESKTOP}" )
add_definitions( -DCOPYQ_TRANSLATION_PREFIX="${TRANSLATION_INSTALL_PREFIX}" )
add_definitions( -DCOPYQ_ICON_NAME="${ICON_NAME}" )
endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 Lukáš Holeček <[email protected]> -->
<component type="desktop">
<id>${DESKTOP_INSTALL_NAME}</id>
<id>com.github.hluk.copyq.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>

Expand Down
File renamed without changes.

0 comments on commit a8026c1

Please sign in to comment.