/[ascend]/branches/adrian/nsis/installer.nsi
ViewVC logotype

Diff of /branches/adrian/nsis/installer.nsi

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

revision 2938 by adrian, Wed Apr 1 10:57:31 2015 UTC revision 2939 by adrian, Wed Jun 3 22:05:25 2015 UTC
# Line 60  Var DEFAULTPATH Line 60  Var DEFAULTPATH
60  Var HAVE_PYTHON  Var HAVE_PYTHON
61  Var PYPATH  Var PYPATH
62  Var HAVE_GTK  Var HAVE_GTK
 Var GTKPATH  
 Var HAVE_PYGTK  
63  Var HAVE_PYGOBJECT  Var HAVE_PYGOBJECT
64  Var HAVE_PYCAIRO  Var HAVE_PYCAIRO
65  Var PYINSTALLED  Var PYINSTALLED
# Line 71  Var PDFINSTALLED Line 69  Var PDFINSTALLED
69  Var PATH  Var PATH
70    
71  Var NEED_PYTHON  Var NEED_PYTHON
 Var NEED_GTK  
 Var NEED_PYGTK  
 Var NEED_PYCAIRO  
 Var NEED_PYGOBJECT  
72    
73  Var ASCENDINIFOUND  Var ASCENDINIFOUND
74  Var ASCENDENVVARFOUND  Var ASCENDENVVARFOUND
# Line 94  Var PYTHONTARGETDIR Line 88  Var PYTHONTARGETDIR
88  !define PYTHON_CMD "msiexec /i $DAI_TMPFILE /passive ALLUSERS=1 TARGETDIR=$PYTHONTARGETDIR"  !define PYTHON_CMD "msiexec /i $DAI_TMPFILE /passive ALLUSERS=1 TARGETDIR=$PYTHONTARGETDIR"
89    
90  !define THIRDPARTY_DIR "http://downloads.sourceforge.net/project/ascend-sim/thirdparty/"  !define THIRDPARTY_DIR "http://downloads.sourceforge.net/project/ascend-sim/thirdparty/"
 !define GTK_VER "2.22"  
91    
92  !ifdef INST64  !ifdef INST64
93  !define WINXX "win64"  !define WINXX "win64"
94  !define AMDXX ".win-amd64"  !define AMDXX ".win-amd64"
95  !define NNBIT "64-bit"  !define NNBIT "64-bit"
96  !define X64I386 "x64"  !define X64I386 "x64"
 !define GTK_PATCH ".1-20101229"  
97  !else  !else
98  !define WINXX "win32"  !define WINXX "win32"
99  !define AMDXX ".win32"  !define AMDXX ".win32"
100  !define X64I386 "i386"  !define X64I386 "i386"
101  !define NNBIT "32-bit"  !define NNBIT "32-bit"
 !define GTK_PATCH ".1-20101227"  
102  !endif  !endif
103    
 ; Host our own GTK bundles, repackaged as installers.  
 ; User should still be able to use the ftp.gnome.org zip files, we just can't easily install them from here.  
 ; Also, but having GTK installer, we can store the installation location in the registry (and have both 64 and 32 bit versions)  
 !define GTK_FN "gtk+-${GTK_VER}${GTK_PATCH}-${X64I386}-a4.exe"  
 !define GTK_URL "${THIRDPARTY_DIR}${GTK_FN}"  
 !define GTK_MFT "gtk+-bundle_${GTK_VER}${GTK_PATCH}_${WINXX}.mft"  
 !define GTK_CMD "$DAI_TMPFILE /S"  
   
 ; We will host the PyGTK, PyGObject and PyCairo dependencies on SF.net ourselves... for the moment.  
 ; Note that PyGTK version should match GTK+ version.  
 !define PYGTK_PATCH ".0"  
 !define PYCAIRO_VER "1.10.0"  
 !define PYGOBJECT_VER "2.28.6"  
 !define PYGTK_FN "pygtk-${GTK_VER}${PYGTK_PATCH}${AMDXX}-py${PYVERSION}.exe"  
 !define PYCAIRO_FN "py2cairo-${PYCAIRO_VER}${AMDXX}-py${PYVERSION}.exe"  
 !define PYGOBJECT_FN "pygobject-${PYGOBJECT_VER}${AMDXX}-py${PYVERSION}.exe"  
 !define PYGTK_URL "${THIRDPARTY_DIR}${PYGTK_FN}"  
 !define PYCAIRO_URL "${THIRDPARTY_DIR}${PYCAIRO_FN}"  
 !define PYGOBJECT_URL "${THIRDPARTY_DIR}${PYGOBJECT_FN}"  
 !define PYGTK_CMD "$DAI_TMPFILE"  
 !define PYCAIRO_CMD "$DAI_TMPFILE"  
 !define PYGOBJECT_CMD "$DAI_TMPFILE"  
