Update awk and inno setup scripts for new versioning changes in Windows build tools

Version number in Windows oscar.exe has first three numbers same as string and fourth as 0
    Version number in Windows installer has first three numbers same as string and fourth indicates build type:
    0 = release, 100=alpha, 200=beta, 300=gamma, 400=rc
This commit is contained in:
Guy Scharf 2020-01-19 18:18:21 -07:00
parent 0a55e12d5b
commit 703fe2a613
3 changed files with 8 additions and 5 deletions

View File

@ -63,7 +63,7 @@ VersionInfoProductName={#MyAppName}
UninstallDisplayName={#MyGroupName}
UninstallDisplayIcon={app}\{#MyAppExeName}
VersionInfoVersion={#MyMajorVersion}.{#MyMinorVersion}.{#MyRevision}.{#MyBuildNumber}
VersionInfoVersion={#MyVersionNumbers}
VersionInfoProductTextVersion={#MyAppVersion}
[Languages]

View File

@ -15,14 +15,17 @@
version = $3
print "#define MyAppVersion", version
split(version, v, "[\.\-]")
split(version, v, "[.-]")
status = v[4] ? v[4] : "r"
print "#define MyReleaseStatus \"" status "\""
split("alpha beta rc r", parts, " ")
split("alpha beta gamma rc r", parts, " ")
for (i=1; i <= length(parts); i++) dict[parts[i]]=i
build = dict[status]
print "#define MyBuildNumber \"" (build * 32) "\""
print "#define MyBuildNumber \"" (build * 100) "\""
# v[1] already includes a leading quote mark
print "#define MyVersionNumbers " v[1] "." v[2] "." v[3] "." (build * 100) "\""
}
/32.*bit/ { print "#define MyPlatform \"Win32\"" }

View File

@ -96,7 +96,7 @@ QMAKE_TARGET_DESCRIPTION = "OpenSource CPAP Analysis Reporter"
_VERSION_FILE = $$cat(./VERSION)
VERSION = $$section(_VERSION_FILE, '"', 1, 1)
win32 {
VERSION=1.1.0.0
VERSION = $$section(VERSION, '-', 0, 0)
}
RC_ICONS = ./icons/logo.ico