From dee576bfeb15714656635a6710cbc7aacee104da Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Thu, 27 Mar 2025 00:12:19 +0000 Subject: [PATCH] Use reverse TLD filenames for installed Linux files where appropriate --- CMakeLists.txt | 11 +++++++---- CMakeModules/BundleTarget.cmake | 5 ++++- dist/azahar-room.desktop | 2 +- dist/azahar.desktop | 2 +- dist/{azahar.xml => org.azahar_emu.Azahar.xml} | 0 5 files changed, 13 insertions(+), 7 deletions(-) rename dist/{azahar.xml => org.azahar_emu.Azahar.xml} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cff23ea7..55a60fd43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -492,11 +492,14 @@ endif() # http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html if(ENABLE_QT AND UNIX AND NOT APPLE) install(FILES "${PROJECT_SOURCE_DIR}/dist/azahar.desktop" - DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications") + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications" + RENAME "org.azahar_emu.Azahar.desktop") install(FILES "${PROJECT_SOURCE_DIR}/dist/azahar.svg" - DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps") + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps" + RENAME "org.azahar_emu.Azahar.svg") install(FILES "${PROJECT_SOURCE_DIR}/dist/azahar.png" - DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps") - install(FILES "${PROJECT_SOURCE_DIR}/dist/azahar.xml" + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps" + RENAME "org.azahar_emu.Azahar.png") + install(FILES "${PROJECT_SOURCE_DIR}/dist/org.azahar_emu.Azahar.xml" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/mime/packages") endif() diff --git a/CMakeModules/BundleTarget.cmake b/CMakeModules/BundleTarget.cmake index 592f271a4..38a96b1de 100644 --- a/CMakeModules/BundleTarget.cmake +++ b/CMakeModules/BundleTarget.cmake @@ -117,6 +117,9 @@ if (BUNDLE_TARGET_EXECUTE) set(extra_linuxdeploy_args --plugin qt) endif() + # Set up app icon + file(COPY_FILE "${source_path}/dist/azahar.svg" "${CMAKE_BINARY_DIR}/dist/org.azahar_emu.Azahar.svg") + message(STATUS "Creating AppDir for executable ${executable_path}") execute_process(COMMAND ${CMAKE_COMMAND} -E env ${extra_linuxdeploy_env} @@ -124,7 +127,7 @@ if (BUNDLE_TARGET_EXECUTE) ${extra_linuxdeploy_args} --plugin checkrt --executable "${executable_path}" - --icon-file "${source_path}/dist/azahar.svg" + --icon-file "${CMAKE_BINARY_DIR}/dist/org.azahar_emu.Azahar.svg" --desktop-file "${source_path}/dist/${executable_name}.desktop" --appdir "${appdir_path}" RESULT_VARIABLE linuxdeploy_appdir_result) diff --git a/dist/azahar-room.desktop b/dist/azahar-room.desktop index a4c8ca255..c123717be 100644 --- a/dist/azahar-room.desktop +++ b/dist/azahar-room.desktop @@ -3,7 +3,7 @@ Version=1.0 Type=Application Name=Azahar Room Comment=Multiplayer room host for Azahar -Icon=azahar +Icon=org.azahar_emu.Azahar TryExec=azahar-room Exec=azahar-room %f Categories=Game;Emulator; diff --git a/dist/azahar.desktop b/dist/azahar.desktop index 31ccea05a..11254bb7a 100644 --- a/dist/azahar.desktop +++ b/dist/azahar.desktop @@ -6,7 +6,7 @@ GenericName=3DS Emulator GenericName[fr]=Émulateur 3DS Comment=Nintendo 3DS video game console emulator Comment[fr]=Émulateur de console de jeu Nintendo 3DS -Icon=azahar +Icon=org.azahar_emu.Azahar TryExec=azahar Exec=azahar %f Categories=Game;Emulator; diff --git a/dist/azahar.xml b/dist/org.azahar_emu.Azahar.xml similarity index 100% rename from dist/azahar.xml rename to dist/org.azahar_emu.Azahar.xml