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

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

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

revision 2566 by jpye, Sat Feb 4 00:42:53 2012 UTC revision 2567 by jpye, Sat Feb 4 22:52:40 2012 UTC
# Line 1  Line 1 
1  ; NSIS script to create an ASCEND binary installer for Windows  ; NSIS script to create an ASCEND binary installer for Windows
2  ; by John Pye, 2006-2007.  ; by John Pye, 2006-2012.
3  ;  ;
4  ;--------------------------------  ;--------------------------------
5    
# Line 11  Line 11 
11    
12  Name "ASCEND ${VERSION}"  Name "ASCEND ${VERSION}"
13    
14    SetCompressor /SOLID zlib
15  ;SetCompressor /FINAL zlib  ;SetCompressor /FINAL zlib
16  SetCompressor /SOLID lzma  ;SetCompressor /SOLID lzma
17    
18  !include LogicLib.nsh  !include LogicLib.nsh
19  !include nsDialogs.nsh  !include nsDialogs.nsh
# Line 26  SetCompressor /SOLID lzma Line 27  SetCompressor /SOLID lzma
27  !define PYPATCH ".1"  !define PYPATCH ".1"
28  !endif  !endif
29    
30    !ifndef INST64
31    !define INST64 1
32    !endif
33    
34  ; The file to write  ; The file to write
35  !ifdef OUTFILE  !ifdef OUTFILE
36  OutFile ${OUTFILE}  OutFile ${OUTFILE}
# Line 33  OutFile ${OUTFILE} Line 38  OutFile ${OUTFILE}
38  OutFile "ascend-${VERSION}-py${PYVERSION}.exe"  OutFile "ascend-${VERSION}-py${PYVERSION}.exe"
39  !endif  !endif
40    
 !ifndef INST64  
 !define INST64 0  
 !endif  
   
41  ; The default installation directory  ; The default installation directory
42  !if INST64  !if ${INST64}
43  InstallDir $PROGRAMFILES64\ASCEND  InstallDir $PROGRAMFILES64\ASCEND
44  !else  !else
45  InstallDir $PROGRAMFILES32\ASCEND  InstallDir $PROGRAMFILES32\ASCEND
# Line 69  UninstPage instfiles Line 70  UninstPage instfiles
70    
71  ;--------------------------------  ;--------------------------------
72    
73    !define GTKSEARCHPATH "c:\GTK"
74    
75  Var /GLOBAL DEFAULTPATH  Var /GLOBAL DEFAULTPATH
76  Var /GLOBAL PYOK  Var /GLOBAL PYOK
77  Var /GLOBAL PYPATH  Var /GLOBAL PYPATH
78  Var /GLOBAL GTKOK  Var /GLOBAL GTKOK
79  Var /GLOBAL GTKPATH  Var /GLOBAL GTKPATH
 Var /GLOBAL GLADEOK  
80  Var /GLOBAL PYGTKOK  Var /GLOBAL PYGTKOK
81  Var /GLOBAL PYGOBJECTOK  Var /GLOBAL PYGOBJECTOK
82  Var /GLOBAL PYCAIROOK  Var /GLOBAL PYCAIROOK
 Var /GLOBAL GLADEPATH  
