several installer fixes and improvements:

- fix bug that registry uninstaller settings of the previous version are not replaced when installing new version of the same series

- avoid explicit calls of the name "FreeCAD"

- update example code and description to MSVC 2017 and FreeCAD 0.19git
This commit is contained in:
donovaly
2019-10-17 03:56:36 +02:00
committed by wwmayer
parent 6eacb17b3e
commit c2c41bf655
6 changed files with 24 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
/*
/*
declaration.nsh
Configuration and variables of FreeCAD installer
@@ -32,8 +32,8 @@ Configuration and variables of FreeCAD installer
!define APP_WIKI_INFO "${APP_NAME} Wiki"
!define APP_COPYRIGHT "${APP_NAME} is Copyright © 2001-${COPYRIGHT_YEAR} by the ${APP_NAME} Team"
!define APP_RUN "bin\FreeCAD.exe"
!define BIN_FREECAD "FreeCAD.exe"
!define APP_RUN "bin\${APP_NAME}.exe"
!define BIN_FREECAD "${APP_NAME}.exe"
!define APP_REGKEY "Software\${APP_NAME}${APP_SERIES_KEY}" # like "FreeCAD0180"
!define APP_REGKEY_SETUP "${APP_REGKEY}\Setup"

View File

@@ -130,7 +130,10 @@ Function .onInit
${endif}
${next}
${if} $OldVersionNumber > ${APP_SERIES_KEY}
# NSIS cannot handle numbers with leading zero, thus cut it off before comparing
StrCpy $1 $OldVersionNumber "" 1
StrCpy $2 ${APP_SERIES_KEY} "" 1
${if} $1 > $2
# store the version number and reformat it temporarily for the error message
StrCpy $R0 $OldVersionNumber
StrCpy $OldVersionNumber $R5