104    
105  !include "download.nsi"  !include "download.nsi"
106    
# Line 146  Section "-python" Line 115  Section "-python"
115          ${EndIf}          ${EndIf}
116  SectionEnd  SectionEnd
117    
 Section "-gtk"  
     DetailPrint "--- DOWNLOAD GTK ---"  
     ${If} $NEED_GTK == '1'  
         !insertmacro downloadAndInstall "GTK" "${GTK_URL}" "${GTK_FN}" "${GTK_CMD}"  
         Call DetectGTK  
         ${If} $HAVE_GTK == 'NOK'  
             MessageBox MB_OK "GTK installation appears to have failed. You may need to retry manually."  
         ${EndIf}  
         ${EndIf}  
 SectionEnd  
   
 Section "-pygtk"  
     DetailPrint "--- DOWNLOAD PYGTK ---"  
     ${If} $NEED_PYGTK == '1'  
         !insertmacro downloadAndInstall "PyGTK" "${PYGTK_URL}" "${PYGTK_FN}" "${PYGTK_CMD}"  
         Call DetectPyGTK  
         ${If} $HAVE_PYGTK == 'NOK'  
             MessageBox MB_OK "PyGTK installation appears to have failed. You may need to retry manually"  
         ${EndIf}  
         ${EndIf}  
 SectionEnd  
   
 Section "-pycairo"  
     DetailPrint "--- DOWNLOAD PYCAIRO ---"  
     ${If} $NEED_PYCAIRO == '1'  
         !insertmacro downloadAndInstall "PyCAIRO" "${PYCAIRO_URL}" "${PYCAIRO_FN}" "${PYCAIRO_CMD}"  
         Call DetectPyCairo  
         ${If} $HAVE_PYCAIRO == 'NOK'  
             MessageBox MB_OK "PyCairo installation appears to have failed. You may need to retry manually."  
         ${EndIf}  
         ${EndIf}  
 SectionEnd  
   
 Section "-pygobject"  
     DetailPrint "--- DOWNLOAD PYGOBJECT ---"  
     ${If} $NEED_PYGOBJECT == '1'  
         !insertmacro downloadAndInstall "PyGObject" "${PYGOBJECT_URL}" "${PYGOBJECT_FN}" "${PYGOBJECT_CMD}"  
         Call DetectPyGObject  
         ${If} $HAVE_PYGOBJECT == 'NOK'  
             MessageBox MB_OK "PyGObject installation appears to have failed. You may need to retry manually."  
         ${EndIf}  
         ${EndIf}  
 SectionEnd  
   
118  ;------------------------------------------------------------------------  ;------------------------------------------------------------------------
119  ; INSTALL CORE STUFF including model library  ; INSTALL CORE STUFF including model library
120    
# Line 265  Section "ASCEND (required)" Line 190  Section "ASCEND (required)"
190      WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_ASCDATA" "$INSTDIR"      WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_ASCDATA" "$INSTDIR"
191      WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_MODELS" "$INSTDIR\models"      WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_MODELS" "$INSTDIR\models"
192      WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_SOLVERS" "$INSTDIR\solvers"      WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_SOLVERS" "$INSTDIR\solvers"
     WriteRegStr HKLM SOFTWARE\ASCEND "GTKLIBS" "$GTKPATH"  
