autoupdate app.rc on CI builds
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
28fedfdd0b
commit
e41d4946f8
2 changed files with 51 additions and 1 deletions
33
.ci/app.rc
Normal file
33
.ci/app.rc
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
IDI_ICON1 ICON DISCARDABLE "5sync.ico"
|
||||||
|
#define RT_MANIFEST 24
|
||||||
|
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
|
||||||
|
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gta5view.exe.manifest"
|
||||||
|
#include <windows.h>
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION MAJOR_VER, MINOR_VER, PATCH_VER, INT_BUILD_VER
|
||||||
|
PRODUCTVERSION MAJOR_VER, MINOR_VER, PATCH_VER, INT_BUILD_VER
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
FILEFLAGS 0
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_APP
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x0809, 1200
|
||||||
|
END
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "Syping"
|
||||||
|
VALUE "FileDescription", "gta5view"
|
||||||
|
VALUE "FileVersion", "MAJOR_VER.MINOR_VER.PATCH_VERSTR_BUILD_VER"
|
||||||
|
VALUE "InternalName", "gta5view"
|
||||||
|
VALUE "LegalCopyright", "Copyright © 2016-2020 Syping"
|
||||||
|
VALUE "OriginalFilename", "gta5view.exe"
|
||||||
|
VALUE "ProductName", "gta5view"
|
||||||
|
VALUE "ProductVersion", "MAJOR_VER.MINOR_VER.PATCH_VERSTR_BUILD_VER"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
END
|
19
.ci/ci.sh
19
.ci/ci.sh
|
@ -9,10 +9,27 @@ export PACKAGE_VERSION=$(grep -oE '^[^\-]*' <<< $APPLICATION_VERSION)
|
||||||
export PACKAGE_BUILD=$(grep -oP '\-\K.+' <<< $APPLICATION_VERSION)
|
export PACKAGE_BUILD=$(grep -oP '\-\K.+' <<< $APPLICATION_VERSION)
|
||||||
export EXECUTABLE_VERSION=${PACKAGE_VERSION}${PACKAGE_BUILD}${EXECUTABLE_TAG}
|
export EXECUTABLE_VERSION=${PACKAGE_VERSION}${PACKAGE_BUILD}${EXECUTABLE_TAG}
|
||||||
|
|
||||||
|
export APPLICATION_MAJOR_VERSION=$(cut -d. -f1 <<< $APPLICATION_VERSION)
|
||||||
|
export APPLICATION_MINOR_VERSION=$(cut -d. -f2 <<< $APPLICATION_VERSION)
|
||||||
|
export APPLICATION_PATCH_VERSION=$(cut -d. -f3 <<< $APPLICATION_VERSION)
|
||||||
|
export APPLICATION_BUILD_YEAR=$(date "+%Y")
|
||||||
|
|
||||||
if [ "${PACKAGE_BUILD}" == "" ]; then
|
if [ "${PACKAGE_BUILD}" == "" ]; then
|
||||||
export PACKAGE_BUILD=1;
|
export PACKAGE_BUILD=1
|
||||||
|
else
|
||||||
|
export APPLICATION_BUILD_INT_VERSION=$(grep -oE "[1-9]*$" <<< $PACKAGE_BUILD)
|
||||||
|
export APPLICATION_BUILD_STR_VERSION=-${PACKAGE_BUILD}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cat ".ci/app.rc" | sed \
|
||||||
|
-e "s/MAJOR_VER/$APPLICATION_MAJOR_VERSION/g" \
|
||||||
|
-e "s/MINOR_VER/$APPLICATION_MINOR_VERSION/g" \
|
||||||
|
-e "s/PATCH_VER/$APPLICATION_PATCH_VERSION/g" \
|
||||||
|
-e "s/INT_BUILD_VER/0/g" \
|
||||||
|
-e "s/STR_BUILD_VER/$APPLICATION_BUILD_STR_VERSION/g" \
|
||||||
|
-e "s/STR_BUILD_VER/$APPLICATION_BUILD_STR_VERSION/g" \
|
||||||
|
> "res/app.rc"
|
||||||
|
|
||||||
if [ "${BUILD_TYPE}" == "ALPHA" ]; then
|
if [ "${BUILD_TYPE}" == "ALPHA" ]; then
|
||||||
export QMAKE_BUILD_TYPE="DEFINES+=GTA5SYNC_BUILDTYPE_ALPHA"
|
export QMAKE_BUILD_TYPE="DEFINES+=GTA5SYNC_BUILDTYPE_ALPHA"
|
||||||
elif [ "${BUILD_TYPE}" == "Alpha" ]; then
|
elif [ "${BUILD_TYPE}" == "Alpha" ]; then
|
||||||
|
|
Loading…
Reference in a new issue