83  Var /GLOBAL PYINSTALLED  Var /GLOBAL PYINSTALLED
84  ;Var /GLOBAL TCLOK  ;Var /GLOBAL TCLOK
85  ;Var /GLOBAL TCLPATH  ;Var /GLOBAL TCLPATH
# Line 138  Section "-python" Line 139  Section "-python"
139          ${EndIf}          ${EndIf}
140          ${EndIf}          ${EndIf}
141  SectionEnd  SectionEnd
142    ; FIXME need to go back to using separate GTK, PyGTK, PyGObject, PyCairo installers :-(
143  Section "-gtk"  Section "-gtk"
144      DetailPrint "--- DOWNLOAD PYGTK ---"      DetailPrint "--- DOWNLOAD PYGTK ---"
145      ${If} $GTKDOWNLOAD == '1'      ${If} $GTKDOWNLOAD == '1'
# Line 146  Section "-gtk" Line 148  Section "-gtk"
148          Pop $GTKOK          Pop $GTKOK
149          Pop $GTKPATH          Pop $GTKPATH
150    
         Call DetectGlade  
         Pop $GLADEOK  
         Pop $GLADEPATH    
   
151  ;       Call DetectTcl  ;       Call DetectTcl
152  ;       Pop $TCLOK  ;       Pop $TCLOK
153  ;       Pop $TCLPATH  ;       Pop $TCLPATH
# Line 257  SectionEnd Line 255  SectionEnd
255  ;--------------------------------  ;--------------------------------
256    
257  Section "PyGTK GUI" sect_pygtk  Section "PyGTK GUI" sect_pygtk
258  !if INST64  !if ${INST64}
259      SetRegView 64      SetRegView 64
260  !endif  !endif
261      ; Check the dependencies of the PyGTK GUI before proceding...      ; Check the dependencies of the PyGTK GUI before proceding...
# Line 265  Section "PyGTK GUI" sect_pygtk Line 263  Section "PyGTK GUI" sect_pygtk
263          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 "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)"
264      ${ElseIf} $GTKOK == 'NOK'      ${ElseIf} $GTKOK == 'NOK'
265          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 "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)"
     ${ElseIf} $GLADEOK == 'NOK'  
         MessageBox MB_OK "PyGTK GUI cannot be installed, because Glade 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).\n\nIf you do have GTK+ runtime installed, make sure\nyou have a version that includes support for Glade."  
266      ${ElseIf} $PYGTKOK == "NOK"      ${ElseIf} $PYGTKOK == "NOK"
267          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 "PyGTK GUI cannot be installed, because PyGTK was not found on this system.$\nPlease check the installation instructions.$\n$\n(PYPATH=$PYPATH)"
268      ${ElseIf} $PYCAIROOK == "NOK"      ${ElseIf} $PYCAIROOK == "NOK"
# Line 476  SectionEnd Line 472  SectionEnd
472  ; UNINSTALLER  ; UNINSTALLER
473    
474  Section "Uninstall"  Section "Uninstall"
475  !if INST64  !if ${INST64}
476      SetRegView 64      SetRegView 64
477  !endif  !endif
478    
# Line 616  SectionEnd Line 612  SectionEnd
612  !include "envvarwarning.nsi"  !include "envvarwarning.nsi"
613    
614  Function .onInit  Function .onInit
615  !if INST64  !if ${INST64}
616      ${If} ${RunningX64}      ${If} ${RunningX64}
617      ${Else}      ${Else}
618          Abort "This ASCEND installer is for 64-bit Windows versions only"          MessageBox MB_OK "This ASCEND installer is for 64-bit Windows versions only.\n\nVisit http://ascend4.org for 32-bit versions."
619      ${EndIf}      ${EndIf}
 !endif  
   
 !if INST64  
620      SetRegView 64      SetRegView 64
621  !endif  !endif
622    
623      StrCpy $PYINSTALLED ""      StrCpy $PYINSTALLED ""
624  ;   StrCpy $TCLINSTALLED ""  ;   StrCpy $TCLINSTALLED ""
625      StrCpy $ASCENDINIFOUND ""      StrCpy $ASCENDINIFOUND ""
# Line 641  Function .onInit Line 635  Function .onInit
635      Call DetectGTK      Call DetectGTK
636      Pop $GTKOK      Pop $GTKOK
637      Pop $GTKPATH      Pop $GTKPATH
   
     Call DetectGlade  
     Pop $GLADEOK  
     Pop $GLADEPATH    
638            
639  ;   Call DetectTcl  ;   Call DetectTcl
640  ;   Pop $TCLOK  ;   Pop $TCLOK
# Line 659  Function .onInit Line 649  Function .onInit
649      Call DetectPyCairo      Call DetectPyCairo
650      Pop $PYCAIROOK      Pop $PYCAIROOK
651            
652      StrCpy $PATH "$DEFAULTPATH;$PYPATH;$GTKPATH"      MessageBox MB_OK "GTK path is $GTKPATH"
653        StrCpy $PATH "$GTKPATH;$DEFAULTPATH;$PYPATH"
654    
655      ReadRegStr $0 HKLM "SOFTWARE\ASCEND" "Install_Dir"      ReadRegStr $0 HKLM "SOFTWARE\ASCEND" "Install_Dir"
656      ${If} $0 != ""        ${If} $0 != ""  
657          ;MessageBox MB_OK "Previous installation detected..."          ;MessageBox MB_OK "Previous installation detected..."
658          ; If user previous deselected Tcl/Tk, then deselect it by          ; If user previous deselected Tcl/Tk, then deselect it by
659          ; default now, i.e don't force the user to install it.          ; default now, i.e don't force the user to install it.
660    
661  ;       ReadRegDWORD $0 HKLM "SOFTWARE\ASCEND" "TclTk"  ;       ReadRegDWORD $0 HKLM "SOFTWARE\ASCEND" "TclTk"
662  ;       ${If} $0 = 0  ;       ${If} $0 = 0
663  ;           ;MessageBox MB_OK "Tcl/Tk was previously deselected"  ;           ;MessageBox MB_OK "Tcl/Tk was previously deselected"

Legend:
Removed from v.2566  
changed lines
  Added in v.2567

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