/[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 2447 by jpye, Mon Apr 4 06:04:20 2011 UTC revision 2492 by jpye, Sat Aug 13 04:05:13 2011 UTC
# Line 72  Var /GLOBAL PYGOBJECTOK Line 72  Var /GLOBAL PYGOBJECTOK
72  Var /GLOBAL PYCAIROOK  Var /GLOBAL PYCAIROOK
73  Var /GLOBAL GLADEPATH  Var /GLOBAL GLADEPATH
74  Var /GLOBAL PYINSTALLED  Var /GLOBAL PYINSTALLED
75  Var /GLOBAL TCLOK  ;Var /GLOBAL TCLOK
76  Var /GLOBAL TCLPATH  ;Var /GLOBAL TCLPATH
77  Var /GLOBAL TCLINSTALLED  ;Var /GLOBAL TCLINSTALLED
78    
79  Var /GLOBAL PDFINSTALLED  Var /GLOBAL PDFINSTALLED
80    
# Line 82  Var /GLOBAL PATH Line 82  Var /GLOBAL PATH
82    
83  Var /GLOBAL PYDOWNLOAD  Var /GLOBAL PYDOWNLOAD
84  Var /GLOBAL GTKDOWNLOAD  Var /GLOBAL GTKDOWNLOAD
85  Var /GLOBAL TCLDOWNLOAD  ;Var /GLOBAL TCLDOWNLOAD
86    
87  Var /GLOBAL ASCENDINIFOUND  Var /GLOBAL ASCENDINIFOUND
88  Var /GLOBAL ASCENDENVVARFOUND  Var /GLOBAL ASCENDENVVARFOUND
# Line 109  Var /GLOBAL ASCENDLIBRARY Line 109  Var /GLOBAL ASCENDLIBRARY
109    
110  ; passive install of pygtk 2.22.6 doesn't seem to work.  ; passive install of pygtk 2.22.6 doesn't seem to work.
111    
112  !define TCL_VERSION "8.5.9.2"  ;!define TCL_VERSION "8.5.9.2"
113  !define TCL_PATCH ".294317"  ;!define TCL_PATCH ".294317"
114  !define TCL_FN "ActiveTcl${TCL_VERSION}${TCL_PATCH}-win32-ix86-threaded.exe"  ;!define TCL_FN "ActiveTcl${TCL_VERSION}${TCL_PATCH}-win32-ix86-threaded.exe"
115  !define TCL_URL "http://downloads.activestate.com/ActiveTcl/releases/${TCL_VERSION}/${TCL_FN}"  ;!define TCL_URL "http://downloads.activestate.com/ActiveTcl/releases/${TCL_VERSION}/${TCL_FN}"
116  !define TCL_CMD "$DAI_TMPFILE"  ;!define TCL_CMD "$DAI_TMPFILE"
117  !define TCL_MD5 "15d6b17d38e66a83956dc16b7d80fc59"  ;!define TCL_MD5 "15d6b17d38e66a83956dc16b7d80fc59"
118    
119  !include "download.nsi"  !include "download.nsi"
120    
# Line 142  Section "-gtk" Line 142  Section "-gtk"
142          Pop $GLADEOK          Pop $GLADEOK
143          Pop $GLADEPATH            Pop $GLADEPATH  
144    
145          Call DetectTcl  ;       Call DetectTcl
146          Pop $TCLOK  ;       Pop $TCLOK
147          Pop $TCLPATH  ;       Pop $TCLPATH
148    
149          Call DetectPyGTK          Call DetectPyGTK
150          Pop $PYGTKOK          Pop $PYGTKOK
# Line 156  Section "-gtk" Line 156  Section "-gtk"
156          Pop $PYCAIROOK          Pop $PYCAIROOK
157          ${EndIf}          ${EndIf}
158  SectionEnd  SectionEnd
159  Section "-tcl"  ;Section "-tcl"
160      DetailPrint "--- DOWNLOAD TCL/TK ---"  ;   DetailPrint "--- DOWNLOAD TCL/TK ---"
161      ${If} $TCLDOWNLOAD == '1'  ;   ${If} $TCLDOWNLOAD == '1'
162          !insertmacro downloadAndInstall "Tcl/Tk" "${TCL_URL}" "${TCL_FN}" "${TCL_CMD}" "${TCL_MD5}"  ;       !insertmacro downloadAndInstall "Tcl/Tk" "${TCL_URL}" "${TCL_FN}" "${TCL_CMD}" "${TCL_MD5}"
163          Call DetectTcl  ;       Call DetectTcl
164          Pop $TCLOK  ;       Pop $TCLOK
165          Pop $TCLPATH  ;       Pop $TCLPATH
166          ${EndIf}  ;        ${EndIf}
167  SectionEnd  ;SectionEnd
168    
169  ;------------------------------------------------------------------------  ;------------------------------------------------------------------------
170  ; INSTALL CORE STUFF including model library  ; INSTALL CORE STUFF including model library
# Line 362  SectionEnd Line 362  SectionEnd
362    
363  ;---------------------------------  ;---------------------------------
364    
365  Section /o "Tcl/Tk GUI" sect_tcltk  ;Section /o "Tcl/Tk GUI" sect_tcltk
366    ;
367      ${If} $TCLOK != 'OK'  ;   ${If} $TCLOK != 'OK'
368          MessageBox MB_OK "Tck/Tk GUI can not be installed, because ActiveTcl was not found on this system. If do you want to use the Tcl/Tk GUI, please check the installation instructions ($TCLPATH)"  ;       MessageBox MB_OK "Tck/Tk GUI can not be installed, because ActiveTcl was not found on this system. If do you want to use the Tcl/Tk GUI, please check the installation instructions ($TCLPATH)"
369      ${Else}  ;   ${Else}
370          DetailPrint "--- TCL/TK INTERFACE ---"  ;       DetailPrint "--- TCL/TK INTERFACE ---"
371          SetOutPath $INSTDIR\tcltk  ;       SetOutPath $INSTDIR\tcltk
372          ; FIXME we should be a bit more selective here?  ;       ; FIXME we should be a bit more selective here?
373          File /r /x .svn "..\tcltk\tk\*"  ;       File /r /x .svn "..\tcltk\tk\*"
374          SetOutPath $INSTDIR  ;       SetOutPath $INSTDIR
375          File "..\tcltk\interface\ascendtcl.dll"  ;       File "..\tcltk\interface\ascendtcl.dll"
376          File "..\tcltk\interface\ascend4.exe"  ;       File "..\tcltk\interface\ascend4.exe"
377    ;
378          StrCpy $TCLINSTALLED "1"  ;       StrCpy $TCLINSTALLED "1"
379          WriteRegDWORD HKLM "SOFTWARE\ASCEND" "TclTk" 1  ;       WriteRegDWORD HKLM "SOFTWARE\ASCEND" "TclTk" 1
380    ;
381      ${EndIf}  ;   ${EndIf}
382    ;SectionEnd
 SectionEnd  
383    
384  ;---------------------------------  ;---------------------------------
385    
# Line 406  Section "Start Menu Shortcuts" sect_menu Line 405  Section "Start Menu Shortcuts" sect_menu
405      ; Model library shortcut      ; Model library shortcut
406      CreateShortCut "$SMPROGRAMS\ASCEND\Model Library.lnk" "$INSTDIR\models" "" "$INSTDIR\models" 0      CreateShortCut "$SMPROGRAMS\ASCEND\Model Library.lnk" "$INSTDIR\models" "" "$INSTDIR\models" 0
407    
408      ; Link to Tcl/Tk GUI    ;   ; Link to Tcl/Tk GUI  
409      ${If} $TCLINSTALLED == "1"  ;   ${If} $TCLINSTALLED == "1"
410          CreateShortCut "$SMPROGRAMS\ASCEND\ASCEND Tcl/Tk.lnk" "$INSTDIR\ascend4.exe" "" "$INSTDIR\ascend4.exe" 0  ;       CreateShortCut "$SMPROGRAMS\ASCEND\ASCEND Tcl/Tk.lnk" "$INSTDIR\ascend4.exe" "" "$INSTDIR\ascend4.exe" 0
411      ${EndIf}  ;   ${EndIf}
412            
413      ; Documentation      ; Documentation
414      ${If} $PDFINSTALLED == "1"      ${If} $PDFINSTALLED == "1"
# Line 523  Section "Uninstall" Line 522  Section "Uninstall"
522    
523  ;--- tcl/tk components ---  ;--- tcl/tk components ---
524    
525      ReadRegDWORD $0 HKLM "SOFTWARE\ASCEND" "TclTk"  ;   ReadRegDWORD $0 HKLM "SOFTWARE\ASCEND" "TclTk"
526      ${If} $0 <> 0  ;   ${If} $0 <> 0
527          DetailPrint "--- REMOVING TCL/TK COMPONENTS ---"  ;       DetailPrint "--- REMOVING TCL/TK COMPONENTS ---"
528          Delete $INSTDIR\ascendtcl.dll  ;       Delete $INSTDIR\ascendtcl.dll
529          Delete $INSTDIR\ascend4.exe  ;       Delete $INSTDIR\ascend4.exe
530          RMDir /r $INSTDIR\tcltk  ;       RMDir /r $INSTDIR\tcltk
531      ${EndIf}  ;   ${EndIf}
532    
533  ;--- documentation ---  ;--- documentation ---
534    
# Line 604  SectionEnd Line 603  SectionEnd
603    
604  Function .onInit  Function .onInit
605      StrCpy $PYINSTALLED ""      StrCpy $PYINSTALLED ""
606      StrCpy $TCLINSTALLED ""  ;   StrCpy $TCLINSTALLED ""
607      StrCpy $ASCENDINIFOUND ""      StrCpy $ASCENDINIFOUND ""
608      StrCpy $PDFINSTALLED ""      StrCpy $PDFINSTALLED ""
609      StrCpy $ASCENDENVVARFOUND ""      StrCpy $ASCENDENVVARFOUND ""
# Line 623  Function .onInit Line 622  Function .onInit
622      Pop $GLADEOK      Pop $GLADEOK
623      Pop $GLADEPATH        Pop $GLADEPATH  
624            
625      Call DetectTcl  ;   Call DetectTcl
626      Pop $TCLOK  ;   Pop $TCLOK
627      Pop $TCLPATH  ;   Pop $TCLPATH
628            
629      Call DetectPyGTK      Call DetectPyGTK
630      Pop $PYGTKOK      Pop $PYGTKOK
# Line 643  Function .onInit Line 642  Function .onInit
642          ;MessageBox MB_OK "Previous installation detected..."          ;MessageBox MB_OK "Previous installation detected..."
643          ; If user previous deselected Tcl/Tk, then deselect it by          ; If user previous deselected Tcl/Tk, then deselect it by
644          ; default now, i.e don't force the user to install it.          ; default now, i.e don't force the user to install it.
645          ReadRegDWORD $0 HKLM "SOFTWARE\ASCEND" "TclTk"  ;       ReadRegDWORD $0 HKLM "SOFTWARE\ASCEND" "TclTk"
646          ${If} $0 = 0  ;       ${If} $0 = 0
647              ;MessageBox MB_OK "Tcl/Tk was previously deselected"  ;           ;MessageBox MB_OK "Tcl/Tk was previously deselected"
648              SectionGetFlags "${sect_tcltk}" $1  ;           SectionGetFlags "${sect_tcltk}" $1
649              IntOp $1 $1 ^ ${SF_SELECTED}  ;           IntOp $1 $1 ^ ${SF_SELECTED}
650              SectionSetFlags "${sect_tcltk}" $1  ;           SectionSetFlags "${sect_tcltk}" $1
651          ${Else}  ;       ${Else}
652              ; If previously installed, force it to stay installed;  ;           ; If previously installed, force it to stay installed;
653              ; the only way to uninstall a component is via complete  ;           ; the only way to uninstall a component is via complete
654              ; uninstall.  ;           ; uninstall.
655              SectionGetFlags "${sect_tcltk}" $1  ;           SectionGetFlags "${sect_tcltk}" $1
656              IntOp $1 $1 ^ ${SF_RO}  ;           IntOp $1 $1 ^ ${SF_RO}
657              SectionSetFlags "${sect_tcltk}" $1  ;           SectionSetFlags "${sect_tcltk}" $1
658          ${EndIf}  ;       ${EndIf}
659    
660          ReadRegDWORD $0 HKLM "SOFTWARE\ASCEND" "Python"          ReadRegDWORD $0 HKLM "SOFTWARE\ASCEND" "Python"
661          ${If} $0 = 0          ${If} $0 = 0

Legend:
Removed from v.2447  
changed lines
  Added in v.2492

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