3
3
; Quantum GIS Installer for Windows
4
4
; Written by Marco Pasetti
5
5
; Mail to: marco.pasetti@alice.it
6
+ ;
7
+ ; Extended for creatensis.pl by Jürgen E. Fischer <jef@norbit.de>
6
8
7
9
; ----------------------------------------------------------------------------------------------------------------------------
8
10
9
11
; Select if you are building a "Development Version" or a "Release Version" of the Quantum GIS Installer
10
12
; Change the INSTALLER_TYPE variable to Release or Development
11
13
12
- !define INSTALLER_TYPE " Release-NoGrass"
13
-
14
14
; ----------------------------------------------------------------------------------------------------------------------------
15
15
16
16
; Version variables
@@ -43,13 +43,10 @@ RequestExecutionLevel admin
43
43
44
44
; ----------------------------------------------------------------------------------------------------------------------------
45
45
46
- ; define the QGIS Base Name
47
- !define RELEASE_QGIS_BASE " Quantum GIS Enceladus"
48
- !define DEV_QGIS_BASE " Quantum GIS Unstable Dev"
49
-
50
46
; Set the installer variables, depending on the selected version to build
51
47
52
48
!if ${INSTALLER_TYPE} == " Release"
49
+ !define RELEASE_QGIS_BASE " Quantum GIS Enceladus"
53
50
!define VERSION_NUMBER " ${RELEASE_VERSION_NUMBER}"
54
51
!define VERSION_NAME " ${RELEASE_VERSION_NAME}"
55
52
!define COMPLETE_NAME " ${RELEASE_QGIS_BASE} ${RELEASE_VERSION_NUMBER} ${RELEASE_VERSION_NAME}"
@@ -74,6 +71,7 @@ RequestExecutionLevel admin
74
71
!define INSTALLER_DISPLAYED_NAME " ${COMPLETE_NAME}"
75
72
!define PACKAGE_FOLDER " .\QGIS-Release-Package-No-Grass"
76
73
!else if ${INSTALLER_TYPE} == " Development"
74
+ !define DEV_QGIS_BASE " Quantum GIS Unstable Dev"
77
75
!define VERSION_NUMBER " ${DEV_VERSION_NUMBER}"
78
76
!define VERSION_NAME " ${DEV_VERSION_NAME}"
79
77
!define COMPLETE_NAME " ${DEV_QGIS_BASE} ${DEV_VERSION_NUMBER} ${DEV_VERSION_NAME}"
@@ -85,6 +83,12 @@ RequestExecutionLevel admin
85
83
!define CHECK_INSTALL_NAME " ${DEV_QGIS_BASE}"
86
84
!define INSTALLER_DISPLAYED_NAME " ${DISPLAYED_NAME}"
87
85
!define PACKAGE_FOLDER " .\QGIS-Dev-Package"
86
+ !else if ${INSTALLER_TYPE} == " OSGeo4W"
87
+ !define COMPLETE_NAME " ${QGIS_BASE} ${VERSION_NUMBER} ${VERSION_NAME}"
88
+ !define CHECK_INSTALL_NAME " ${QGIS_BASE}"
89
+ !define INSTALLER_DISPLAYED_NAME " ${DISPLAYED_NAME}"
90
+
91
+ !addplugindir osgeo4w/untgz
88
92
!endif
89
93
90
94
; ----------------------------------------------------------------------------------------------------------------------------
@@ -352,6 +356,10 @@ Section "Quantum GIS" SecQGIS
352
356
File .\Installer-Files\QGIS_Web.ico
353
357
SetOutPath " $INSTALL_DIR"
354
358
File .\Installer-Files\QGIS-WebSite.url
359
+ !if ${INSTALLER_TYPE} == " OSGeo4W"
360
+ File .\Installer-Files\postinstall.bat
361
+ File .\Installer-Files\preremove.bat
362
+ !endif
355
363
356
364
; add Quantum GIS files
357
365
SetOutPath " $INSTALL_DIR"
@@ -394,23 +402,39 @@ Section "Quantum GIS" SecQGIS
394
402
; Create the Desktop Shortcut
395
403
SetShellVarContext current
396
404
405
+ !if ${INSTALLER_TYPE} == " OSGeo4W"
406
+ CreateShortCut " $DESKTOP\${QGIS_BASE}.lnk" " $INSTALL_DIR\bin\nircmd.exe" ' exec hide "$INSTALL_DIR\bin\qgis-dev.bat"' \
407
+ " $INSTALL_DIR\icons\QGIS.ico" " " SW_SHOWNORMAL " " " Launch ${COMPLETE_NAME}"
408
+ !else
397
409
CreateShortCut " $DESKTOP\${QGIS_BASE}.lnk" " $INSTALL_DIR\bin\qgis.exe" " " \
398
410
" $INSTALL_DIR\icons\QGIS.ico" " " SW_SHOWNORMAL " " " Launch ${COMPLETE_NAME}"
411
+ !endif
399
412
400
413
; Create the Windows Start Menu Shortcuts
401
414
SetShellVarContext all
402
415
403
416
CreateDirectory " $SMPROGRAMS\${QGIS_BASE}"
404
417
418
+ !if ${INSTALLER_TYPE} == " OSGeo4W"
419
+ CreateShortCut " $SMPROGRAMS\${QGIS_BASE}\${QGIS_BASE}.lnk" " $INSTALL_DIR\bin\nircmd.exe" ' exec hide "$INSTALL_DIR\bin\qgis-dev.bat"' \
420
+ " $INSTALL_DIR\icons\QGIS.ico" " " SW_SHOWNORMAL " " " Launch ${COMPLETE_NAME}"
421
+ !else
405
422
CreateShortCut " $SMPROGRAMS\${QGIS_BASE}\${QGIS_BASE}.lnk" " $INSTALL_DIR\bin\qgis.exe" " " \
406
423
" $INSTALL_DIR\icons\QGIS.ico" " " SW_SHOWNORMAL " " " Launch ${COMPLETE_NAME}"
424
+ !endif
407
425
408
426
CreateShortCut " $SMPROGRAMS\${QGIS_BASE}\Quantum GIS Web Site.lnk" " $INSTALL_DIR\QGIS-WebSite.url" " " \
409
427
" $INSTALL_DIR\icons\QGIS_Web.ico" " " SW_SHOWNORMAL " " " Visit the Quantum GIS Web Site"
410
428
411
429
CreateShortCut " $SMPROGRAMS\${QGIS_BASE}\Uninstall ${QGIS_BASE}.lnk" " $INSTALL_DIR\Uninstall-QGIS.exe" " " \
412
430
" $INSTALL_DIR\Uninstall-QGIS.exe" " " SW_SHOWNORMAL " " " Uninstall ${COMPLETE_NAME}"
413
-
431
+
432
+ GetFullPathName /SHORT $0 $INSTALL_DIR
433
+ System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_ROOT", "$0").r0'
434
+ System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_STARTMENU", "$SMPROGRAMS\${QGIS_BASE}").r0'
435
+
436
+ ReadEnvStr $0 COMSPEC
437
+ nsExec::ExecToLog ' "$0" /c "$INSTALL_DIR\postinstall.bat"'
414
438
SectionEnd
415
439
416
440
Function DownloadDataSet
@@ -524,6 +548,31 @@ SectionEnd
524
548
525
549
Section " Uninstall"
526
550
551
+ !if ${INSTALLER_TYPE} == " OSGeo4W"
552
+ GetFullPathName /SHORT $0 $INSTDIR
553
+ System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_ROOT", "$0").r0'
554
+ System::Call ' Kernel32::SetEnvironmentVariableA(t, t) i("OSGEO4W_STARTMENU", "$SMPROGRAMS\${QGIS_BASE}").r0'
555
+
556
+ ReadEnvStr $0 COMSPEC
557
+ nsExec::ExecToLog ' "$0" /c "$INSTALL_DIR\preremove.bat"'
558
+
559
+ Delete " $INSTDIR\Uninstall-QGIS.exe"
560
+ Delete " $INSTDIR\postinstall.bat.done"
561
+ Delete " $INSTDIR\postinstall.bat"
562
+ Delete " $INSTDIR\postinstall.log"
563
+
564
+ Delete " $INSTDIR\preremove.bat.done"
565
+ Delete " $INSTDIR\preremove.bat"
566
+ Delete " $INSTDIR\preremove.log"
567
+
568
+ RMDir /r " $INSTDIR\bin"
569
+ RMDir /r " $INSTDIR\apps"
570
+ RMDir /r " $INSTDIR\etc"
571
+ RMDir /r " $INSTDIR\include"
572
+ RMDir /r " $INSTDIR\lib"
573
+ RMDir /r " $INSTDIR\share"
574
+ RMDir /r " $INSTDIR\icons"
575
+ !else
527
576
; remove files
528
577
Delete " $INSTDIR\Uninstall-QGIS.exe"
529
578
@@ -563,6 +612,7 @@ Section "Uninstall"
563
612
RMDir /r " $INSTDIR\themes"
564
613
RMDir /r " $INSTDIR\proj"
565
614
RMDir /r " $INSTDIR\epsg_csv"
615
+ !endif
566
616
567
617
; if empty, remove the install folder
568
618
RMDir " $INSTDIR"
@@ -578,7 +628,6 @@ Section "Uninstall"
578
628
; remove the Registry Entries
579
629
DeleteRegKey HKLM " Software\${QGIS_BASE}"
580
630
DeleteRegKey HKLM " Software\Microsoft\Windows\CurrentVersion\Uninstall\${QGIS_BASE}"
581
-
582
631
SectionEnd
583
632
584
633
; ----------------------------------------------------------------------------------------------------------------------------
0 commit comments