summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c99ff2f)
raw | patch | inline | side by side (parent: c99ff2f)
author | Chris Morgan <chris.morganiser@gmail.com> | |
Fri, 12 Mar 2010 11:02:21 +0000 (22:02 +1100) | ||
committer | Chris Morgan <chris.morganiser@gmail.com> | |
Fri, 12 Mar 2010 11:02:21 +0000 (22:02 +1100) |
packaging/win32/inkscape.nsi | patch | blob | history |
index c7200772a8b69b930e58673c246931ff05f4044c..5bcd99ee0f8b79ef0928536986152083d5a22592 100755 (executable)
!include LogicLib.nsh
!include Sections.nsh
+!macro !redef VAR VAL
+ !define _!redef_${VAR} `${VAL}`
+ !ifdef ${VAR}
+ !undef ${VAR}
+ !endif
+ !define ${VAR} `${VAL}`
+ !undef _!redef_${VAR}
+!macroend
+!define !redef `!insertmacro !redef`
+
; Advanced Uninstall Log {{{3
; We're abusing this script terribly and it's time to fix the broken uninstaller.
; However, for the moment, this is what we're using.
!endif
!ifndef BZR_REVISION
!searchparse /noerrors /file ..\..\.bzr\branch\last-revision "" BZR_REVISION " "
- !if `${BZR_REVISION}` != ``
- !define _FILENAME `${FILENAME}-r${BZR_REVISION}`
- !undef FILENAME
- !define FILENAME `${_FILENAME}`
- !undef _FILENAME
- !define _BrandingText `${BrandingText} r${BZR_REVISION}`
- !undef BrandingText
- !define BrandingText `${_BrandingText}`
- !undef _BrandingText
- !undef RELEASE_REVISION ; don't want the -1 on devel releases
- !endif
!endif
!endif
-; Handle the installer revision number {{{3
-!ifdef RELEASE_REVISION
- !define _FILENAME ${FILENAME}-${RELEASE_REVISION}
- !undef FILENAME
- !define FILENAME ${_FILENAME}
- !undef _FILENAME
- !define _BrandingText `${BrandingText}, revision ${RELEASE_REVISION}`
- !undef BrandingText
- !define BrandingText `${_BrandingText}`
- !undef _BrandingText
+; Check for devel builds and clear up bzr revision number define {{{3
+!searchparse /noerrors ${INKSCAPE_VERSION} "" INKSCAPE_VERSION_NUMBER "+devel"
+!if ${INKSCAPE_VERSION_NUMBER} != ${INKSCAPE_VERSION}
+ !define DEVEL
!endif
-
-; Complete X.X version numbers into X.X.X.X {{{3
-!searchparse /noerrors ${INKSCAPE_VERSION} "" _TMP "+devel"
-!if ${_TMP} != ${INKSCAPE_VERSION} ; If it's a devel build,
- !if `${BZR_REVISION}` != `` ; and we have the bzr revision
- !define VERSION_X.X.X.X_REVISION ${BZR_REVISION}
- !endif
+!if `${BZR_REVISION}` == ``
+ !undef BZR_REVISION
!endif
-!ifndef VERSION_X.X.X.X_REVISION ; it wasn't a devel build or we didn't have the bzr revision
- !ifdef RELEASE_REVISION
- !define VERSION_X.X.X.X_REVISION ${RELEASE_REVISION}
- !else
- !define VERSION_X.X.X.X_REVISION 0
- !endif
+
+; Handle display version number and complete X.X version numbers into X.X.X.X {{{3
+!ifdef DEVEL & BZR_REVISION
+ ${!redef} FILENAME `${FILENAME}-r${BZR_REVISION}`
+ ${!redef} BrandingText `${BrandingText} r${BZR_REVISION}`
+ !define VERSION_X.X.X.X_REVISION ${BZR_REVISION}
+; Handle the installer revision number {{{4
+!else ifdef RELEASE_REVISION
+ ${!redef} FILENAME `${FILENAME}-${RELEASE_REVISION}`
+ ${!redef} BrandingText `${BrandingText}, revision ${BZR_REVISION}`
+ !define VERSION_X.X.X.X_REVISION ${RELEASE_REVISION}
+!else
+ !define VERSION_X.X.X.X_REVISION 0
!endif
-${VersionCompleteXXXN} ${_TMP} VERSION_X.X.X.X ${VERSION_X.X.X.X_REVISION}
+
+${VersionCompleteXXXN} ${INKSCAPE_VERSION_NUMBER} VERSION_X.X.X.X ${VERSION_X.X.X.X_REVISION}
; Product definitions {{{3
!define PRODUCT_NAME "Inkscape" ; TODO: fix up the language files to not use this and kill this line