MessageBox MB_OK "Error: no python found into your PATH environment variable. You'll have to do the Faust setup manually (you'll see how in the documentation)." IDOK +2
MessageBox MB_OK "Faust installed in your python environment (the version found into your PATH environment variable)."
FileOpen $1 "$TEMP\tmp_site_pkg" r
FileRead $1 $2
FileClose $1
;MessageBox MB_OK "$2"
SetOutPath $2
File @PROJECT_BINARY_DIR@\wrapper\python\*py
File @PROJECT_BINARY_DIR@\wrapper\python\*pyd
File @PROJECT_BINARY_DIR@\wrapper\python\*pxd
; post install matfaust auto-setup
!include "FileFunc.nsh" ; for Locate
!include "WordFunc.nsh" ; for WordFind
; find matlab install parent dir ; TODO: change E:\ to default $PROGRAMFILES64
${locate} "$PROGRAMFILES64" "/L=D /M=MATLAB /G=0 /S=" "matlabInstallDirFoundCb" ; assuming user installed matlab in the default path
StrCmp $R3 "" 0 init_loop
${Locate} "E:\" "/L=D /M=MATLAB /G=0 /S=" "matlabInstallDirFoundCb" ; if not default path, searching in E:\ (VM conf.)
StrCmp $R3 "" 0 init_loop
${Locate} "F:\" "/L=D /M=MATLAB /G=0 /S=" "matlabInstallDirFoundCb" ; searching in F:\ just to test an non-existent disk on VM (TODO: delete)
StrCmp $R3 "" fatal_error init_loop
init_loop:
; loop into matlab directories (possible to have multiple versions)
; MessageBox MB_YESNO 'Do you want to continue searching another version of Matlab to install Faust for ?' IDYES +2
;goto continue
goto loop
goto continue
;IfErrors 0 +2
;MessageBox MB_OK "Error" IDOK +2
;MessageBox MB_OK "$$R0=$R0"
fatal_error:
MessageBox MB_OK "Matlab installation path is not in default $PROGRAMFILES64. You will have to do the Faust setup on your own (you'll see how in the documentation)."
continue:
ExecShell open "http://faust.inria.fr" ;TODO: replace by local doc page
SectionEnd
Function matlabFoundCb
StrCpy $R4 $R9
FileOpen $1 "$R4\toolbox\local\startup.m" a
FileSeek $1 0 END ; do not erase start of file (but risk to add Faust path multiple times)