Fix FILEVERSION having too many digits

This commit is contained in:
Hielke Morsink 2022-04-20 23:41:06 +02:00
parent e571ab6ba8
commit 3c061944b0
No known key found for this signature in database
GPG Key ID: FE0B343DF883E7F2
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
fileversion=$OPENRCT2_VERSION.$OPENRCT2_BUILD
productversion="$fileversion-${OPENRCT2_SHA1_SHORT}"
fileversion=${fileversion//./,}
# FILEVERSION in the resource file can only take up to 4 digits in the version string, so we remove the surplus of version numbers
fileversion=$(echo $fileversion | cut -f1-4 -d",")
echo "#define OPENRCT2_FILE_VERSION $fileversion" > "resources/version.h"
echo "#define OPENRCT2_PRODUCT_VERSION \"$productversion\"" >> "resources/version.h"
cat "resources/version.h"