diff --git a/CMakeLists.txt b/CMakeLists.txt index 010c9b0e..aa827cff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -215,6 +215,7 @@ endif() # generate version.h include_directories(${CMAKE_BINARY_DIR}) +string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\1,\\2,\\3,0" WIN_VERSION "${VERSION}") configure_file("${CMAKE_SOURCE_DIR}/src/version.h.in" "${CMAKE_BINARY_DIR}/version.h" @ONLY) if(CMAKE_BUILD_TYPE MATCHES Debug) diff --git a/src/version.h.in b/src/version.h.in index 02bce794..055e526f 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -43,3 +43,6 @@ #define VBA_NAME_AND_SUBVERSION VBA_NAME_AND_VERSION VBA_SUBVERSION_STRING #define VERSION VBA_CURRENT_VERSION VBA_SUBVERSION_STRING + +#define VER_FILEVERSION_STR VERSION +#define VER_FILEVERSION @WIN_VERSION@ diff --git a/src/wx/wxvbam.rc b/src/wx/wxvbam.rc index 836bd454..1451ae90 100644 --- a/src/wx/wxvbam.rc +++ b/src/wx/wxvbam.rc @@ -1,15 +1,21 @@ +#pragma code_page(65001) AAAAA_MAINICON ICON "icons/vbam.ico" #include "wx/msw/wx.rc" +#include "version.h" + ///////////////////////////////////////////////////////////////////////////// // // Version // +#define VER_PRODUCTVERSION VER_FILEVERSION +#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR + VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,0,0 - PRODUCTVERSION 2,0,0,0 + FILEVERSION VER_FILEVERSION + PRODUCTVERSION VER_PRODUCTVERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -27,12 +33,12 @@ BEGIN VALUE "Comments", "VBA-M comes with NO WARRANTY. Use it at your own risk." VALUE "CompanyName", "http://vba-m.com/" VALUE "FileDescription", "VisualBoyAdvance-M" - VALUE "FileVersion", "2, 0, 0, 0" + VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "VBA-M" - VALUE "LegalCopyright", "Copyright © 2008-2015 VBA-M development team" + VALUE "LegalCopyright", "Copyright © 2008-2019 VBA-M development team" VALUE "OriginalFilename", "VisualBoyAdvance-M.exe" VALUE "ProductName", "VisualBoyAdvance-M" - VALUE "ProductVersion", "2, 0, 0, 0" + VALUE "ProductVersion", VER_PRODUCTVERSION_STR END END BLOCK "VarFileInfo"