diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 15 | ||||
-rw-r--r-- | melon.icns (renamed from melonDS.icns) | bin | 401172 -> 401172 bytes | |||
-rw-r--r-- | melon.plist.in (renamed from melonDS.plist) | 4 | ||||
-rw-r--r-- | melon.rc.in (renamed from melon.rc) | 8 | ||||
-rw-r--r-- | src/frontend/qt_sdl/CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/version.h | 2 |
7 files changed, 26 insertions, 11 deletions
@@ -6,6 +6,7 @@ obj *.o melon_grc.c melon_grc.h +melon.rc cmake-build cmake-build-debug .idea diff --git a/CMakeLists.txt b/CMakeLists.txt index 59a3f2d..467e7d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,21 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +set(MELONDS_VERSION "0.9.1") +add_compile_definitions(MELONDS_VERSION="${MELONDS_VERSION}") +string(REPLACE "." ";" VERSION_LIST ${MELONDS_VERSION}) +# For the melon.rc file used on Windows +list(GET VERSION_LIST 0 MELONDS_VERSION_MAJOR) +list(GET VERSION_LIST 1 MELONDS_VERSION_MINOR) +# Check if melonDS version is three digits or two digits +list(LENGTH VERSION_LIST MELONDS_VER_LEN) +if (${MELONDS_VER_LEN} GREATER 2) + list(GET VERSION_LIST 2 MELONDS_VERSION_PATCH) +else() + set(MELONDS_VERSION_PATCH 0) +endif() + + check_library_exists(m pow "" LIBM) if(LIBM) link_libraries(m) diff --git a/melonDS.icns b/melon.icns Binary files differindex b4f3733..b4f3733 100644 --- a/melonDS.icns +++ b/melon.icns diff --git a/melonDS.plist b/melon.plist.in index 8df5bf4..1e05a3a 100644 --- a/melonDS.plist +++ b/melon.plist.in @@ -13,9 +13,9 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleVersion</key> - <string>0.9.1</string> + <string>${MELONDS_VERSION}</string> <key>CFBundleShortVersionString</key> - <string>0.9.1</string> + <string>${MELONDS_VERSION}</string> <key>NSHumanReadableCopyright</key> <string>Licensed under GPLv3</string> <key>NSHighResolutionCapable</key> @@ -6,8 +6,8 @@ //include version information in .exe, modify these values to match your needs 1 VERSIONINFO -FILEVERSION 0,9,1,0 -PRODUCTVERSION 0,9,1,0 +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" @@ -15,14 +15,14 @@ FILETYPE VFT_APP BLOCK "040904E4" { VALUE "CompanyName", "Melon Factory of Kuribo64" - VALUE "FileVersion", "0.9.1" + VALUE "FileVersion", "${MELONDS_VERSION}" VALUE "FileDescription", "DS emulator, sorta. also 1st quality melon." VALUE "InternalName", "SDnolem" VALUE "LegalCopyright", "2016-2020 Arisotura & co." VALUE "LegalTrademarks", "" VALUE "OriginalFilename", "zafkflzdasd.exe" VALUE "ProductName", "melonDS" - VALUE "ProductVersion", "0.9.1" + VALUE "ProductVersion", "${MELONDS_VERSION}" } } BLOCK "VarFileInfo" diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt index f0362e5..72bf7c8 100644 --- a/src/frontend/qt_sdl/CMakeLists.txt +++ b/src/frontend/qt_sdl/CMakeLists.txt @@ -94,6 +94,7 @@ if (UNIX) target_link_libraries(melonDS dl Qt5::Core Qt5::Gui Qt5::Widgets) 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") target_sources(melonDS PUBLIC "${CMAKE_SOURCE_DIR}/melon.rc") target_link_libraries(melonDS comctl32 d2d1 dwrite uxtheme ws2_32 iphlpapi gdi32) @@ -111,13 +112,13 @@ endif() if (APPLE) set_target_properties(melonDS PROPERTIES MACOSX_BUNDLE true - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/melonDS.plist + 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}/melonDS.icns") - set_source_files_properties("${CMAKE_SOURCE_DIR}/melonDS.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) + target_sources(melonDS PRIVATE "${CMAKE_SOURCE_DIR}/melon.icns") + set_source_files_properties("${CMAKE_SOURCE_DIR}/melon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) endif() diff --git a/src/version.h b/src/version.h index 54f60df..1298a23 100644 --- a/src/version.h +++ b/src/version.h @@ -19,8 +19,6 @@ #ifndef VERSION_H #define VERSION_H -#define MELONDS_VERSION "0.9.1" - #define MELONDS_URL "http://melonds.kuribo64.net/" #endif // VERSION_H |