From 9c6074607989bfc3bae952c20951adc8ee9a16ab Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Thu, 12 May 2016 17:30:39 +0200 Subject: [PATCH] Hack for building pre-release versions on Windows --- OpenBoard.pro | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/OpenBoard.pro b/OpenBoard.pro index 50ea777a..e1bc733f 100644 --- a/OpenBoard.pro +++ b/OpenBoard.pro @@ -91,8 +91,6 @@ UB_FONTS.files = resources/fonts UB_THIRDPARTY_INTERACTIVE.files = thirdparty/interactive DEFINES += NO_THIRD_PARTY_WARNINGS -DEFINES += UBVERSION=\"\\\"$${LONG_VERSION}\"\\\" \ - UBVERSION_RC=$$VERSION_RC ALPHA_BETA_STR = $$find(VERSION, "[ab]") count(ALPHA_BETA_STR, 1):DEFINES += PRE_RELEASE BUILD_DIR = build @@ -140,6 +138,19 @@ win32 { DEFINES += NOMINMAX # avoids compilation error in qdatetime.h + # Windows doesn't support file versions with more than 4 fields, so + # we omit the build number (which is only used for pre-release versions + # anyway) + + VERSION_RC = $$VERSION_MAJ,$$VERSION_MIN,$$VERSION_PATCH,$$VERSION_TYPE + VERSION_RC = $$replace(VERSION_RC, "a", "160") # 0xA0 + VERSION_RC = $$replace(VERSION_RC, "b", "176") # 0xB0 + VERSION_RC = $$replace(VERSION_RC, "rc", "192" ) # 0xC0 + VERSION_RC = $$replace(VERSION_RC, "r", "240") # 0xF0 + + + DEFINES += UBVERSION=\"\\\"$${VERSION}\"\\\" \ + UBVERSION_RC=$$VERSION_RC } macx {