diff --git a/CMakeLists.txt b/CMakeLists.txt index 7dfe017..72f4c1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ file (COPY resources/image DESTINATION share/planetblupi) file (COPY resources/movie DESTINATION share/planetblupi) file (COPY resources/sound DESTINATION share/planetblupi) file (COPY resources/music DESTINATION share/planetblupi) -file (COPY resources/icon/blupi-256.png DESTINATION share/planetblupi) +file (COPY resources/icon/hicolor DESTINATION share/icons) # Windows stuff @@ -160,7 +160,7 @@ install (DIRECTORY resources/image DESTINATION share/planetblupi) install (DIRECTORY resources/movie DESTINATION share/planetblupi) install (DIRECTORY resources/sound DESTINATION share/planetblupi) install (DIRECTORY resources/music DESTINATION share/planetblupi) -install (FILES resources/icon/blupi-256.png DESTINATION share/planetblupi) +install (DIRECTORY resources/icon/hicolor DESTINATION share/icons) # Copy libwinpthread-1.dll which seems not be linkable statically if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND MINGW) @@ -178,7 +178,7 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release") if (USE_APPIMAGE) include (LinuxAppImageBuild) set (CMAKE_PACKAGED_OUTPUT_PREFIX ${CMAKE_INSTALL_PREFIX}) - APPIMAGE_PACKAGE (planetblupi "planetblupi" "Planet Blupi" "${CMAKE_CURRENT_SOURCE_DIR}/resources/linux" "${CMAKE_BINARY_DIR}/share" "" "") + APPIMAGE_PACKAGE (planetblupi "planetblupi" "Planet Blupi" "${CMAKE_CURRENT_SOURCE_DIR}/resources/linux" "${CMAKE_BINARY_DIR}/share" "" "" "blupi") elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") set (CPACK_GENERATOR "NSIS64;ZIP") set (CPACK_STRIP_FILES TRUE) diff --git a/cmake/LinuxAppImageBuild.cmake b/cmake/LinuxAppImageBuild.cmake index a242e3c..ecc02bc 100644 --- a/cmake/LinuxAppImageBuild.cmake +++ b/cmake/LinuxAppImageBuild.cmake @@ -6,7 +6,7 @@ set ( APPIMAGE_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/deploy/linux-appimage" CAC set ( APPIMAGE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/package/linux-appimage" CACHE PATH "AppImage output directory" ) set ( APPIMAGE_FOLLOW_STANDARD OFF CACHE BOOL "Whether generator should follow the spec" ) -macro( APPIMAGE_PACKAGE TARGET APPIMAGE_TITLE APPIMAGE_DISPLAYNAME CONFIGDIR DATA LIBRARIES LIBRARY_FILES ) +macro( APPIMAGE_PACKAGE TARGET APPIMAGE_TITLE APPIMAGE_DISPLAYNAME CONFIGDIR DATA LIBRARIES LIBRARY_FILES ICON_REF ) string ( TOLOWER "${APPIMAGE_TITLE}" APPIMAGE_INTERNALNAME ) string ( MAKE_C_IDENTIFIER "${APPIMAGE_INTERNALNAME}" APPIMAGE_INTERNALNAME ) @@ -23,7 +23,7 @@ macro( APPIMAGE_PACKAGE TARGET APPIMAGE_TITLE APPIMAGE_DISPLAYNAME CONFIGDIR DAT # Icon file to be used for the AppImage, only one in this case, preferrably SVG set ( APPIMAGE_ICON "${APPIMAGE_DEFAULT_ICON_FILE}" ) # We define a way to reference this icon based on where it is located - set ( APPIMAGE_ICON_REF "${APPIMAGE_INTERNALNAME}" ) + set ( APPIMAGE_ICON_REF "${ICON_REF}" ) # This helps the window manager to recognize the program even if it has no embedded or loaded icon set ( APPIMAGE_EXEC_WM ${TARGET} ) diff --git a/resources/icon/blupi-128.png b/resources/icon/hicolor/128x128/apps/blupi.png similarity index 100% rename from resources/icon/blupi-128.png rename to resources/icon/hicolor/128x128/apps/blupi.png diff --git a/resources/icon/blupi-16.png b/resources/icon/hicolor/16x16/apps/blupi.png similarity index 100% rename from resources/icon/blupi-16.png rename to resources/icon/hicolor/16x16/apps/blupi.png diff --git a/resources/icon/blupi-256.png b/resources/icon/hicolor/256x256/apps/blupi.png similarity index 100% rename from resources/icon/blupi-256.png rename to resources/icon/hicolor/256x256/apps/blupi.png diff --git a/resources/icon/blupi-32.png b/resources/icon/hicolor/32x32/apps/blupi.png similarity index 100% rename from resources/icon/blupi-32.png rename to resources/icon/hicolor/32x32/apps/blupi.png diff --git a/resources/icon/blupi-48.png b/resources/icon/hicolor/48x48/apps/blupi.png similarity index 100% rename from resources/icon/blupi-48.png rename to resources/icon/hicolor/48x48/apps/blupi.png diff --git a/resources/icon/blupi-512.png b/resources/icon/hicolor/512x512/apps/blupi.png similarity index 100% rename from resources/icon/blupi-512.png rename to resources/icon/hicolor/512x512/apps/blupi.png diff --git a/resources/icon/blupi-64.png b/resources/icon/hicolor/64x64/apps/blupi.png similarity index 100% rename from resources/icon/blupi-64.png rename to resources/icon/hicolor/64x64/apps/blupi.png diff --git a/resources/icon/blupi.svg b/resources/icon/hicolor/scalable/apps/blupi.svg similarity index 100% rename from resources/icon/blupi.svg rename to resources/icon/hicolor/scalable/apps/blupi.svg diff --git a/src/blupi.cxx b/src/blupi.cxx index 0825d76..ab16129 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -405,7 +405,7 @@ static bool DoInit (Sint32 argc, char *argv[]) return false; } - auto icon = IMG_Load ((GetBaseDir () + "blupi-256.png").c_str ()); + auto icon = IMG_Load ((GetShareDir () + "icons/hicolor/256x256/apps/blupi.png").c_str ()); SDL_SetWindowIcon (g_window, icon); SDL_FreeSurface (icon);