win: set correct version in rc

xvbam.rc: use version.h to generate version strings,
cmake: adding version in odd format required by rc
This commit is contained in:
Ar't 2019-10-02 23:32:35 +00:00 committed by Rafael Kitover
parent 09fbcbac07
commit ced2676926
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
3 changed files with 15 additions and 5 deletions

View File

@ -215,6 +215,7 @@ endif()
# generate version.h # generate version.h
include_directories(${CMAKE_BINARY_DIR}) 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) configure_file("${CMAKE_SOURCE_DIR}/src/version.h.in" "${CMAKE_BINARY_DIR}/version.h" @ONLY)
if(CMAKE_BUILD_TYPE MATCHES Debug) if(CMAKE_BUILD_TYPE MATCHES Debug)

View File

@ -43,3 +43,6 @@
#define VBA_NAME_AND_SUBVERSION VBA_NAME_AND_VERSION VBA_SUBVERSION_STRING #define VBA_NAME_AND_SUBVERSION VBA_NAME_AND_VERSION VBA_SUBVERSION_STRING
#define VERSION VBA_CURRENT_VERSION VBA_SUBVERSION_STRING #define VERSION VBA_CURRENT_VERSION VBA_SUBVERSION_STRING
#define VER_FILEVERSION_STR VERSION
#define VER_FILEVERSION @WIN_VERSION@

View File

@ -1,15 +1,21 @@
#pragma code_page(65001)
AAAAA_MAINICON ICON "icons/vbam.ico" AAAAA_MAINICON ICON "icons/vbam.ico"
#include "wx/msw/wx.rc" #include "wx/msw/wx.rc"
#include "version.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Version // Version
// //
#define VER_PRODUCTVERSION VER_FILEVERSION
#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,0 FILEVERSION VER_FILEVERSION
PRODUCTVERSION 2,0,0,0 PRODUCTVERSION VER_PRODUCTVERSION
FILEFLAGSMASK 0x17L FILEFLAGSMASK 0x17L
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -27,12 +33,12 @@ BEGIN
VALUE "Comments", "VBA-M comes with NO WARRANTY. Use it at your own risk." VALUE "Comments", "VBA-M comes with NO WARRANTY. Use it at your own risk."
VALUE "CompanyName", "http://vba-m.com/" VALUE "CompanyName", "http://vba-m.com/"
VALUE "FileDescription", "VisualBoyAdvance-M" VALUE "FileDescription", "VisualBoyAdvance-M"
VALUE "FileVersion", "2, 0, 0, 0" VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "VBA-M" 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 "OriginalFilename", "VisualBoyAdvance-M.exe"
VALUE "ProductName", "VisualBoyAdvance-M" VALUE "ProductName", "VisualBoyAdvance-M"
VALUE "ProductVersion", "2, 0, 0, 0" VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"