Simplified Matlab startup procedure
Users can now either source 'setup_cantera' before starting Matlab or run the ctpath.m script after starting Matlab to set the environment variables and paths needed by Cantera.
This commit is contained in:
parent
4aa54c3419
commit
59083268fd
1 changed files with 8 additions and 0 deletions
|
|
@ -25,6 +25,11 @@ f.write('PYTHON_CMD='+pycmd+'\nexport PYTHON_CMD\n')
|
|||
if pycmd <> 'python':
|
||||
f.write('alias ctpython='+pycmd+'\n')
|
||||
|
||||
if build_matlab:
|
||||
matlabdir = prefix + '/matlab/toolbox/cantera/cantera'
|
||||
f.write('MATLABPATH=$MATLABPATH:%s/:%s/1D\n' % (matlabdir, matlabdir))
|
||||
f.write('export MATLABPATH\n')
|
||||
|
||||
ctloc = '-'
|
||||
warn = ''
|
||||
warn2 = ''
|
||||
|
|
@ -115,6 +120,9 @@ if build_matlab:
|
|||
fm = open(ctdir+"/ctpath.m","w")
|
||||
fm.write("""path('"""+prefix+"""/matlab/toolbox/cantera/cantera',path)\n""")
|
||||
fm.write("""path('"""+prefix+"""/matlab/toolbox/cantera/cantera/1D',path)\n""")
|
||||
if build_python:
|
||||
fm.write("setenv('PYTHON_CMD','%s')\n" % pycmd)
|
||||
fm.write("setenv('PYTHONPATH', [getenv('PYTHONPATH'), '%s'])\n" % pypath)
|
||||
fm.close()
|
||||
|
||||
fm = open(ctdir+"/cantera_demos.m","w")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue