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

Annotation of /trunk/pygtk/create.nsi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 669 - (hide annotations) (download)
Wed Jun 21 07:00:45 2006 UTC (17 years, 11 months ago) by johnpye
File size: 4267 byte(s)
Merged changes from DAE branch (revisions 702 to 819) back into trunk.
This adds the Integration API to the ASCEND solver (in base/generic).
Also provides pre-alpha support for 'IDA' from the SUNDIALS suite, a DAE solver.
Many other minor code clean-ups, including adoption of new 'ASC_NEW' and friends (to replace 'ascmalloc')
Added some very sketchy stuff providing 'DIFF(...)' syntax, although it is anticipated that this will be removed.
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 603
66     ; Tcl/Tk interface
67     SetOutPath $INSTDIR\tcltk
68 johnpye 627 File /r /x .svn "..\tcltk\TK\*"
69 johnpye 603 SetOutPath $INSTDIR
70     File "..\tcltk\generic\interface\ascendtcl.dll"
71     File "..\tcltk\generic\interface\ascend4.exe"
72    
73 johnpye 357 SetOutPath $INSTDIR
74     File "Makefile.bt"
75     File "ascend.syn"
76 johnpye 603
77     ; Set 'librarypath' in .ascend.ini
78 johnpye 357 WriteINIstr $APPDATA\.ascend.ini Directories librarypath "$DOCUMENTS\ascdata;$INSTDIR\models"
79 johnpye 603
80     ; Create 'ascend.bat' launcher for PyGTK interface
81 johnpye 455 ClearErrors
82     FileOpen $0 $INSTDIR\ascend.bat w
83     IfErrors done
84     FileWrite $0 "@echo off"
85     FileWriteByte $0 "13"
86     FileWriteByte $0 "10"
87 johnpye 465 FileWrite $0 "set PATH=c:\Python24;c:\GTK\bin"
88     FileWriteByte $0 "13"
89     FileWriteByte $0 "10"
90 johnpye 455 FileWrite $0 "cd "
91     FileWrite $0 $INSTDIR
92     FileWriteByte $0 "13"
93     FileWriteByte $0 "10"
94 johnpye 627 FileWrite $0 "c:\Python24\python gtkbrowser.py %1 %2 %3 %4 %5 %6 %7 %8"
95 johnpye 455 FileWriteByte $0 "13"
96     FileWriteByte $0 "10"
97    
98     FileClose $0
99     done:
100 johnpye 357
101     ; Write the installation path into the registry
102     WriteRegStr HKLM SOFTWARE\ASCEND "Install_Dir" "$INSTDIR"
103    
104     ; Write the uninstall keys for Windows
105     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "DisplayName" "ASCEND Simulation Environment"
106     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "UninstallString" '"$INSTDIR\uninstall.exe"'
107     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "NoModify" 1
108     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "NoRepair" 1
109     WriteUninstaller "uninstall.exe"
110    
111     SectionEnd
112    
113     ; Optional section (can be disabled by the user)
114     Section "Start Menu Shortcuts"
115    
116     CreateDirectory "$SMPROGRAMS\ASCEND"
117     CreateShortCut "$SMPROGRAMS\ASCEND\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
118     CreateShortCut "$SMPROGRAMS\ASCEND\ASCEND.lnk" "$INSTDIR\ascend.bat" "" "$INSTDIR\ascend.bat" 0
119 johnpye 603 CreateShortCut "$SMPROGRAMS\ASCEND\ASCEND Tcl/Tk.lnk" "$INSTDIR\ascend4.exe" "" "$INSTDIR\ascend4.exe" 0
120 johnpye 357
121     SectionEnd
122    
123     ;--------------------------------
124    
125     ; Uninstaller
126    
127     Section "Uninstall"
128    
129     ; Remove registry keys
130     DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND"
131     DeleteRegKey HKLM SOFTWARE\ASCEND
132    
133     ; Remove files and uninstaller
134 johnpye 603 Delete $INSTDIR\_ascpy.dll
135     Delete $INSTDIR\ascendtcl.dll
136     Delete $INSTDIR\ascend.dll
137 johnpye 357 Delete $INSTDIR\ascend.bat
138     Delete $INSTDIR\*.py
139     Delete $INSTDIR\glade\*
140     Delete $INSTDIR\Makefile.bt
141     Delete $INSTDIR\ascend.syn
142     Delete $INSTDIR\models\*
143 johnpye 603 Delete $INSTDIR\models\johnpye\*
144     RMDir /r $INSTDIR\tcltk
145 johnpye 357 RMDir $INSTDIR\models\johnpye
146     RMDIR $INSTDIR\models
147    
148     ; Remove shortcuts, if any
149     Delete "$SMPROGRAMS\ASCEND\*.*"
150    
151     ; Remove directories used
152     RMDir "$SMPROGRAMS\ASCEND"
153     RMDir "$INSTDIR"
154    
155     SectionEnd

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