/[ascend]/trunk/nsis/installer.nsi
ViewVC logotype

Diff of /trunk/nsis/installer.nsi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/installer.nsi revision 1569 by jpye, Fri Aug 3 13:32:44 2007 UTC trunk/nsis/installer.nsi revision 1570 by jpye, Fri Aug 3 14:18:08 2007 UTC
# Line 11  Line 11 
11    
12  Name "ASCEND ${VERSION}"  Name "ASCEND ${VERSION}"
13    
14  ;SetCompressor /FINAL zlib  SetCompressor /FINAL zlib
15  SetCompressor /SOLID lzma  ;SetCompressor /SOLID lzma
16    
17  !include LogicLib.nsh  !include LogicLib.nsh
18  !include nsDialogs.nsh  !include nsDialogs.nsh
19    
 !include dependencies.nsi  
 !include detect.nsi  
 !include download.nsi  
   
20  !ifndef PYVERSION  !ifndef PYVERSION
21  !define PYVERSION "2.5"  !define PYVERSION "2.5"
22  !endif  !endif
# Line 49  InstallDirRegKey HKLM "Software\ASCEND" Line 45  InstallDirRegKey HKLM "Software\ASCEND"
45  ; Pages  ; Pages
46    
47  Page license  Page license
48  LicenseData LICENSE.txt  LicenseData "..\LICENSE.txt"
49    
50  Page components  Page components
51  Page directory  Page directory
# Line 118  Function .onInit Line 114  Function .onInit
114    
115  FunctionEnd  FunctionEnd
116    
117    ;------------------------------------------------------------
118    ; DOWNLOAD AND INSTALL DEPENDENCIES FIRST
119    
120    !define PYTHON_VERSION "${PYVERSION}${PYPATCH}"
121    !define PYTHON_FN "python-${PYTHON_VERSION}.msi"
122    !define PYTHON_URL "http://www.python.org/ftp/python/${PYTHON_VERSION}/${PYTHON_FN}"
123    !define PYTHON_CMD "msiexec /i /passive $$DAI_TMPFILE"
124    
125    !define GTK_FN "gtk-2.10.11-win32-1.exe"
126    !define GTK_URL "http://downloads.sourceforge.net/gladewin32/${GTK_FN}"
127    !define GTK_CMD "${GTK_FN}"
128    
129    !define PYGOBJECT_FN "pygobject-2.12.3-1.win32-py${PYVERSION}.exe"
130    !define PYGOBJECT_URL "http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.12/${PYGOBJECT_FN}"
131    !define PYGOBJECT_CMD "${PYGOBJECT_FN}"
132    
133    !define PYCAIRO_FN "pycairo-1.2.6-1.win32-py${PYVERSION}.exe"
134    !define PYCAIRO_URL "http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.2/${PYCAIRO_FN}"
135    !define PYCAIRO_CMD "${PYGOBJECT_FN}"
136    
137    !define PYGTK_FN "pygtk-2.10.4-1.win32-py${PYVERSION}.exe"
138    !define PYGTK_URL "http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.10/${PYGTK_FN}"
139    !define PYGTK_CMD "${PYGTK_FN}"
140    
141    !include "download.nsi"
142    
143    Section "-python"
144        DetailPrint "--- DOWNLOAD PYTHON ---"
145            ${If} $PYDOWNLOAD == '1'
146                  !insertmacro downloadAndInstall "Python" "${PYTHON_URL}" "${PYTHON_FN}" "${PYTHON_CMD}"
147                    Call DetectPython
148                    Pop $PYOK
149                    Pop $PYPATH
150            ${EndIf}
151    SectionEnd
152    Section "-gtk"
153        DetailPrint "--- DOWNLOAD GTK+ ---"
154        ${If} $GTKDOWNLOAD == '1'
155                  !insertmacro downloadAndInstall "GTK+" ${GTK_URL} ${GTK_FN} ${GTK_CMD}
156                    Call DetectGTK
157                    Pop $GTKOK
158                    Pop $GTKPATH
159                    Call DetectGlade
160                    Pop $GLADEOK
161                    Pop $GLADEPATH
162            ${EndIf}
163    SectionEnd
164    Section "-pygobject"
165        DetailPrint "--- DOWNLOAD PYGOBJECT ---"
166            ${If} $PYGOBJECTDOWNLOAD == '1'
167                  !insertmacro downloadAndInstall "PyGObject" ${PYGOBJECT_URL} ${PYGOBJECT_FN} ${PYGOBJECT_CMD}
168                    Call DetectPyGObject
169                    Pop $PYGOBJECTOK
170            ${EndIf}
171    SectionEnd
172    Section "-pycairo"
173        DetailPrint "--- DOWNLOAD PYCAIRO ---"
174            ${If} $PYCAIRODOWNLOAD == '1'
175                  !insertmacro downloadAndInstall "PyCairo" ${PYCAIRO_URL} ${PYCAIRO_FN} ${PYCAIRO_CMD}
176            Call DetectPyCairo
177            Pop $PYCAIROOK
178            ${EndIf}
179    SectionEnd
180    Section "-pygtk"
181        DetailPrint "--- DOWNLOAD PYGTK ---"
182            ${If} $PYGTKDOWNLOAD == '1'
183                  !insertmacro downloadAndInstall "PyGTK" ${PYGTK_URL} ${PYGTK_FN} ${PYGTK_CMD}
184            Call DetectPyGTK
185            Pop $PYGTKOK
186    
187            ${EndIf}
188    SectionEnd  
189    
190    ;------------------------------------------------------------------------
191    ; INSTALL CORE STUFF including model library
192    
193  ; The stuff to install  ; The stuff to install
194  Section "ASCEND (required)"  Section "ASCEND (required)"
195      SectionIn RO      SectionIn RO
# Line 126  Section "ASCEND (required)" Line 198  Section "ASCEND (required)"
198    
199      ; Set output path to the installation directory.      ; Set output path to the installation directory.
200      SetOutPath $INSTDIR      SetOutPath $INSTDIR
201      File "ascend.dll"      File "..\ascend.dll"
202      File "ascend-config"      File "..\ascend-config"
203      File "pygtk\glade\ascend.ico"      File "..\pygtk\glade\ascend.ico"
204      File "LICENSE.txt"      File "..\LICENSE.txt"
205      File "CHANGELOG.txt"      File "..\CHANGELOG.txt"
206      File "README-windows.txt"      File "..\README-windows.txt"
207            
208      ; Model Library      ; Model Library
209      SetOutPath $INSTDIR\models      SetOutPath $INSTDIR\models
210      File /r /x .svn "models\*.a4*"      File /r /x .svn "..\models\*.a4*"
211      File /r /x .svn "models\*.tcl"      File /r /x .svn "..\models\*.tcl"
212      File /r /x .svn "models\*.dll" ; extension modules      File /r /x .svn "..\models\*.dll" ; extension modules
213      File /r /x .svn "models\*.py"; python modules      File /r /x .svn "..\models\*.py"; python modules
214            
215      SetOutPath $INSTDIR\solvers      SetOutPath $INSTDIR\solvers
216      File "solvers\qrslv\qrslv.dll"      File "..\solvers\qrslv\qrslv.dll"
217      File "solvers\conopt\conopt.dll"      File "..\solvers\conopt\conopt.dll"
218      File "solvers\lrslv\lrslv.dll"      File "..\solvers\lrslv\lrslv.dll"
219      File "solvers\cmslv\cmslv.dll"      File "..\solvers\cmslv\cmslv.dll"
220      File "solvers\lsode\lsode.dll"      File "..\solvers\lsode\lsode.dll"
221      File "solvers\ida\ida.dll"      File "..\solvers\ida\ida.dll"
222    
223      SetOutPath $INSTDIR      SetOutPath $INSTDIR
224      ;File "Makefile.bt"      ;File "Makefile.bt"
225      File "tools\textpad\ascend.syn"      File "..\tools\textpad\ascend.syn"
226    
227      ${If} ${FileExists} "$APPDATA\.ascend.ini"      ${If} ${FileExists} "$APPDATA\.ascend.ini"
228          MessageBox MB_OK "The '$APPDATA\.ascend.ini' is NOT being updated. Manually delete this file if ASCEND doesn't behave as expected."          MessageBox MB_OK "The '$APPDATA\.ascend.ini' is NOT being updated. Manually delete this file if ASCEND doesn't behave as expected."
# Line 208  ascendconfigerror: Line 280  ascendconfigerror:
280            
281  SectionEnd  SectionEnd
282    
 !define PYTHON_VERSION "${PYVERSION}${PYPATCH}"  
 !define PYTHON_FN "python-${PYTHON_VERSION}.msi"  
 !define PYTHON_URL "http://www.python.org/ftp/python/${PYTHON_VERSION}/${PYTHON_FN}"  
 !define PYTHON_CMD FILE "msiexec /i /passive $DAI_TMPFILE"  
   
 !define GTK_FN "gtk-2.10.11-win32-1.exe"  
 !define GTK_URL "http://downloads.sourceforge.net/gladewin32/${GTK_FN}"  
 !define GTK_CMD "${GTK_FN}"  
   
 !define PYGOBJECT_FN "pygobject-2.12.3-1.win32-py${PYVERSION}.exe"  
 !define PYGOBJECT_URL "http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.12/${PYGOBJECT_FN}"  
 !define PYGOBJECT_CMD "${PYGOBJECT_FN}"  
   
 !define PYCAIRO_FN "pycairo-1.2.6-1.win32-py${PYVERSION}.exe"  
 !define PYCAIRO_URL "http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.2/${PYCAIRO_FN}"  
 !define PYCAIRO_CMD "${PYGOBJECT_FN}"  
   
 !define PYGTK_FN "pygtk-2.10.4-1.win32-py${PYVERSION}.exe"  
 !define PYGTK_URL "http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.10/${PYGTK_FN}"  
 !define PYGTK_CMD "${PYGTK_FN}"  
   
 Section "-download the selected missing dependencies"  
         ${If} $PYDOWNLOAD == '1'  
               !insertmacro downloadAndInstall "Python" PYTHON_URL PYTHON_FN PYTHON_CMD  
                 Call DetectPython  
                 Pop $PYOK  
                 Pop $PYPATH  
         ${EndIf}  
         ${If} $GTKDOWNLOAD == '1'  
               !insertmacro downloadAndInstall "GTK+" GTK_URL GTK_FN GTK_CMD  
                 Call DetectGTK  
                 Pop $GTKOK  
                 Pop $GTKPATH  
                 Call DetectGlade  
                 Pop $GLADEOK  
                 Pop $GLADEPATH  
         ${EndIf}  
         ${If} $PYGOBJECTDOWNLOAD == '1'  
               !insertmacro downloadAndInstall "PyGObject" PYGOBJECT_URL PYGOBJECT_FN PYGOBJECT_CMD  
                 Call DetectPyGObject  
                 Pop $PYGOBJECTOK  
         ${EndIf}  
         ${If} $PYCAIRODOWNLOAD == '1'  
               !insertmacro downloadAndInstall "PyCairo" PYCAIRO_URL PYCAIRO_FN PYCAIRO_CMD  
         Call DetectPyCairo  
         Pop $PYCAIROOK  
         ${EndIf}  
         ${If} $PYGTKDOWNLOAD == '1'  
               !insertmacro downloadAndInstall "PyGTK" PYGTK_URL PYGTK_FN PYGTK_CMD  
         Call DetectPyGTK  
         Pop $PYGTKOK  
   
         ${EndIf}  
 SectionEnd    
   
