Update Windows deploy scripts for new version information.

These changes should work. At least the awk script has been tested.
This commit is contained in:
sawinglogz 2020-01-16 19:44:11 -05:00
parent 656f8a3c61
commit 8742eb3559
3 changed files with 18 additions and 18 deletions

View File

@ -5,13 +5,6 @@
#include "buildinfo.iss"
#define MyAppVersion MyMajorVersion+"."+MyMinorVersion+"."+MyRevision+"-"+MyReleaseStatus
#if MyReleaseStatus == "r"
#define MyAppVersion MyAppVersion+MyBuildNumber
#else
#define MyAppVersion MyAppVersion+"-"+MyBuildNumber
#endif
#define MyAppPublisher "The OSCAR Team"
#define MyAppExeName "OSCAR.exe"
#define MyAppName "OSCAR"
@ -52,7 +45,7 @@ AppName={#MyAppName}
AppVersion={#MyAppVersion}-{#MyPlatform}-{#MyGitRevision}{#MySuffix}
AppVerName={#MyAppName} {#MyAppVersion}-{#MyPlatform}-{#MyGitRevision}{#MySuffix}
AppPublisher={#MyAppPublisher}
AppCopyright=Copyright 2019 {#MyAppPublisher}
AppCopyright=Copyright 2019-2020 {#MyAppPublisher}
; **** AppCopyright=Copyright {GetDateTimeString('yyyy', #0, #0)} {%MyAppPublisher}
DefaultDirName={pf}\{#MyDirName}
DefaultGroupName={#MyGroupName}

View File

@ -58,8 +58,7 @@ where /q gawk.exe || set PATH=%PATH%;%ProgramW6432%\Git\usr\bin
::: used by the installer script.
where /q gawk.exe || set PATH=%PATH%;%ProgramW6432%\Git\usr\bin
echo ; This script auto-generated by DEPLOY.BAT >%shadowBuildDir%\buildinfo.iss
gawk -f %toolDir%getBuildInfo.awk %sourcedir%\version.h >>%shadowBuildDir%\buildInfo.iss || exit 60
gawk -f %toolDir%getBuildInfo.awk %sourcedir%\build_number.h >>%shadowBuildDir%\buildInfo.iss || exit 61
gawk -f %toolDir%getBuildInfo.awk %sourcedir%\VERSION >>%shadowBuildDir%\buildInfo.iss || exit 60
gawk -f %toolDir%getBuildInfo.awk %sourcedir%\git_info.h >>%shadowBuildDir%\buildInfo.iss || exit 62
echo %shadowBuildDir% | gawk -f %toolDir%getBuildInfo.awk >>%shadowBuildDir%\buildInfo.iss || exit 63
echo #define MySuffix "%1" >>%shadowBuildDir%\buildinfo.iss || exit 64
@ -96,4 +95,4 @@ if exist Translations\*.ts del /q Translations\*.ts
::: Create installer
cd ..
:::"%ProgramFiles(x86)%\Inno Setup 6\compil32" /cc BuildInstall.iss
"%ProgramFiles(x86)%\Inno Setup 6\iscc" /Q BuildInstall.iss
"%ProgramFiles(x86)%\Inno Setup 6\iscc" /Q BuildInstall.iss

View File

@ -7,15 +7,23 @@
# gawk -f getBuildInfo.awk version.h >>buildInfo.iss
# echo %cd% | gawk -f %sourcedir%getBuildInfo.awk >>buildInfo.iss
/ build_number / { print "#define MyBuildNumber \"" substr($5,1,length($5)-1) "\""}
/#define GIT_BRANCH / { print "#define MyGitBranch", $3 }
/#define GIT_REVISION / { print "#define MyGitRevision", $3 }
/#define GIT_TAG / { print "#define MyGitTag", $3 }
/const QString GIT_BRANCH/ { print "#define MyGitBranch \"" substr($3,13,length($3)-14) "\"" }
/const QString GIT_REVISION/ { print "#define MyGitRevision \"" substr($3,15,length($3)-16) "\"" }
/#define VERSION / {
version = $3
print "#define MyAppVersion", version
/const int major_version / { print "#define MyMajorVersion \"" substr($5,1,length($5)-1) "\""}
/const int minor_version / { print "#define MyMinorVersion \"" substr($5,1,length($5)-1) "\""}
/const int revision_number / { print "#define MyRevision \"" substr($5,1,length($5)-1) "\""}
/const QString ReleaseStatus/ { print "#define MyReleaseStatus " substr($5,1,length($5)-1) }
split(version, v, "[\.\-]")
status = v[4] ? v[4] : "r"
print "#define MyReleaseStatus \"" status "\""
split("alpha beta rc r", parts, " ")
for (i=1; i <= length(parts); i++) dict[parts[i]]=i
build = dict[status]
print "#define MyBuildNumber \"" (build * 32) "\""
}
/32.*bit/ { print "#define MyPlatform \"Win32\"" }
/64.*bit/ { print "#define MyPlatform \"Win64\"" }