aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadia Holmquist Pedersen <nadia@nhp.sh>2021-10-03 11:37:33 +0200
committerGitHub <noreply@github.com>2021-10-03 09:37:33 +0000
commita9fc0adf962af598972d9dde7b4b4a91c61837ba (patch)
treecf47a2f8233f97f2e476c9d83e1a31dde93145c5
parentd378b0252f0f8ea7a97889e35320a49b9192affc (diff)
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>
-rw-r--r--melon_grc.xml11
-rwxr-xr-xres/icon/melon_128x128.png (renamed from icon/melon_128x128.png)bin59159 -> 59159 bytes
-rwxr-xr-xres/icon/melon_16x16.png (renamed from icon/melon_16x16.png)bin730 -> 730 bytes
-rwxr-xr-xres/icon/melon_256x256.png (renamed from icon/melon_256x256.png)bin149161 -> 149161 bytes
-rwxr-xr-xres/icon/melon_32x32.png (renamed from icon/melon_32x32.png)bin1686 -> 1686 bytes
-rwxr-xr-xres/icon/melon_48x48.png (renamed from icon/melon_48x48.png)bin3340 -> 3340 bytes
-rwxr-xr-xres/icon/melon_64x64.png (renamed from icon/melon_64x64.png)bin32364 -> 32364 bytes
-rw-r--r--res/melon.icns (renamed from melon.icns)bin401172 -> 401172 bytes
-rw-r--r--res/melon.ico (renamed from melon.ico)bin123533 -> 123533 bytes
-rw-r--r--res/melon.plist.in (renamed from melon.plist.in)0
-rw-r--r--res/melon.qrc (renamed from melon.qrc)0
-rw-r--r--res/melon.rc.in (renamed from melon.rc.in)4
-rw-r--r--res/net.kuribo64.melonDS.desktop (renamed from net.kuribo64.melonDS.desktop)0
-rw-r--r--res/xp.manifest (renamed from xp.manifest)0
-rw-r--r--src/frontend/qt_sdl/CMakeLists.txt41
15 files changed, 24 insertions, 32 deletions
diff --git a/melon_grc.xml b/melon_grc.xml
deleted file mode 100644
index f494272..0000000
--- a/melon_grc.xml
+++ /dev/null
@@ -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>
diff --git a/icon/melon_128x128.png b/res/icon/melon_128x128.png
index b8cd179..b8cd179 100755
--- a/icon/melon_128x128.png
+++ b/res/icon/melon_128x128.png
Binary files differ
diff --git a/icon/melon_16x16.png b/res/icon/melon_16x16.png
index 4fdce27..4fdce27 100755
--- a/icon/melon_16x16.png
+++ b/res/icon/melon_16x16.png
Binary files differ
diff --git a/icon/melon_256x256.png b/res/icon/melon_256x256.png
index 59bf63a..59bf63a 100755
--- a/icon/melon_256x256.png
+++ b/res/icon/melon_256x256.png
Binary files differ
diff --git a/icon/melon_32x32.png b/res/icon/melon_32x32.png
index 3d31487..3d31487 100755
--- a/icon/melon_32x32.png
+++ b/res/icon/melon_32x32.png
Binary files differ
diff --git a/icon/melon_48x48.png b/res/icon/melon_48x48.png
index c6ff679..c6ff679 100755
--- a/icon/melon_48x48.png
+++ b/res/icon/melon_48x48.png
Binary files differ
diff --git a/icon/melon_64x64.png b/res/icon/melon_64x64.png
index 6182efb..6182efb 100755
--- a/icon/melon_64x64.png
+++ b/res/icon/melon_64x64.png
Binary files differ
diff --git a/melon.icns b/res/melon.icns
index b4f3733..b4f3733 100644
--- a/melon.icns
+++ b/res/melon.icns
Binary files differ
diff --git a/melon.ico b/res/melon.ico
index 3870279..3870279 100644
--- a/melon.ico
+++ b/res/melon.ico
Binary files differ
diff --git a/melon.plist.in b/res/melon.plist.in
index 1057c47..1057c47 100644
--- a/melon.plist.in
+++ b/res/melon.plist.in
diff --git a/melon.qrc b/res/melon.qrc
index 38915bb..38915bb 100644
--- a/melon.qrc
+++ b/res/melon.qrc
diff --git a/melon.rc.in b/res/melon.rc.in
index ce8e4ba..d38f86c 100644
--- a/melon.rc.in
+++ b/res/melon.rc.in
@@ -2,7 +2,7 @@
#define VFT_APP 0x00000001L
//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
1 VERSIONINFO
@@ -31,4 +31,4 @@ FILETYPE VFT_APP
}
}
-1 24 "xp.manifest"
+1 24 "res/xp.manifest"
diff --git a/net.kuribo64.melonDS.desktop b/res/net.kuribo64.melonDS.desktop
index de12ecc..de12ecc 100644
--- a/net.kuribo64.melonDS.desktop
+++ b/res/net.kuribo64.melonDS.desktop
diff --git a/xp.manifest b/res/xp.manifest
index 85ca945..85ca945 100644
--- a/xp.manifest
+++ b/res/xp.manifest
diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt
index cb81049..1d987a4 100644
--- a/src/frontend/qt_sdl/CMakeLists.txt
+++ b/src/frontend/qt_sdl/CMakeLists.txt
@@ -14,7 +14,7 @@ SET(SOURCES_QT_SDL
WifiSettingsDialog.cpp
InterfaceSettingsDialog.cpp
ROMInfoDialog.cpp
- TitleManagerDialog.cpp
+ TitleManagerDialog.cpp
Input.cpp
LAN_PCap.cpp
LAN_Socket.cpp
@@ -34,7 +34,7 @@ SET(SOURCES_QT_SDL
../FrontendUtil.h
../mic_blow.h
- ../../../melon.qrc
+ ${CMAKE_SOURCE_DIR}/res/melon.qrc
)
option(USE_QT6 "Build using Qt 6 instead of 5" OFF)
@@ -117,7 +117,7 @@ if (UNIX)
endif()
elseif (WIN32)
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_link_libraries(melonDS comctl32 d2d1 dwrite uxtheme ws2_32 iphlpapi gdi32)
@@ -133,15 +133,16 @@ if (PORTABLE)
endif()
if (APPLE)
- set_target_properties(melonDS PROPERTIES
- MACOSX_BUNDLE true
- MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/melon.plist.in
- OUTPUT_NAME melonDS
- )
-
# 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)
+ set(RESOURCE_FILES "${CMAKE_SOURCE_DIR}/res/melon.icns")
+ target_sources(melonDS PUBLIC "${RESOURCE_FILES}")
+
+ set_target_properties(melonDS PROPERTIES
+ MACOSX_BUNDLE true
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/melon.plist.in
+ OUTPUT_NAME melonDS
+ RESOURCE "${RESOURCE_FILES}")
+
# Qt 6 requires macOS 10.15 if building on 10.15 or greater
if(CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 19.0.0)
@@ -163,11 +164,13 @@ if (APPLE)
endif()
endif()
-install(FILES ../../../net.kuribo64.melonDS.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
-install(FILES ../../../icon/melon_16x16.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/16x16/apps RENAME net.kuribo64.melonDS.png)
-install(FILES ../../../icon/melon_32x32.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/32x32/apps RENAME net.kuribo64.melonDS.png)
-install(FILES ../../../icon/melon_48x48.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps RENAME net.kuribo64.melonDS.png)
-install(FILES ../../../icon/melon_64x64.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/64x64/apps 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)
-install(FILES ../../../icon/melon_256x256.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps RENAME net.kuribo64.melonDS.png)
-install(TARGETS melonDS BUNDLE DESTINATION ${CMAKE_BINARY_DIR} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+if (UNIX AND NOT APPLE)
+ foreach(SIZE 16 32 48 64 128 256)
+ install(FILES ${CMAKE_SOURCE_DIR}/res/icon/melon_${SIZE}x${SIZE}.png
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/${SIZE}x${SIZE}/apps
+ RENAME net.kuribo64.melonDS.png)
+ endforeach()
+
+ 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)
+endif()