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

Annotation of /trunk/pygtk/create.nsi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 781 - (hide annotations) (download)
Tue Jul 25 00:18:19 2006 UTC (17 years, 10 months ago) by johnpye
File size: 4324 byte(s)
Fixed up building of extfntest on MinGW.
Added extfntest DLL to Windows installer.
1 johnpye 357 ; example2.nsi
2     ;
3 johnpye 628 ; This script is based on example1.nsi, but it remembers the directory,
4 johnpye 357 ; 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 johnpye 578 !ifdef OUTFILE
15     OutFile ${OUTFILE}.exe
16     !else
17     OutFile ascend-setup.exe
18     !endif
19 johnpye 357
20 johnpye 465
21 johnpye 578 SetCompressor /SOLID lzma
22    
23 johnpye 357 ; The default installation directory
24     InstallDir $PROGRAMFILES\ASCEND
25    
26     ; Registry key to check for directory (so if you install again, it will
27     ; overwrite the old one automatically)
28     InstallDirRegKey HKLM "Software\ASCEND" "Install_Dir"
29    
30     ;--------------------------------
31    
32     ; Pages
33    
34     Page components
35     Page directory
36     Page instfiles
37    
38     UninstPage uninstConfirm
39     UninstPage instfiles
40    
41     ;--------------------------------
42    
43     ; The stuff to install
44     Section "ASCEND (required)"
45    
46     SectionIn RO
47    
48     ; Set output path to the installation directory.
49     SetOutPath $INSTDIR
50    
51 johnpye 603 ; Python interface
52 johnpye 463 File "_ascpy.dll"
53 johnpye 534 File "..\ascend.dll"
54 johnpye 357 File "config.py"
55     File "*.py"
56     SetOutPath $INSTDIR\glade
57 johnpye 463 File "glade\*.glade"
58     File "glade\*.png"
59 johnpye 603
60     ; Model Library
61 johnpye 357 SetOutPath $INSTDIR\models
62 johnpye 627 File /r /x .svn "..\models\*.a4*"
63     File /r /x .svn "..\models\*.bz2"
64 johnpye 669 File /r /x .svn "..\models\*.tcl"
65 johnpye 781 File /r /x .svn "..\models\*.dll" ; extension modules
66 johnpye 603
67     ; Tcl/Tk interface
68     SetOutPath $INSTDIR\tcltk
69 johnpye 627 File /r /x .svn "..\tcltk\TK\*"
70 johnpye 603 SetOutPath $INSTDIR
71     File "..\tcltk\generic\interface\ascendtcl.dll"
72     File "..\tcltk\generic\interface\ascend4.exe"
73    
74 johnpye 357 SetOutPath $INSTDIR
75     File "Makefile.bt"
76     File "ascend.syn"
77 johnpye 603
78     ; Set 'librarypath' in .ascend.ini
79 johnpye 357 WriteINIstr $APPDATA\.ascend.ini Directories librarypath "$DOCUMENTS\ascdata;$INSTDIR\models"
80 johnpye 603
81     ; Create 'ascend.bat' launcher for PyGTK interface
82 johnpye 455 ClearErrors
83     FileOpen $0 $INSTDIR\ascend.bat w
84     IfErrors done
85     FileWrite $0 "@echo off"
86     FileWriteByte $0 "13"
87     FileWriteByte $0 "10"
88 johnpye 465 FileWrite $0 "set PATH=c:\Python24;c:\GTK\bin"
89     FileWriteByte $0 "13"
90     FileWriteByte $0 "10"
91 johnpye 455 FileWrite $0 "cd "
92     FileWrite $0 $INSTDIR
93     FileWriteByte $0 "13"
94     FileWriteByte $0 "10"
95 johnpye 627 FileWrite $0 "c:\Python24\python gtkbrowser.py %1 %2 %3 %4 %5 %6 %7 %8"
96 johnpye 455 FileWriteByte $0 "13"
97     FileWriteByte $0 "10"
98    
99     FileClose $0
100     done:
101 johnpye 357
102     ; Write the installation path into the registry
103     WriteRegStr HKLM SOFTWARE\ASCEND "Install_Dir" "$INSTDIR"
104    
105     ; Write the uninstall keys for Windows
106     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "DisplayName" "ASCEND Simulation Environment"
107     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "UninstallString" '"$INSTDIR\uninstall.exe"'
108     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "NoModify" 1
109     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "NoRepair" 1
110     WriteUninstaller "uninstall.exe"
111    
112     SectionEnd
113    
114     ; Optional section (can be disabled by the user)
115     Section "Start Menu Shortcuts"
116    
117     CreateDirectory "$SMPROGRAMS\ASCEND"
118     CreateShortCut "$SMPROGRAMS\ASCEND\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
119     CreateShortCut "$SMPROGRAMS\ASCEND\ASCEND.lnk" "$INSTDIR\ascend.bat" "" "$INSTDIR\ascend.bat" 0
120 johnpye 603 CreateShortCut "$SMPROGRAMS\ASCEND\ASCEND Tcl/Tk.lnk" "$INSTDIR\ascend4.exe" "" "$INSTDIR\ascend4.exe" 0
121 johnpye 357
122     SectionEnd
123    
124     ;--------------------------------
125    
126     ; Uninstaller
127    
128     Section "Uninstall"
129    
130     ; Remove registry keys
131     DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND"
132     DeleteRegKey HKLM SOFTWARE\ASCEND
133    
134     ; Remove files and uninstaller
135 johnpye 603 Delete $INSTDIR\_ascpy.dll
136     Delete $INSTDIR\ascendtcl.dll
137     Delete $INSTDIR\ascend.dll
138 johnpye 357 Delete $INSTDIR\ascend.bat
139     Delete $INSTDIR\*.py
140     Delete $INSTDIR\glade\*
141     Delete $INSTDIR\Makefile.bt
142     Delete $INSTDIR\ascend.syn
143     Delete $INSTDIR\models\*
144 johnpye 603 Delete $INSTDIR\models\johnpye\*
145     RMDir /r $INSTDIR\tcltk
146 johnpye 357 RMDir $INSTDIR\models\johnpye
147     RMDIR $INSTDIR\models
148    
149     ; Remove shortcuts, if any
150     Delete "$SMPROGRAMS\ASCEND\*.*"
151    
152     ; Remove directories used
153     RMDir "$SMPROGRAMS\ASCEND"
154     RMDir "$INSTDIR"
155    
156     SectionEnd

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