/[ascend]/trunk/pygtk/create.nsi
ViewVC logotype

Annotation of /trunk/pygtk/create.nsi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 357 - (hide annotations) (download)
Mon Mar 6 06:30:21 2006 UTC (18 years, 2 months ago) by johnpye
Original Path: trunk/pygtk/interface/create.nsi
File size: 3166 byte(s)
Added work for creating a windows installer
1 johnpye 357 ; example2.nsi
2     ;
3     ; This script is based on example1.nsi, but it remember the directory,
4     ; has uninstall support and (optionally) installs start menu shortcuts.
5     ;
6     ; It will install example2.nsi into a directory that the user selects,
7    
8     ;--------------------------------
9    
10     ; The name of the installer
11     Name "ASCEND PyGTK"
12    
13     ; The file to write
14     OutFile "ascend-0.9.6.exe"
15    
16     ; The default installation directory
17     InstallDir $PROGRAMFILES\ASCEND
18    
19     ; Registry key to check for directory (so if you install again, it will
20     ; overwrite the old one automatically)
21     InstallDirRegKey HKLM "Software\ASCEND" "Install_Dir"
22    
23     ;--------------------------------
24    
25     ; Pages
26    
27     Page components
28     Page directory
29     Page instfiles
30    
31     UninstPage uninstConfirm
32     UninstPage instfiles
33    
34     ;--------------------------------
35    
36     ; The stuff to install
37     Section "ASCEND (required)"
38    
39     SectionIn RO
40    
41     ; Set output path to the installation directory.
42     SetOutPath $INSTDIR
43    
44     ; Put file there
45     File "_ascend.dll"
46     File "ascend.bat"
47     File "config.py"
48     File "*.py"
49     SetOutPath $INSTDIR\glade
50     File "glade\*"
51     SetOutPath $INSTDIR\models
52     File "..\..\models\*.a4c"
53     File "..\..\models\*.a4l"
54     SetOutPath $INSTDIR\models\johnpye
55     File "..\..\models\johnpye\*.a4c"
56     SetOutPath $INSTDIR
57     File "Makefile.bt"
58     File "ascend.syn"
59    
60     WriteINIstr $APPDATA\.ascend.ini Directories librarypath "$DOCUMENTS\ascdata;$INSTDIR\models"
61    
62     ; Write the installation path into the registry
63     WriteRegStr HKLM SOFTWARE\ASCEND "Install_Dir" "$INSTDIR"
64    
65     ; Write the uninstall keys for Windows
66     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "DisplayName" "ASCEND Simulation Environment"
67     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "UninstallString" '"$INSTDIR\uninstall.exe"'
68     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "NoModify" 1
69     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "NoRepair" 1
70     WriteUninstaller "uninstall.exe"
71    
72     SectionEnd
73    
74     ; Optional section (can be disabled by the user)
75     Section "Start Menu Shortcuts"
76    
77     CreateDirectory "$SMPROGRAMS\ASCEND"
78     CreateShortCut "$SMPROGRAMS\ASCEND\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
79     CreateShortCut "$SMPROGRAMS\ASCEND\ASCEND.lnk" "$INSTDIR\ascend.bat" "" "$INSTDIR\ascend.bat" 0
80    
81     SectionEnd
82    
83     ;--------------------------------
84    
85     ; Uninstaller
86    
87     Section "Uninstall"
88    
89     ; Remove registry keys
90     DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND"
91     DeleteRegKey HKLM SOFTWARE\ASCEND
92    
93     ; Remove files and uninstaller
94     Delete $INSTDIR\_ascend.dll
95     Delete $INSTDIR\ascend.bat
96     Delete $INSTDIR\*.py
97     Delete $INSTDIR\glade\*
98     Delete $INSTDIR\Makefile.bt
99     Delete $INSTDIR\ascend.syn
100     Delete $INSTDIR\models\*
101     Delete $INSTDIR\models\johnpye\*
102     RMDir $INSTDIR\models\johnpye
103     RMDIR $INSTDIR\models
104    
105     ; Remove shortcuts, if any
106     Delete "$SMPROGRAMS\ASCEND\*.*"
107    
108     ; Remove directories used
109     RMDir "$SMPROGRAMS\ASCEND"
110     RMDir "$INSTDIR"
111    
112     SectionEnd

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22