@@ -119,27 +119,27 @@ ShowUnInstDetails show
119
119
120
120
; ----------------------------------------------------------------------------------------------------------------------------
121
121
122
- ; .onInit Function (called when the installer is nearly finished initializing)
122
+ ; .onInit Function (called when the installer is nearly finished initializing)
123
123
124
- ; Check if QGIS is already installed on the system and, if yes, what version and binary release;
125
- ; depending on that, select the install procedure:
124
+ ; Check if QGIS is already installed on the system and, if yes, what version and binary release;
125
+ ; depending on that, select the install procedure:
126
126
127
- ; 1. first installation = if QGIS is not already installed
128
- ; install QGIS asking for the install PATH
127
+ ; 1. first installation = if QGIS is not already installed
128
+ ; install QGIS asking for the install PATH
129
129
130
- ; 2. upgrade installation = if an older release of QGIS is already installed
131
- ; call the uninstaller of the currently installed QGIS release
132
- ; if the uninstall procedure succeeded, call the current installer without asking for the install PATH
133
- ; QGIS will be installed in the same PATH of the previous installation
130
+ ; 2. upgrade installation = if an older release of QGIS is already installed
131
+ ; call the uninstaller of the currently installed QGIS release
132
+ ; if the uninstall procedure succeeded, call the current installer without asking for the install PATH
133
+ ; QGIS will be installed in the same PATH of the previous installation
134
134
135
- ; 3. downgrade installation = if a newer release of QGIS is already installed
136
- ; call the uninstaller of the currently installed QGIS release
137
- ; if the uninstall procedure succeeded, call the current installer without asking for the install PATH
138
- ; QGIS will be installed in the same PATH of the previous installation
135
+ ; 3. downgrade installation = if a newer release of QGIS is already installed
136
+ ; call the uninstaller of the currently installed QGIS release
137
+ ; if the uninstall procedure succeeded, call the current installer without asking for the install PATH
138
+ ; QGIS will be installed in the same PATH of the previous installation
139
139
140
- ; 4. repair installation = if the same release of QGIS is already installed
141
- ; call the uninstaller of the currently installed QGIS release
142
- ; if the uninstall procedure succeeded, call the current installer asking for the install PATH
140
+ ; 4. repair installation = if the same release of QGIS is already installed
141
+ ; call the uninstaller of the currently installed QGIS release
142
+ ; if the uninstall procedure succeeded, call the current installer asking for the install PATH
143
143
144
144
; the currently installed release of QGIS is defined by the variable $INSTALLED_VERSION = $INSTALLED_SVN_REVISION + $INSTALLED_BINARY_REVISION
145
145
@@ -150,20 +150,20 @@ Function .onInit
150
150
151
151
Var /GLOBAL UNINSTALL_STRING
152
152
Var /GLOBAL INSTALL_PATH
153
-
153
+
154
154
Var /GLOBAL INSTALLED_VERSION_NUMBER
155
155
Var /GLOBAL INSTALLED_SVN_REVISION
156
156
Var /GLOBAL INSTALLED_BINARY_REVISION
157
-
157
+
158
158
Var /GLOBAL INSTALLED_VERSION
159
-
159
+
160
160
Var /GLOBAL DISPLAYED_INSTALLED_VERSION
161
-
161
+
162
162
Var /GLOBAL MESSAGE_0_
163
163
Var /GLOBAL MESSAGE_1_
164
164
Var /GLOBAL MESSAGE_2_
165
165
Var /GLOBAL MESSAGE_3_
166
-
166
+
167
167
ReadRegStr $UNINSTALL_STRING HKLM " Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}" " UninstallString"
168
168
ReadRegStr $INSTALL_PATH HKLM " Software\${QGIS_BASE}" " InstallPath"
169
169
ReadRegStr $INSTALLED_VERSION_NUMBER HKLM " Software\${QGIS_BASE}" " VersionNumber"
@@ -174,22 +174,22 @@ Function .onInit
174
174
${EndIf}
175
175
176
176
ReadRegStr $INSTALLED_BINARY_REVISION HKLM " Software\${QGIS_BASE}" " BinaryRevision"
177
-
177
+
178
178
StrCpy $MESSAGE_0_ " ${CHECK_INSTALL_NAME} is already installed on your system.$\r$\n "
179
179
StrCpy $MESSAGE_0_ " $MESSAGE_0_$\r$\n "
180
-
181
- !if ${INSTALLER_TYPE} == " Release"
180
+
181
+ !if ${INSTALLER_TYPE} == " Release"
182
182
${If} $INSTALLED_BINARY_REVISION == " "
183
183
StrCpy $DISPLAYED_INSTALLED_VERSION " $INSTALLED_VERSION_NUMBER"
184
184
${Else}
185
185
StrCpy $DISPLAYED_INSTALLED_VERSION " $INSTALLED_VERSION_NUMBER-$INSTALLED_BINARY_REVISION"
186
186
${EndIf}
187
187
!else
188
- StrCpy $DISPLAYED_INSTALLED_VERSION " $INSTALLED_VERSION_NUMBER-$INSTALLED_SVN_REVISION-$ INSTALLED_BINARY_REVISION"
188
+ StrCpy $DISPLAYED_INSTALLED_VERSION " $INSTALLED_VERSION_NUMBER-$INSTALLED_BINARY_REVISION"
189
189
!endif
190
190
191
191
StrCpy $MESSAGE_0_ " $MESSAGE_0_The installed release is $DISPLAYED_INSTALLED_VERSION$\r$\n "
192
-
192
+
193
193
StrCpy $MESSAGE_1_ " $MESSAGE_0_$\r$\n "
194
194
StrCpy $MESSAGE_1_ " $MESSAGE_1_You are going to install a newer release of ${CHECK_INSTALL_NAME}$\r$\n "
195
195
StrCpy $MESSAGE_1_ " $MESSAGE_1_$\r$\n "
@@ -422,6 +422,8 @@ Section "Quantum GIS" SecQGIS
422
422
GetFullPathName /SHORT $0 $INSTALL_DIR
423
423
System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_ROOT", "$0").r0'
424
424
System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_STARTMENU", "$SMPROGRAMS\${QGIS_BASE}").r0'
425
+ System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_MENU_LINKS", "1").r0'
426
+ System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_DESKTOP_LINKS", "1").r0'
425
427
426
428
ReadEnvStr $0 COMSPEC
427
429
nsExec::ExecToLog ' "$0" /c "$INSTALL_DIR\postinstall.bat"'
@@ -433,13 +435,23 @@ RebootNecessary:
433
435
SetRebootFlag true
434
436
435
437
NoRebootNecessary:
436
-
437
438
Delete " $DESKTOP\Quantum GIS (${VERSION_NUMBER}).lnk"
438
- CreateShortCut " $DESKTOP\Quantum GIS (${VERSION_NUMBER}).lnk" " $INSTALL_DIR\bin\nircmd.exe" ' exec hide "$INSTALL_DIR\bin\${SHORTNAME}.bat"' \
439
+ Delete " $SMPROGRAMS\${QGIS_BASE}\Quantum GIS (${VERSION_NUMBER}).lnk"
440
+
441
+ Delete " $DESKTOP\Quantum GIS Desktop (${VERSION_NUMBER}).lnk"
442
+ CreateShortCut " $DESKTOP\Quantum GIS Desktop (${VERSION_NUMBER}).lnk" " $INSTALL_DIR\bin\nircmd.exe" ' exec hide "$INSTALL_DIR\bin\${SHORTNAME}.bat"' \
439
443
" $INSTALL_DIR\icons\QGIS.ico" " " SW_SHOWNORMAL " " " Launch ${COMPLETE_NAME}"
440
444
441
- Delete " $SMPROGRAMS\${QGIS_BASE}\Quantum GIS (${VERSION_NUMBER}).lnk"
442
- CreateShortCut " $SMPROGRAMS\${QGIS_BASE}\Quantum GIS (${VERSION_NUMBER}).lnk" " $INSTALL_DIR\bin\nircmd.exe" ' exec hide "$INSTALL_DIR\bin\${SHORTNAME}.bat"' \
445
+ Delete " $SMPROGRAMS\${QGIS_BASE}\Quantum GIS Desktop (${VERSION_NUMBER}).lnk"
446
+ CreateShortCut " $SMPROGRAMS\${QGIS_BASE}\Quantum GIS Desktop (${VERSION_NUMBER}).lnk" " $INSTALL_DIR\bin\nircmd.exe" ' exec hide "$INSTALL_DIR\bin\${SHORTNAME}.bat"' \
447
+ " $INSTALL_DIR\icons\QGIS.ico" " " SW_SHOWNORMAL " " " Launch ${COMPLETE_NAME}"
448
+
449
+ Delete " $DESKTOP\Quantum GIS Browser (${VERSION_NUMBER}).lnk"
450
+ CreateShortCut " $DESKTOP\Quantum GIS Browser (${VERSION_NUMBER}).lnk" " $INSTALL_DIR\bin\nircmd.exe" ' exec hide "$INSTALL_DIR\bin\${SHORTNAME}-browser.bat"' \
451
+ " $INSTALL_DIR\icons\QGIS.ico" " " SW_SHOWNORMAL " " " Launch ${COMPLETE_NAME}"
452
+
453
+ Delete " $SMPROGRAMS\${QGIS_BASE}\Quantum GIS Browser (${VERSION_NUMBER}).lnk"
454
+ CreateShortCut " $SMPROGRAMS\${QGIS_BASE}\Quantum GIS Browser (${VERSION_NUMBER}).lnk" " $INSTALL_DIR\bin\nircmd.exe" ' exec hide "$INSTALL_DIR\bin\${SHORTNAME}-browser.bat"' \
443
455
" $INSTALL_DIR\icons\QGIS.ico" " " SW_SHOWNORMAL " " " Launch ${COMPLETE_NAME}"
444
456
!else
445
457
CreateShortCut " $DESKTOP\${QGIS_BASE}.lnk" " $INSTALL_DIR\bin\qgis.exe" " " \
@@ -509,7 +521,7 @@ Section /O "North Carolina Data Set" SecNorthCarolinaSDB
509
521
; Set the size (in KB) of the unpacked archive file
510
522
AddSize 293314
511
523
512
- StrCpy $HTTP_PATH " http://grass.osgeo.org/sampledata"
524
+ StrCpy $HTTP_PATH " http://grass.osgeo.org/sampledata"
513
525
StrCpy $ARCHIVE_NAME " nc_spm_latest.tar.gz"
514
526
StrCpy $EXTENDED_ARCHIVE_NAME " North Carolina"
515
527
StrCpy $ORIGINAL_UNTAR_FOLDER " nc_spm_08"
@@ -565,19 +577,18 @@ Section "Uninstall"
565
577
GetFullPathName /SHORT $0 $INSTDIR
566
578
System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_ROOT", "$0").r0'
567
579
System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_STARTMENU", "$SMPROGRAMS\${QGIS_BASE}").r0'
580
+ System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_MENU_LINKS", "1").r0'
581
+ System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_DESKTOP_LINKS", "1").r0'
568
582
569
583
ReadEnvStr $0 COMSPEC
570
584
nsExec::ExecToLog ' "$0" /c "$INSTALL_DIR\preremove.bat"'
571
585
572
586
Delete " $INSTDIR\Uninstall-QGIS.exe"
573
- Delete " $INSTDIR\postinstall.bat.done"
574
- Delete " $INSTDIR\postinstall.bat"
575
- Delete " $INSTDIR\postinstall.log"
576
-
577
- Delete " $INSTDIR\preremove.bat.done"
578
- Delete " $INSTDIR\preremove.bat"
579
- Delete " $INSTDIR\preremove.log"
587
+ Delete " $INSTDIR\*.bat.done"
588
+ Delete " $INSTDIR\*.log"
580
589
Delete " $INSTDIR\*.txt"
590
+ Delete " $INSTDIR\*.ico"
591
+ Delete " $INSTDIR\*.bat"
581
592
582
593
RMDir /r " $INSTDIR\bin"
583
594
RMDir /r " $INSTDIR\apps"
@@ -632,7 +643,10 @@ Section "Uninstall"
632
643
633
644
; remove the Desktop ShortCut
634
645
SetShellVarContext all
646
+ Delete " $DESKTOP\Quantum GIS Desktop (${VERSION_NUMBER}).lnk"
647
+ Delete " $DESKTOP\Quantum GIS Browser (${VERSION_NUMBER}).lnk"
635
648
Delete " $DESKTOP\Quantum GIS (${VERSION_NUMBER}).lnk"
649
+ Delete " $DESKTOP\OSGeo4W.lnk"
636
650
637
651
; remove the Programs Start ShortCut
638
652
SetShellVarContext all
0 commit comments