Move resources to res/ directory (#1204)
* Move resources to res/ directory and update CMake scripts accordingly Co-authored-by: Rayyan Ansari <68647953+RayyanAnsari@users.noreply.github.com>
|
@ -1,11 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<gresources>
|
|
||||||
<gresource prefix="/org/kuriboland/melonDS">
|
|
||||||
<file preprocess="to-pixdata">icon/melon_16x16.png</file>
|
|
||||||
<file preprocess="to-pixdata">icon/melon_32x32.png</file>
|
|
||||||
<file preprocess="to-pixdata">icon/melon_48x48.png</file>
|
|
||||||
<file preprocess="to-pixdata">icon/melon_64x64.png</file>
|
|
||||||
<file preprocess="to-pixdata">icon/melon_128x128.png</file>
|
|
||||||
<file preprocess="to-pixdata">icon/melon_256x256.png</file>
|
|
||||||
</gresource>
|
|
||||||
</gresources>
|
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 730 B |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
|
@ -2,7 +2,7 @@
|
||||||
#define VFT_APP 0x00000001L
|
#define VFT_APP 0x00000001L
|
||||||
|
|
||||||
//this will set your .exe icon
|
//this will set your .exe icon
|
||||||
100 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "melon.ico"
|
100 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "res/melon.ico"
|
||||||
|
|
||||||
//include version information in .exe, modify these values to match your needs
|
//include version information in .exe, modify these values to match your needs
|
||||||
1 VERSIONINFO
|
1 VERSIONINFO
|
||||||
|
@ -31,4 +31,4 @@ FILETYPE VFT_APP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
1 24 "xp.manifest"
|
1 24 "res/xp.manifest"
|
|
@ -34,7 +34,7 @@ SET(SOURCES_QT_SDL
|
||||||
../FrontendUtil.h
|
../FrontendUtil.h
|
||||||
../mic_blow.h
|
../mic_blow.h
|
||||||
|
|
||||||
../../../melon.qrc
|
${CMAKE_SOURCE_DIR}/res/melon.qrc
|
||||||
)
|
)
|
||||||
|
|
||||||
option(USE_QT6 "Build using Qt 6 instead of 5" OFF)
|
option(USE_QT6 "Build using Qt 6 instead of 5" OFF)
|
||||||
|
@ -117,7 +117,7 @@ if (UNIX)
|
||||||
endif()
|
endif()
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
option(PORTABLE "Make a portable build that looks for its configuration in the current directory" ON)
|
option(PORTABLE "Make a portable build that looks for its configuration in the current directory" ON)
|
||||||
configure_file("${CMAKE_SOURCE_DIR}/melon.rc.in" "${CMAKE_SOURCE_DIR}/melon.rc")
|
configure_file("${CMAKE_SOURCE_DIR}/res/melon.rc.in" "${CMAKE_SOURCE_DIR}/melon.rc")
|
||||||
target_sources(melonDS PUBLIC "${CMAKE_SOURCE_DIR}/melon.rc")
|
target_sources(melonDS PUBLIC "${CMAKE_SOURCE_DIR}/melon.rc")
|
||||||
|
|
||||||
target_link_libraries(melonDS comctl32 d2d1 dwrite uxtheme ws2_32 iphlpapi gdi32)
|
target_link_libraries(melonDS comctl32 d2d1 dwrite uxtheme ws2_32 iphlpapi gdi32)
|
||||||
|
@ -133,15 +133,16 @@ if (PORTABLE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
# Copy icon into the bundle
|
||||||
|
set(RESOURCE_FILES "${CMAKE_SOURCE_DIR}/res/melon.icns")
|
||||||
|
target_sources(melonDS PUBLIC "${RESOURCE_FILES}")
|
||||||
|
|
||||||
set_target_properties(melonDS PROPERTIES
|
set_target_properties(melonDS PROPERTIES
|
||||||
MACOSX_BUNDLE true
|
MACOSX_BUNDLE true
|
||||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/melon.plist.in
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/melon.plist.in
|
||||||
OUTPUT_NAME melonDS
|
OUTPUT_NAME melonDS
|
||||||
)
|
RESOURCE "${RESOURCE_FILES}")
|
||||||
|
|
||||||
# Copy icon into the bundle
|
|
||||||
target_sources(melonDS PRIVATE "${CMAKE_SOURCE_DIR}/melon.icns")
|
|
||||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/melon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
|
||||||
|
|
||||||
# Qt 6 requires macOS 10.15 if building on 10.15 or greater
|
# Qt 6 requires macOS 10.15 if building on 10.15 or greater
|
||||||
if(CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 19.0.0)
|
if(CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 19.0.0)
|
||||||
|
@ -163,11 +164,13 @@ if (APPLE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(FILES ../../../net.kuribo64.melonDS.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
if (UNIX AND NOT APPLE)
|
||||||
install(FILES ../../../icon/melon_16x16.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/16x16/apps RENAME net.kuribo64.melonDS.png)
|
foreach(SIZE 16 32 48 64 128 256)
|
||||||
install(FILES ../../../icon/melon_32x32.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/32x32/apps RENAME net.kuribo64.melonDS.png)
|
install(FILES ${CMAKE_SOURCE_DIR}/res/icon/melon_${SIZE}x${SIZE}.png
|
||||||
install(FILES ../../../icon/melon_48x48.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps RENAME net.kuribo64.melonDS.png)
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/${SIZE}x${SIZE}/apps
|
||||||
install(FILES ../../../icon/melon_64x64.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/64x64/apps RENAME net.kuribo64.melonDS.png)
|
RENAME net.kuribo64.melonDS.png)
|
||||||
install(FILES ../../../icon/melon_128x128.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/128x128/apps RENAME net.kuribo64.melonDS.png)
|
endforeach()
|
||||||
install(FILES ../../../icon/melon_256x256.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps RENAME net.kuribo64.melonDS.png)
|
|
||||||
|
install(FILES ${CMAKE_SOURCE_DIR}/res/net.kuribo64.melonDS.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||||
install(TARGETS melonDS BUNDLE DESTINATION ${CMAKE_BINARY_DIR} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS melonDS BUNDLE DESTINATION ${CMAKE_BINARY_DIR} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
endif()
|
||||||
|
|