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:
@@ -43,7 +43,7 @@ Section -InstallData
|
||||
|
||||
WriteRegStr SHCTX ${APP_UNINST_KEY} "UninstallString" '"$INSTDIR\${SETUP_UNINSTALLER}"'
|
||||
WriteRegStr SHCTX ${APP_UNINST_KEY} "DisplayVersion" "${APP_VERSION}"
|
||||
WriteRegStr SHCTX ${APP_UNINST_KEY} "DisplayIcon" "$INSTDIR\bin\FreeCAD.exe"
|
||||
WriteRegStr SHCTX ${APP_UNINST_KEY} "DisplayIcon" "$INSTDIR\bin\${APP_NAME}.exe"
|
||||
WriteRegStr SHCTX ${APP_UNINST_KEY} "URLUpdateInfo" "${APP_WEBPAGE}"
|
||||
WriteRegStr SHCTX ${APP_UNINST_KEY} "URLInfoAbout" "https://www.freecadweb.org/"
|
||||
WriteRegStr SHCTX ${APP_UNINST_KEY} "Publisher" "${APP_NAME} Team"
|
||||
@@ -53,10 +53,15 @@ Section -InstallData
|
||||
WriteRegStr SHCTX ${APP_UNINST_KEY} "StartMenu" "$SMPROGRAMS\$StartmenuFolder"
|
||||
|
||||
# if we install over an older existing version, remove the old uninstaller information
|
||||
${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
|
||||
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}$OldVersionNumber"
|
||||
DeleteRegKey SHCTX "SOFTWARE\${APP_NAME}$OldVersionNumber"
|
||||
# also delete in the case of an emergency release
|
||||
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}$OldVersionNumber1"
|
||||
DeleteRegKey SHCTX "SOFTWARE\${APP_NAME}$OldVersionNumber1"
|
||||
${endif}
|
||||
|
||||
SectionEnd
|
||||
|
||||
@@ -15,7 +15,7 @@ Section -ProgramFiles SecProgramFiles
|
||||
# be installed directly to C:\programs - the uninstaller will then delete the whole
|
||||
# C:\programs directory
|
||||
StrCpy $String $INSTDIR
|
||||
StrCpy $Search "FreeCAD"
|
||||
StrCpy $Search ${APP_NAME}
|
||||
Call StrPoint # function from Utils.nsh
|
||||
${if} $Pointer == "-1"
|
||||
StrCpy $INSTDIR "$INSTDIR\${APP_DIR}"
|
||||
@@ -43,6 +43,7 @@ Section -ProgramFiles SecProgramFiles
|
||||
File /r "${FILES_FREECAD}\Ext"
|
||||
File /r "${FILES_FREECAD}\lib"
|
||||
File /r "${FILES_FREECAD}\Mod"
|
||||
File /r "${FILES_FREECAD}\resources"
|
||||
|
||||
# Create uninstaller
|
||||
WriteUninstaller "$INSTDIR\${SETUP_UNINSTALLER}"
|
||||
|
||||
Reference in New Issue
Block a user