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

Diff of /trunk/pygtk/create.nsi

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

revision 921 by johnpye, Thu Oct 26 10:18:53 2006 UTC revision 922 by johnpye, Wed Nov 8 05:25:37 2006 UTC
# Line 23  OutFile ascend-setup.exe Line 23  OutFile ascend-setup.exe
23  !endif  !endif
24    
25    
26  SetCompressor /FINAL zlib  ;SetCompressor /FINAL zlib
27  ;SetCompressor /SOLID lzma  SetCompressor /SOLID lzma
28    
29  ; The default installation directory  ; The default installation directory
30  InstallDir $PROGRAMFILES\ASCEND  InstallDir $PROGRAMFILES\ASCEND
# Line 82  FunctionEnd Line 82  FunctionEnd
82    
83  ; The stuff to install  ; The stuff to install
84  Section "ASCEND (required)"  Section "ASCEND (required)"
85    SectionIn RO      SectionIn RO
86    
87    DetailPrint "--- COMMON FILES ---"      DetailPrint "--- COMMON FILES ---"
88      
89    ; Set output path to the installation directory.      ; Set output path to the installation directory.
90    SetOutPath $INSTDIR      SetOutPath $INSTDIR
91    File "..\ascend.dll"      File "..\ascend.dll"
92          File "..\ascend-config"
93    ; Model Library  
94    SetOutPath $INSTDIR\models      ; Model Library
95    File /r /x .svn "..\models\*.a4*"      SetOutPath $INSTDIR\models
96    File /r /x .svn "..\models\*.tcl"      File /r /x .svn "..\models\*.a4*"
97    File /r /x .svn "..\models\*.dll" ; extension modules      File /r /x .svn "..\models\*.tcl"
98    File /r /x .svn "..\models\*.py"; python modules      File /r /x .svn "..\models\*.dll" ; extension modules
99        File /r /x .svn "..\models\*.py"; python modules
100    
101    SetOutPath $INSTDIR      SetOutPath $INSTDIR
102    File "Makefile.bt"      File "Makefile.bt"
103    File "ascend.syn"      File "ascend.syn"
104    
105    ; Set 'librarypath' in .ascend.ini      ; Set 'librarypath' in .ascend.ini
106    WriteINIstr $APPDATA\.ascend.ini Directories librarypath "$DOCUMENTS\ascdata;$INSTDIR\models"      WriteINIstr $APPDATA\.ascend.ini Directories librarypath "$DOCUMENTS\ascdata;$INSTDIR\models"
107      
108    ; Write the installation path into the registry      ; Write the installation path into the registry
109    WriteRegStr HKLM SOFTWARE\ASCEND "Install_Dir" "$INSTDIR"      WriteRegStr HKLM SOFTWARE\ASCEND "Install_Dir" "$INSTDIR"
110      
111    ; Write the uninstall keys for Windows      ; Write the uninstall keys for Windows
112    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "DisplayName" "ASCEND Simulation Environment"      WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "DisplayName" "ASCEND Simulation Environment"
113    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "UninstallString" '"$INSTDIR\uninstall.exe"'      WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "UninstallString" '"$INSTDIR\uninstall.exe"'
114    WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "NoModify" 1      WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "NoModify" 1
115    WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "NoRepair" 1      WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ASCEND" "NoRepair" 1
116    WriteUninstaller "uninstall.exe"      WriteUninstaller "uninstall.exe"
117      
118        ; Write file locations to the registry for access from ascend-config
119        WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_LIB" "$INSTDIR"
120        WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_BIN" "$INSTDIR"
121        WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_INCLUDE" "$INSTDIR\include"
122        WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_ASCDATA" "$INSTDIR"
123        WriteRegStr HKLM SOFTWARE\ASCEND "INSTALL_MODELS" "$INSTDIR\models"
124    
125        ; Create 'ascend-config.bat' batch file for launching the python script 'ascend-config'.
126        ClearErrors
127        FileOpen $0 $INSTDIR\ascend-config.bat w
128        IfErrors ascendconfigerror
129        FileWrite $0 "@echo off"
130        FileWriteByte $0 "13"
131        FileWriteByte $0 "10"
132        FileWrite $0 "set PATH=$PYPATH;$GTKPATH"
133        FileWriteByte $0 "13"
134        FileWriteByte $0 "10"
135        FileWrite $0 "cd "
136        FileWrite $0 $INSTDIR
137        FileWriteByte $0 "13"
138        FileWriteByte $0 "10"
139        FileWrite $0 "$PYPATH\python "
140        FileWriteByte $0 "34"
141        FileWrite $0 "$INSTDIR\ascend-config"
142        FileWriteByte $0 "34"
143        FileWrite $0 " %1 %2 %3 %4 %5 %6 %7 %8"
144        FileWriteByte $0 "13"
145        FileWriteByte $0 "10"
146    
147        FileClose $0
148    
149        Return
150    ascendconfigerror:
151        MessageBox MB_OK "The 'ascend-config.bat' file was not installed properly; problems writing to that file."  
152        
153  SectionEnd  SectionEnd
154    
155  ;--------------------------------  ;--------------------------------

Legend:
Removed from v.921  
changed lines
  Added in v.922

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