193            
194      ; Write default values of ASCENDLIBRARY and ASCENDSOLVERS (user can override with env vars)      ; Write default values of ASCENDLIBRARY and ASCENDSOLVERS (user can override with env vars)
195      WriteRegStr HKLM SOFTWARE\ASCEND "ASCENDLIBRARY" "$INSTDIR\models"      WriteRegStr HKLM SOFTWARE\ASCEND "ASCENDLIBRARY" "$INSTDIR\models"
# Line 276  SectionEnd Line 200  SectionEnd
200    
201  ;--------------------------------  ;--------------------------------
202    
203  Section "PyGTK GUI" sect_pygtk  Section "GTK GUI" sect_pygtk
204  !ifdef INST64  !ifdef INST64
205      SetRegView 64      SetRegView 64
206  !endif  !endif
207      ; Check the dependencies of the PyGTK GUI before proceding...      ; Check the dependencies of the PyGTK GUI before proceding...
208      ${If} $HAVE_PYTHON == 'NOK'      ${If} $HAVE_PYTHON == 'NOK'
209          MessageBox MB_OK "PyGTK GUI can not be installed, because Python was not found on this system.$\nIf you do want to use the PyGTK GUI, please check the installation instructions$\n$\n(PYPATH=$PYPATH)"          MessageBox MB_OK "GTK GUI can not be installed, because Python was not found on this system.$\nIf you do want to use the GTK GUI, please check the installation instructions$\n$\n(PYPATH=$PYPATH)"
210      ${ElseIf} $HAVE_GTK == 'NOK'      ${ElseIf} $HAVE_GTK == 'NOK'
211          MessageBox MB_OK "PyGTK GUI cannot be installed, because GTK+ 2.x was not found on this system.$\nIf you do want to use the PyGTK GUI, please check the installation instructions$\n$\n(GTKPATH=$GTKPATH)"          MessageBox MB_OK "GTK GUI cannot be installed, because GTK+ 3.x was not found on this system.$\nIf you do want to use the GTK GUI, please install GTK3 from PyGObject for Windows$\n"
212      ${ElseIf} $HAVE_PYGTK == "NOK"      ${ElseIf} $HAVE_PYCAIRO == 'NOK'
213          MessageBox MB_OK "PyGTK GUI cannot be installed, because PyGTK was not found on this system.$\nPlease check the installation instructions.$\n$\n(PYPATH=$PYPATH)"          MessageBox MB_OK "GTK GUI cannot be installed, because PyCairo was not found on this system.$\nIf you do want to use the GTK GUI, please install Cairo from PyGObject for Windows$\n"
214      ${ElseIf} $HAVE_PYCAIRO == "NOK"      ${ElseIf} $HAVE_PYGOBJECT == 'NOK'
215          MessageBox MB_OK "PyGTK GUI cannot be installed, because PyCairo was not found on this system.$\nPlease check the installation instructions.$\n$\n(PYPATH=$PYPATH)"          MessageBox MB_OK "GTK GUI cannot be installed, because PyGObject was not found on this system.$\nIf you do want to use the GTK GUI, please install GOBject from PyGObject for Windows$\n"
     ${ElseIf} $HAVE_PYGOBJECT == "NOK"  
         MessageBox MB_OK "PyGTK GUI cannot be installed, because PyGObject was not found on this system.$\nPlease check the installation instructions.$\n$\n(PYPATH=$PYPATH)"  
216      ${Else}      ${Else}
217          ;MessageBox MB_OK "Python: $PYPATH, GTK: $GTKPATH"          ;MessageBox MB_OK "Python: $PYPATH, GTK: $GTKPATH"
218    
# Line 652  Function .onInit Line 574  Function .onInit
574    
575      Call DetectPython      Call DetectPython
576      Call DetectGTK      Call DetectGTK
     Call DetectPyGTK  
577      Call DetectPyGObject      Call DetectPyGObject
578      Call DetectPyCairo      Call DetectPyCairo
579            
580      ;MessageBox MB_OK "GTK path is $GTKPATH"      ;MessageBox MB_OK "GTK path is $GTKPATH"
581      StrCpy $PATH "$GTKPATH;$DEFAULTPATH;$PYPATH"      StrCpy $PATH "$DEFAULTPATH;$PYPATH"
582    
583      ReadRegStr $0 HKLM "SOFTWARE\ASCEND" "Install_Dir"      ReadRegStr $0 HKLM "SOFTWARE\ASCEND" "Install_Dir"
584      ${If} $0 != ""        ${If} $0 != ""  

Legend:
Removed from v.2938  
changed lines
  Added in v.2939

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