178 |
; Python interface |
; Python interface |
179 |
File "_ascpy.dll" |
File "_ascpy.dll" |
180 |
File "*.py" |
File "*.py" |
181 |
|
File "glade\ascend.ico" |
182 |
|
File "glade\ascend-doc.ico" |
183 |
|
|
184 |
SetOutPath $INSTDIR\glade |
SetOutPath $INSTDIR\glade |
185 |
File "glade\*.glade" |
File "glade\*.glade" |
186 |
File "glade\*.png" |
File "glade\*.png" |
187 |
File "glade\*.svg" |
File "glade\*.svg" |
|
File "glade\ascend.ico" |
|
188 |
|
|
189 |
; Create 'ascend.bat' launcher for PyGTK interface |
; Create 'ascend.bat' launcher for PyGTK interface |
190 |
ClearErrors |
ClearErrors |
212 |
|
|
213 |
StrCpy $PYINSTALLED "1" |
StrCpy $PYINSTALLED "1" |
214 |
WriteRegDWORD HKLM "SOFTWARE\ASCEND" "Python" 1 |
WriteRegDWORD HKLM "SOFTWARE\ASCEND" "Python" 1 |
215 |
|
|
216 |
|
;---- file association ---- |
217 |
|
|
218 |
|
; back up old value of .a4c file association |
219 |
|
ReadRegStr $1 HKCR ".a4c" "" |
220 |
|
StrCmp $1 "" a4cnobkp |
221 |
|
StrCmp $1 "ASCEND.model" a4cnobkp |
222 |
|
|
223 |
|
; Remember the old file association if necessary |
224 |
|
WriteRegStr HKLM "SOFTWARE\ASCEND" "BackupAssocA4C" $1 |
225 |
|
|
226 |
|
a4cnobkp: |
227 |
|
WriteRegStr HKCR ".a4c" "" "ASCEND.model" |
228 |
|
|
229 |
|
; back up old value of .a4c file association |
230 |
|
ReadRegStr $1 HKCR ".a4l" "" |
231 |
|
StrCmp $1 "" a4lnobkp |
232 |
|
StrCmp $1 "ASCEND.model" a4lnobkp |
233 |
|
|
234 |
|
; Remember the old file association if necessary |
235 |
|
WriteRegStr HKLM "SOFTWARE\ASCEND" "BackupAssocA4L" $1 |
236 |
|
|
237 |
|
a4lnobkp: |
238 |
|
WriteRegStr HKCR ".a4l" "" "ASCEND.model" |
239 |
|
|
240 |
|
; So, what does an A4L or A4C file actually do? |
241 |
|
|
242 |
|
ReadRegStr $0 HKCR "ASCEND.model" "" |
243 |
|
StrCmp $0 "" 0 a4cskip |
244 |
|
|
245 |
|
WriteRegStr HKCR "ASCEND.model" "" "ASCEND model file" |
246 |
|
WriteRegStr HKCR "ASCEND.model\shell" "" "open" |
247 |
|
WriteRegStr HKCR "ASCEND.model\DefaultIcon" "" "$INSTDIR\ascend-doc.ico" |
248 |
|
|
249 |
|
a4cskip: |
250 |
|
WriteRegStr HKCR "ASCEND.model\shell\open\command" "" '$INSTDIR\ascend.bat "%1"' |
251 |
|
|
252 |
|
System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)' |
253 |
|
|
254 |
${Else} |
${Else} |
255 |
MessageBox MB_OK "PyGTK GUI can not be installed, because Glade was not found on this system. If you do want to use the PyGTK GUI, please check the installation instructions ($GLADEPATH)" |
MessageBox MB_OK "PyGTK GUI can not be installed, because Glade was not found on this system. If you do want to use the PyGTK GUI, please check the installation instructions ($GLADEPATH)" |
256 |
${EndIf} |
${EndIf} |
280 |
File "..\tcltk\generic\interface\ascendtcl.dll" |
File "..\tcltk\generic\interface\ascendtcl.dll" |
281 |
File "..\tcltk\generic\interface\ascend4.exe" |
File "..\tcltk\generic\interface\ascend4.exe" |
282 |
|
|
283 |
StrCpy $TCLINSTALLED "!" |
StrCpy $TCLINSTALLED "1" |
284 |
WriteRegDWORD HKLM "SOFTWARE\ASCEND" "TclTk" 1 |
WriteRegDWORD HKLM "SOFTWARE\ASCEND" "TclTk" 1 |
285 |
|
|
286 |
${EndIf} |
${EndIf} |
296 |
|
|
297 |
CreateDirectory "$SMPROGRAMS\ASCEND" |
CreateDirectory "$SMPROGRAMS\ASCEND" |
298 |
CreateShortCut "$SMPROGRAMS\ASCEND\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 |
CreateShortCut "$SMPROGRAMS\ASCEND\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 |
299 |
|
|
300 |
|
; Link to Tcl/Tk GUI |
301 |
|
StrCmp $TCLINSTALLED "" smnotcl 0 |
302 |
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 |
303 |
|
smnotcl: |
304 |
|
|
305 |
; Link to PyGTK GUI |
; Link to PyGTK GUI |
306 |
StrCmp $PYINSTALLED "" smdone smpython |
StrCmp $PYINSTALLED "" smdone 0 |
307 |
smpython: |
CreateShortCut "$SMPROGRAMS\ASCEND\ASCEND.lnk" "$INSTDIR\ascend.bat" "" "$INSTDIR\ascend.ico" 0 "SW_SHOWMINIMIZED" |
|
CreateShortCut "$SMPROGRAMS\ASCEND\ASCEND.lnk" "$INSTDIR\ascend.bat" "" "$INSTDIR\glade\ascend.ico" 0 "SW_SHOWMINIMIZED" |
|
308 |
smdone: |
smdone: |
309 |
|
|
310 |
SectionEnd |
SectionEnd |
327 |
Delete $INSTDIR\*.pyc |
Delete $INSTDIR\*.pyc |
328 |
Delete $INSTDIR\glade\*.glade |
Delete $INSTDIR\glade\*.glade |
329 |
Delete $INSTDIR\glade\*.png |
Delete $INSTDIR\glade\*.png |
|
Delete $INSTDIR\glade\ascend.ico |
|
330 |
Delete $INSTDIR\glade\*.svg |
Delete $INSTDIR\glade\*.svg |
331 |
RmDir $INSTDIR\glade |
RmDir $INSTDIR\glade |
332 |
|
Delete $INSTDIR\ascend.ico |
333 |
|
Delete $INSTDIR\ascend-doc.ico |
334 |
|
|
335 |
|
;--- file association (for Python GUI) --- |
336 |
|
|
337 |
|
DetailPrint "--- REMOVING FILE ASSOCIATION ---" |
338 |
|
;start of restore script |
339 |
|
ReadRegStr $1 HKCR ".a4c" "" |
340 |
|
${If} $1 == "ASCEND.model" |
341 |
|
ReadRegStr $1 HKLM "SOFTWARE\ASCEND" "BackupAssocA4C" |
342 |
|
${If} $1 == "" |
343 |
|
; nothing to restore: delete it |
344 |
|
DeleteRegKey HKCR ".a4c" |
345 |
|
${Else} |
346 |
|
WriteRegStr HKCR ".a4c" "" $1 |
347 |
|
${EndIf} |
348 |
|
DeleteRegValue HKLM "SOFTWARE\ASCEND" "BackupAssocA4C" |
349 |
|
${EndIf} |
350 |
|
|
351 |
|
ReadRegStr $1 HKCR ".a4l" "" |
352 |
|
${If} $1 == "ASCEND.model" |
353 |
|
ReadRegStr $1 HKLM "SOFTWARE\ASCEND" "BackupAssocA4L" |
354 |
|
${If} $1 == "" |
355 |
|
; nothing to restore: delete it |
356 |
|
DeleteRegKey HKCR ".a4l" |
357 |
|
${Else} |
358 |
|
WriteRegStr HKCR ".a4l" "" $1 |
359 |
|
${EndIf} |
360 |
|
DeleteRegValue HKLM "SOFTWARE\ASCEND" "BackupAssocA4L" |
361 |
|
${EndIf} |
362 |
|
|
363 |
|
DeleteRegKey HKCR "ASCEND.model" ;Delete key with association settings |
364 |
|
|
365 |
|
System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)' |
366 |
|
;rest of script |
367 |
|
|
368 |
unnopython: |
unnopython: |
369 |
|
|