From a9fc0adf962af598972d9dde7b4b4a91c61837ba Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sun, 3 Oct 2021 11:37:33 +0200 Subject: 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> --- icon/melon_128x128.png | Bin 59159 -> 0 bytes icon/melon_16x16.png | Bin 730 -> 0 bytes icon/melon_256x256.png | Bin 149161 -> 0 bytes icon/melon_32x32.png | Bin 1686 -> 0 bytes icon/melon_48x48.png | Bin 3340 -> 0 bytes icon/melon_64x64.png | Bin 32364 -> 0 bytes melon.icns | Bin 401172 -> 0 bytes melon.ico | Bin 123533 -> 0 bytes melon.plist.in | 38 ---------------------------------- melon.qrc | 6 ------ melon.rc.in | 34 ------------------------------ melon_grc.xml | 11 ---------- net.kuribo64.melonDS.desktop | 11 ---------- res/icon/melon_128x128.png | Bin 0 -> 59159 bytes res/icon/melon_16x16.png | Bin 0 -> 730 bytes res/icon/melon_256x256.png | Bin 0 -> 149161 bytes res/icon/melon_32x32.png | Bin 0 -> 1686 bytes res/icon/melon_48x48.png | Bin 0 -> 3340 bytes res/icon/melon_64x64.png | Bin 0 -> 32364 bytes res/melon.icns | Bin 0 -> 401172 bytes res/melon.ico | Bin 0 -> 123533 bytes res/melon.plist.in | 38 ++++++++++++++++++++++++++++++++++ res/melon.qrc | 6 ++++++ res/melon.rc.in | 34 ++++++++++++++++++++++++++++++ res/net.kuribo64.melonDS.desktop | 11 ++++++++++ res/xp.manifest | 23 +++++++++++++++++++++ src/frontend/qt_sdl/CMakeLists.txt | 41 ++++++++++++++++++++----------------- xp.manifest | 23 --------------------- 28 files changed, 134 insertions(+), 142 deletions(-) delete mode 100755 icon/melon_128x128.png delete mode 100755 icon/melon_16x16.png delete mode 100755 icon/melon_256x256.png delete mode 100755 icon/melon_32x32.png delete mode 100755 icon/melon_48x48.png delete mode 100755 icon/melon_64x64.png delete mode 100644 melon.icns delete mode 100644 melon.ico delete mode 100644 melon.plist.in delete mode 100644 melon.qrc delete mode 100644 melon.rc.in delete mode 100644 melon_grc.xml delete mode 100644 net.kuribo64.melonDS.desktop create mode 100755 res/icon/melon_128x128.png create mode 100755 res/icon/melon_16x16.png create mode 100755 res/icon/melon_256x256.png create mode 100755 res/icon/melon_32x32.png create mode 100755 res/icon/melon_48x48.png create mode 100755 res/icon/melon_64x64.png create mode 100644 res/melon.icns create mode 100644 res/melon.ico create mode 100644 res/melon.plist.in create mode 100644 res/melon.qrc create mode 100644 res/melon.rc.in create mode 100644 res/net.kuribo64.melonDS.desktop create mode 100644 res/xp.manifest delete mode 100644 xp.manifest diff --git a/icon/melon_128x128.png b/icon/melon_128x128.png deleted file mode 100755 index b8cd179..0000000 Binary files a/icon/melon_128x128.png and /dev/null differ diff --git a/icon/melon_16x16.png b/icon/melon_16x16.png deleted file mode 100755 index 4fdce27..0000000 Binary files a/icon/melon_16x16.png and /dev/null differ diff --git a/icon/melon_256x256.png b/icon/melon_256x256.png deleted file mode 100755 index 59bf63a..0000000 Binary files a/icon/melon_256x256.png and /dev/null differ diff --git a/icon/melon_32x32.png b/icon/melon_32x32.png deleted file mode 100755 index 3d31487..0000000 Binary files a/icon/melon_32x32.png and /dev/null differ diff --git a/icon/melon_48x48.png b/icon/melon_48x48.png deleted file mode 100755 index c6ff679..0000000 Binary files a/icon/melon_48x48.png and /dev/null differ diff --git a/icon/melon_64x64.png b/icon/melon_64x64.png deleted file mode 100755 index 6182efb..0000000 Binary files a/icon/melon_64x64.png and /dev/null differ diff --git a/melon.icns b/melon.icns deleted file mode 100644 index b4f3733..0000000 Binary files a/melon.icns and /dev/null differ diff --git a/melon.ico b/melon.ico deleted file mode 100644 index 3870279..0000000 Binary files a/melon.ico and /dev/null differ diff --git a/melon.plist.in b/melon.plist.in deleted file mode 100644 index 1057c47..0000000 --- a/melon.plist.in +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleExecutable - melonDS - CFBundleIconFile - melon.icns - CFBundleIdentifier - net.kuribo64.melonDS - CFBundleDevelopmentRegion - English - CFBundlePackageType - APPL - CFBundleVersion - ${MELONDS_VERSION} - CFBundleShortVersionString - ${MELONDS_VERSION} - NSHumanReadableCopyright - Licensed under GPLv3 - NSHighResolutionCapable - - NSMicrophoneUsageDescription - We need microphone access so you can use the emulated DS microphone - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - nds - srl - - CFBundleTypeRole - Viewer - - - - diff --git a/melon.qrc b/melon.qrc deleted file mode 100644 index 38915bb..0000000 --- a/melon.qrc +++ /dev/null @@ -1,6 +0,0 @@ - - - - icon/melon_256x256.png - - diff --git a/melon.rc.in b/melon.rc.in deleted file mode 100644 index ce8e4ba..0000000 --- a/melon.rc.in +++ /dev/null @@ -1,34 +0,0 @@ -#define VOS_NT_WINDOWS32 0x00040004L -#define VFT_APP 0x00000001L - -//this will set your .exe icon -100 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "melon.ico" - -//include version information in .exe, modify these values to match your needs -1 VERSIONINFO -FILEVERSION ${MELONDS_VERSION_MAJOR},${MELONDS_VERSION_MINOR},${MELONDS_VERSION_PATCH},0 -PRODUCTVERSION ${MELONDS_VERSION_MAJOR},${MELONDS_VERSION_MINOR},${MELONDS_VERSION_PATCH},0 -FILETYPE VFT_APP -{ - BLOCK "StringFileInfo" - { - BLOCK "040904E4" - { - VALUE "CompanyName", "Melon Factory of Kuribo64" - VALUE "FileVersion", "${MELONDS_VERSION}" - VALUE "FileDescription", "DS emulator, sorta. also 1st quality melon." - VALUE "InternalName", "SDnolem" - VALUE "LegalCopyright", "2016-2021 Arisotura & co." - VALUE "LegalTrademarks", "" - VALUE "OriginalFilename", "zafkflzdasd.exe" - VALUE "ProductName", "melonDS" - VALUE "ProductVersion", "${MELONDS_VERSION}" - } - } - BLOCK "VarFileInfo" - { - VALUE "Translation", 0x0409, 1252 //language codes - } -} - -1 24 "xp.manifest" 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 @@ - - - - icon/melon_16x16.png - icon/melon_32x32.png - icon/melon_48x48.png - icon/melon_64x64.png - icon/melon_128x128.png - icon/melon_256x256.png - - diff --git a/net.kuribo64.melonDS.desktop b/net.kuribo64.melonDS.desktop deleted file mode 100644 index de12ecc..0000000 --- a/net.kuribo64.melonDS.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=melonDS -GenericName=Nintendo DS Emulator -Comment=A fast and accurate Nintendo DS emulator. -Exec=melonDS %f -Type=Application -Categories=Game;Emulator; -Terminal=false -Icon=net.kuribo64.melonDS -MimeType=application/x-nintendo-ds-rom; -Keywords=emulator;Nintendo;DS;NDS;Nintendo DS; diff --git a/res/icon/melon_128x128.png b/res/icon/melon_128x128.png new file mode 100755 index 0000000..b8cd179 Binary files /dev/null and b/res/icon/melon_128x128.png differ diff --git a/res/icon/melon_16x16.png b/res/icon/melon_16x16.png new file mode 100755 index 0000000..4fdce27 Binary files /dev/null and b/res/icon/melon_16x16.png differ diff --git a/res/icon/melon_256x256.png b/res/icon/melon_256x256.png new file mode 100755 index 0000000..59bf63a Binary files /dev/null and b/res/icon/melon_256x256.png differ diff --git a/res/icon/melon_32x32.png b/res/icon/melon_32x32.png new file mode 100755 index 0000000..3d31487 Binary files /dev/null and b/res/icon/melon_32x32.png differ diff --git a/res/icon/melon_48x48.png b/res/icon/melon_48x48.png new file mode 100755 index 0000000..c6ff679 Binary files /dev/null and b/res/icon/melon_48x48.png differ diff --git a/res/icon/melon_64x64.png b/res/icon/melon_64x64.png new file mode 100755 index 0000000..6182efb Binary files /dev/null and b/res/icon/melon_64x64.png differ diff --git a/res/melon.icns b/res/melon.icns new file mode 100644 index 0000000..b4f3733 Binary files /dev/null and b/res/melon.icns differ diff --git a/res/melon.ico b/res/melon.ico new file mode 100644 index 0000000..3870279 Binary files /dev/null and b/res/melon.ico differ diff --git a/res/melon.plist.in b/res/melon.plist.in new file mode 100644 index 0000000..1057c47 --- /dev/null +++ b/res/melon.plist.in @@ -0,0 +1,38 @@ + + + + + CFBundleExecutable + melonDS + CFBundleIconFile + melon.icns + CFBundleIdentifier + net.kuribo64.melonDS + CFBundleDevelopmentRegion + English + CFBundlePackageType + APPL + CFBundleVersion + ${MELONDS_VERSION} + CFBundleShortVersionString + ${MELONDS_VERSION} + NSHumanReadableCopyright + Licensed under GPLv3 + NSHighResolutionCapable + + NSMicrophoneUsageDescription + We need microphone access so you can use the emulated DS microphone + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + nds + srl + + CFBundleTypeRole + Viewer + + + + diff --git a/res/melon.qrc b/res/melon.qrc new file mode 100644 index 0000000..38915bb --- /dev/null +++ b/res/melon.qrc @@ -0,0 +1,6 @@ + + + + icon/melon_256x256.png + + diff --git a/res/melon.rc.in b/res/melon.rc.in new file mode 100644 index 0000000..d38f86c --- /dev/null +++ b/res/melon.rc.in @@ -0,0 +1,34 @@ +#define VOS_NT_WINDOWS32 0x00040004L +#define VFT_APP 0x00000001L + +//this will set your .exe icon +100 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "res/melon.ico" + +//include version information in .exe, modify these values to match your needs +1 VERSIONINFO +FILEVERSION ${MELONDS_VERSION_MAJOR},${MELONDS_VERSION_MINOR},${MELONDS_VERSION_PATCH},0 +PRODUCTVERSION ${MELONDS_VERSION_MAJOR},${MELONDS_VERSION_MINOR},${MELONDS_VERSION_PATCH},0 +FILETYPE VFT_APP +{ + BLOCK "StringFileInfo" + { + BLOCK "040904E4" + { + VALUE "CompanyName", "Melon Factory of Kuribo64" + VALUE "FileVersion", "${MELONDS_VERSION}" + VALUE "FileDescription", "DS emulator, sorta. also 1st quality melon." + VALUE "InternalName", "SDnolem" + VALUE "LegalCopyright", "2016-2021 Arisotura & co." + VALUE "LegalTrademarks", "" + VALUE "OriginalFilename", "zafkflzdasd.exe" + VALUE "ProductName", "melonDS" + VALUE "ProductVersion", "${MELONDS_VERSION}" + } + } + BLOCK "VarFileInfo" + { + VALUE "Translation", 0x0409, 1252 //language codes + } +} + +1 24 "res/xp.manifest" diff --git a/res/net.kuribo64.melonDS.desktop b/res/net.kuribo64.melonDS.desktop new file mode 100644 index 0000000..de12ecc --- /dev/null +++ b/res/net.kuribo64.melonDS.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=melonDS +GenericName=Nintendo DS Emulator +Comment=A fast and accurate Nintendo DS emulator. +Exec=melonDS %f +Type=Application +Categories=Game;Emulator; +Terminal=false +Icon=net.kuribo64.melonDS +MimeType=application/x-nintendo-ds-rom; +Keywords=emulator;Nintendo;DS;NDS;Nintendo DS; diff --git a/res/xp.manifest b/res/xp.manifest new file mode 100644 index 0000000..85ca945 --- /dev/null +++ b/res/xp.manifest @@ -0,0 +1,23 @@ + + + +Project + + + + + + 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() diff --git a/xp.manifest b/xp.manifest deleted file mode 100644 index 85ca945..0000000 --- a/xp.manifest +++ /dev/null @@ -1,23 +0,0 @@ - - - -Project - - - - - - -- cgit v1.2.3