-
This commit is contained in:
parent
38a6a2bc0e
commit
dfb0908248
5 changed files with 12 additions and 155 deletions
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
import sys
|
||||
|
||||
bindir = '/usr/local/bin'
|
||||
libdir = '/Users/dgg/dv/sf/cantera/build/lib/powerpc-apple-darwin7.0.0'
|
||||
incdir = '/Users/dgg/dv/sf/cantera/build/include'
|
||||
libs = ' -loneD -lzeroD -ltransport -lcantera -lrecipes -lcvode -lctlapack -lctmath -lctblas -ltpx -lg2c -lgcc'
|
||||
bindir = '/home/goodwin/bin'
|
||||
libdir = '/home/goodwin/dv/sf/cantera/build/lib/i686-pc-linux-gnu'
|
||||
incdir = '/home/goodwin/dv/sf/cantera/build/include'
|
||||
libs = ' -loneD -lzeroD -ltransport -lcantera -lrecipes -lcvode -lctlapack -lctmath -lctblas -ltpx -L/usr/lib/gcc-lib/i386-redhat-linux/2.96 -L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../.. -lg2c -lm'
|
||||
|
||||
f = open('setup.m','w')
|
||||
f.write('cd cantera\nbuildux\nexit\n')
|
||||
|
|
|
|||
|
|
@ -63,19 +63,11 @@ config.h: ../../config.h
|
|||
cp -f ../../config.h ./config.h
|
||||
|
||||
|
||||
ct_defs.h.gch: ct_defs.h
|
||||
ifeq (@precompile_headers@,yes)
|
||||
@CXX@ ct_defs.h $(CXX_FLAGS)
|
||||
endif
|
||||
|
||||
utilities.h.gch: utilities.h
|
||||
ifeq (@precompile_headers@,yes)
|
||||
@CXX@ utilities.h $(CXX_FLAGS)
|
||||
endif
|
||||
|
||||
%.h.gch:
|
||||
ifeq (@precompile_headers@,yes)
|
||||
@CXX@ $*.h $(CXX_FLAGS)
|
||||
else
|
||||
@echo 'skipping precompiling header file $*.h'
|
||||
endif
|
||||
|
||||
base: $(BASE)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ typedef int ftnlen; // Fortran hidden string length type
|
|||
// The configure script defines this if the operatiing system is Mac
|
||||
// OS X, This used to add some Mac-specific directories to the default
|
||||
// data file search path.
|
||||
#define DARWIN 1
|
||||
#define DARWIN 0
|
||||
|
||||
|
||||
//--------- Fonts for reaction path diagrams ----------------------
|
||||
|
|
@ -60,13 +60,13 @@ typedef int ftnlen; // Fortran hidden string length type
|
|||
//--------------------- Python ------------------------------------
|
||||
|
||||
// used to run Python to process .cti files
|
||||
#define PYTHON_EXE "/usr/bin/python"
|
||||
#define PYTHON_EXE "/home/goodwin/bin/python"
|
||||
|
||||
|
||||
//--------------------- Cantera -----------------------------------
|
||||
|
||||
// used to find data files
|
||||
#define CANTERA_ROOT "/usr/local/cantera"
|
||||
#define CANTERA_ROOT "/home/goodwin/cantera"
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
6
config.h
6
config.h
|
|
@ -50,7 +50,7 @@ typedef int ftnlen; // Fortran hidden string length type
|
|||
// The configure script defines this if the operatiing system is Mac
|
||||
// OS X, This used to add some Mac-specific directories to the default
|
||||
// data file search path.
|
||||
#define DARWIN 1
|
||||
#define DARWIN 0
|
||||
|
||||
|
||||
//--------- Fonts for reaction path diagrams ----------------------
|
||||
|
|
@ -60,13 +60,13 @@ typedef int ftnlen; // Fortran hidden string length type
|
|||
//--------------------- Python ------------------------------------
|
||||
|
||||
// used to run Python to process .cti files
|
||||
#define PYTHON_EXE "/usr/bin/python"
|
||||
#define PYTHON_EXE "/home/goodwin/bin/python"
|
||||
|
||||
|
||||
//--------------------- Cantera -----------------------------------
|
||||
|
||||
// used to find data files
|
||||
#define CANTERA_ROOT "/usr/local/cantera"
|
||||
#define CANTERA_ROOT "/home/goodwin/cantera"
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,135 +0,0 @@
|
|||
import sys, os, string
|
||||
prefix = '/usr/local'
|
||||
pycmd = '/usr/bin/python' # sys.argv[2]
|
||||
localinst = 0
|
||||
|
||||
icyg = prefix.find('/cygdrive/')
|
||||
if icyg == 0:
|
||||
prefix = prefix[10]+':'+prefix[11:]
|
||||
|
||||
bindir = '/usr/local/bin'
|
||||
libdir = '/usr/local/lib/cantera/1.5.3'
|
||||
hdrdir = '/usr/local/include/cantera'
|
||||
demodir = '/usr/local/cantera/1.5.3/demos'
|
||||
datadir = '/usr/local/cantera/1.5.3/data'
|
||||
templdir = '/usr/local/cantera/1.5.3/templates'
|
||||
ctdir = '/usr/local/cantera/1.5.3'
|
||||
home = '/Users/dgg'
|
||||
|
||||
f = open(home+'/setup_cantera','w')
|
||||
f.write('#!/bin/sh\n')
|
||||
f.write('LD_LIBRARY_PATH='+libdir+':$LD_LIBRARY_PATH\nexport LD_LIBRARY_PATH\n')
|
||||
f.write('PATH='+bindir+':$PATH\nexport PATH\n')
|
||||
f.write('PYTHON_CMD='+pycmd+'\nexport PYTHON_CMD\n')
|
||||
if pycmd <> 'python':
|
||||
f.write('alias ctpython='+pycmd+'\n')
|
||||
|
||||
ctloc = '-'
|
||||
warn = ''
|
||||
warn2 = ''
|
||||
if localinst:
|
||||
try:
|
||||
v = sys.version_info
|
||||
ctloc = prefix+'/lib/python'+`v[0]`+'.'+`v[1]`+'/site-packages'
|
||||
try:
|
||||
import Cantera
|
||||
ctpath = Cantera.__path__[0]
|
||||
if ctpath <> ctloc:
|
||||
warn = """
|
||||
######################################################################
|
||||
Warning: the Cantera Python package is already installed at
|
||||
"""+ctpath+""". The newly-installed package at
|
||||
"""+ctloc+"""/Cantera
|
||||
cannot be accessed until the existing one is removed.
|
||||
######################################################################
|
||||
|
||||
"""
|
||||
except:
|
||||
pass
|
||||
|
||||
sys.path.append(ctloc)
|
||||
f.write('PYTHONPATH='+ctloc+':$PYTHONPATH\nexport PYTHONPATH\n')
|
||||
except:
|
||||
print 'error'
|
||||
f.close()
|
||||
|
||||
# write the script to run MixMaster
|
||||
f = open(bindir+'/mixmaster','w')
|
||||
f.write('#!/bin/sh\n'+pycmd+"""w -c 'from MixMaster import MixMaster; MixMaster()'
|
||||
""")
|
||||
f.close()
|
||||
|
||||
|
||||
# write the script to copy files to build a new app
|
||||
f = open(bindir+'/ctnew','w')
|
||||
f.write("""#!/bin/sh
|
||||
if test $1 = '-f77'; then
|
||||
cp """+templdir+"""/f77/*.* .
|
||||
else
|
||||
cp """+templdir+"""/cxx/*.* .
|
||||
fi
|
||||
""")
|
||||
f.close()
|
||||
|
||||
|
||||
try:
|
||||
import Cantera
|
||||
ctpath = Cantera.__path__[0]
|
||||
except:
|
||||
ctpath = "-"
|
||||
|
||||
fm = open(ctdir+"/ctpath.m","w")
|
||||
fm.write("""path(path,'"""+prefix+"""/matlab/toolbox/cantera/cantera')\n""")
|
||||
fm.write("""path(path,'"""+prefix+"""/matlab/toolbox/cantera/cantera/1D')\n""")
|
||||
fm.close()
|
||||
|
||||
print """
|
||||
|
||||
Cantera has been successfully installed.
|
||||
|
||||
File locations:
|
||||
|
||||
applications """+bindir+"""
|
||||
library files """+libdir+"""
|
||||
C++ headers """+hdrdir+"""
|
||||
demos """+demodir+"""
|
||||
data files """+datadir+"""
|
||||
|
||||
Matlab toolbox """+prefix+"""/matlab/toolbox/cantera/cantera
|
||||
Matlab demos """+prefix+"""/matlab/toolbox/cantera/cantera-demos
|
||||
Matlab tutorials """+prefix+"""/matlab/toolbox/cantera/cantera-tutorials
|
||||
|
||||
An m-file to set the correct matlab path for Cantera
|
||||
is at """+ctdir+"""/ctpath.m"""
|
||||
|
||||
if ctpath <> "-":
|
||||
print """
|
||||
Python package """+ctpath
|
||||
if warn <> '':
|
||||
print warn
|
||||
else:
|
||||
print """
|
||||
######################################################################
|
||||
Warning: the Cantera Python package is not installed. If you
|
||||
intentionally skipped it, ignore this message. Otherwise, type
|
||||
'make python' and/or 'make python-install' and look for error messages.
|
||||
Note that you must first install the 'Numeric' package before installing
|
||||
the Cantera package.
|
||||
######################################################################
|
||||
"""
|
||||
|
||||
|
||||
print """
|
||||
|
||||
setup script """+home+"""/setup_cantera
|
||||
|
||||
The setup script configures the environment for Cantera. It is
|
||||
recommended that you run this script by typing
|
||||
|
||||
source """+home+"""/setup_cantera
|
||||
|
||||
before using Cantera, or else
|
||||
include its contents in your shell login script.
|
||||
"""
|
||||
|
||||
|
||||
Loading…
Add table
Reference in a new issue