283  ;--------------------------------  ;--------------------------------
284    
285  Section "PyGTK GUI"  Section "PyGTK GUI"
# Line 288  Section "PyGTK GUI" Line 305  Section "PyGTK GUI"
305          SetOutPath $INSTDIR          SetOutPath $INSTDIR
306    
307          ; Python interface          ; Python interface
308          File /nonfatal "pygtk\_ascpy.pyd"          File /nonfatal "..\pygtk\_ascpy.pyd"
309          File "pygtk\*.py"          File "..\pygtk\*.py"
310          File "pygtk\ascend"          File "..\pygtk\ascend"
311          File "pygtk\glade\ascend-doc.ico"          File "..\pygtk\glade\ascend-doc.ico"
312    
313          SetOutPath $INSTDIR\glade          SetOutPath $INSTDIR\glade
314          File "pygtk\glade\*.glade"          File "..\pygtk\glade\*.glade"
315          File "pygtk\glade\*.png"          File "..\pygtk\glade\*.png"
316          File "pygtk\glade\*.svg"          File "..\pygtk\glade\*.svg"
317    
318          StrCpy $PYINSTALLED "1"          StrCpy $PYINSTALLED "1"
319          WriteRegDWORD HKLM "SOFTWARE\ASCEND" "Python" 1          WriteRegDWORD HKLM "SOFTWARE\ASCEND" "Python" 1
# Line 353  Section "Tcl/Tk GUI" Line 370  Section "Tcl/Tk GUI"
370      ${Else}      ${Else}
371          DetailPrint "--- TCL/TK INTERFACE ---"          DetailPrint "--- TCL/TK INTERFACE ---"
372          SetOutPath $INSTDIR\tcltk          SetOutPath $INSTDIR\tcltk
373          File /r /x .svn "tcltk\TK\*"          File /r /x .svn "..\tcltk\TK\*"
374          SetOutPath $INSTDIR          SetOutPath $INSTDIR
375          File "tcltk\generic\interface\ascendtcl.dll"          File "..\tcltk\generic\interface\ascendtcl.dll"
376          File "tcltk\generic\interface\ascend4.exe"          File "..\tcltk\generic\interface\ascend4.exe"
377    
378          StrCpy $TCLINSTALLED "1"          StrCpy $TCLINSTALLED "1"
379          WriteRegDWORD HKLM "SOFTWARE\ASCEND" "TclTk" 1          WriteRegDWORD HKLM "SOFTWARE\ASCEND" "TclTk" 1
# Line 509  unnostart: Line 526  unnostart:
526    
527  SectionEnd  SectionEnd
528    
529    !include "dependencies.nsi"
530    
531    !include "detect.nsi"

Legend:
Removed from v.1569  
changed lines
  Added in v.1570

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