Set the version in the Windows installer automatically

This commit is contained in:
Thomas Goyne 2014-05-06 08:05:06 -07:00
parent ca86b0da33
commit ca1cf8d9e7
2 changed files with 14 additions and 8 deletions

View File

@ -26,9 +26,13 @@ last_svn_hash="16cd907fe7482cb54a7374cd28b8501f138116be"
git_revision=$(expr $last_svn_revision + $(git log --pretty=oneline $last_svn_hash..HEAD 2>/dev/null | wc -l))
git_version_str=$(git describe --exact-match 2> /dev/null)
installer_version='0.0.0'
if test x$git_version_str != x; then
git_version_str="${git_version_str##v}"
tagged_release=1
if [ $(echo $git_version_str | grep '\d\.\d\.\d') ]; then
installer_version=$git_version_str
fi
else
git_branch="$(git symbolic-ref HEAD 2> /dev/null)" || git_branch="(unnamed branch)"
git_branch="${git_branch##refs/heads/}"
@ -38,10 +42,12 @@ else
tagged_release=0
fi
new_version_h="\
#define BUILD_GIT_VERSION_NUMBER ${git_revision}
#define BUILD_GIT_VERSION_STRING \"${git_version_str}\"
#define TAGGED_RELEASE ${tagged_release}"
#define TAGGED_RELEASE ${tagged_release}
#define INSTALLER_VERSION \"${installer_version}\""
# may not exist yet for out of tree builds
mkdir -p build

View File

@ -32,17 +32,17 @@
; Contact: mailto:nielsm@indvikleren.dk
;
#define VERSION "3.1.0"
#include "../../build/git_version.h"
[Setup]
AppName=Aegisub
AppVerName=Aegisub {#VERSION}
AppVersion={#VERSION}
AppVerName=Aegisub {#BUILD_GIT_VERSION_STRING}
AppVersion={#INSTALLER_VERSION}
AppPublisher=Aegisub Team
AppPublisherURL=http://www.aegisub.org/
AppSupportURL=http://forum.aegisub.org/
AppCopyright=© 2005-2014 The Aegisub Team
VersionInfoVersion={#VERSION}
VersionInfoVersion={#INSTALLER_VERSION}
DefaultGroupName=Aegisub
AllowNoIcons=true
OutputDir=output
@ -62,8 +62,8 @@ UninstallDisplayIcon={app}\aegisub{#ARCH}.exe
WizardImageFile=welcome-large.bmp
WizardSmallImageFile=aegisub-large.bmp
OutputBaseFilename=Aegisub-{#VERSION}-{#ARCH}
VersionInfoDescription=Aegisub {#VERSION} {#ARCH}
OutputBaseFilename=Aegisub-{#BUILD_GIT_VERSION_STRING}-{#ARCH}
VersionInfoDescription=Aegisub {#BUILD_GIT_VERSION_STRING} {#ARCH}-bit
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
@ -95,7 +95,7 @@ Name: "zh_TW"; MessagesFile: "compiler:Languages\ChineseTraditional.isl"
[Messages]
; Replacement for License page, no need to bother the user with legal mumbo-jumbo
WelcomeLabel2=This will install Aegisub {#VERSION} on your computer.%n%nAegisub is covered by the GNU General Public License version 2. This means you may use the application for any purpose without charge, but that no warranties of any kind are given either.%n%nSee the Aegisub website for information on obtaining the source code.
WelcomeLabel2=This will install Aegisub {#BUILD_GIT_VERSION_STRING} on your computer.%n%nAegisub is covered by the GNU General Public License version 2. This means you may use the application for any purpose without charge, but that no warranties of any kind are given either.%n%nSee the Aegisub website for information on obtaining the source code.
[Files]
; small bitmaps (used by beautify code)