diff --git a/Cantera/matlab/Makefile.in b/Cantera/matlab/Makefile.in index 62b8f0d64..cbdfd4203 100644 --- a/Cantera/matlab/Makefile.in +++ b/Cantera/matlab/Makefile.in @@ -24,6 +24,8 @@ SRCS = cantera/private/ctmethods.cpp \ cantera/private/surfmethods.cpp CANTERA_LIBDIR=@buildlib@ +os_is_win=@OS_IS_WIN@ + ifeq ($(os_is_win),0) LIB_DEPS = $(CANTERA_LIBDIR)/libcantera.a $(CANTERA_LIBDIR)/libzeroD.a \ $(CANTERA_LIBDIR)/liboneD.a \ @@ -34,8 +36,6 @@ LIB_DEPS = $(CANTERA_LIBDIR)/cantera.lib $(CANTERA_LIBDIR)/zeroD.lib \ $(CANTERA_LIBDIR)/transport.lib endif -os_is_win=@OS_IS_WIN@ - all: cantera/ctmethods.@mex_ext@ cantera/ctmethods.@mex_ext@: $(SRCS) $(LIBDEPS) Makefile diff --git a/Cantera/matlab/cantera/private/write.cpp b/Cantera/matlab/cantera/private/write.cpp index b8400249b..bf3534793 100644 --- a/Cantera/matlab/cantera/private/write.cpp +++ b/Cantera/matlab/cantera/private/write.cpp @@ -11,7 +11,7 @@ namespace Cantera { int n = 0; while (ch != '\0') { if (ch =='\n') { - ss += " ');"; + ss += "');"; mexEvalString(ss.c_str()); ss = "disp('"; } diff --git a/Cantera/python/Cantera/__init__.py b/Cantera/python/Cantera/__init__.py index b864b9d14..a2593c7d7 100755 --- a/Cantera/python/Cantera/__init__.py +++ b/Cantera/python/Cantera/__init__.py @@ -3,9 +3,10 @@ # import types +ok = 0 from constants import * -from gases import * from exceptions import * +from gases import * from set import set from importFromFile import * diff --git a/Cantera/python/Cantera/ctml_writer.py b/Cantera/python/Cantera/ctml_writer.py index d169acae2..170e46a13 100644 --- a/Cantera/python/Cantera/ctml_writer.py +++ b/Cantera/python/Cantera/ctml_writer.py @@ -13,8 +13,8 @@ """ -from Cantera import CanteraError -from Cantera import GasConstant +from Cantera.exceptions import CanteraError +from Cantera.constants import * from Cantera.XML import XML_Node import types, math, copy @@ -1347,15 +1347,15 @@ class Lindemann: validate() -if __name__ == "__main__": - from Cantera import * - import sys, os, os.path - file = sys.argv[1] - base = os.path.basename(file) - root, ext = os.path.splitext(base) - dataset(root) - execfile(file) - write() +## if __name__ == "__main__": +## from Cantera import * +## import sys, os, os.path +## file = sys.argv[1] +## base = os.path.basename(file) +## root, ext = os.path.splitext(base) +## dataset(root) +## execfile(file) +## write() ########################################## @@ -1364,7 +1364,10 @@ if __name__ == "__main__": # $Revision$ # $Date$ # $Log$ -# Revision 1.26 2004-02-03 03:31:06 dggoodwin +# Revision 1.27 2004-02-03 16:42:54 dggoodwin +# *** empty log message *** +# +# Revision 1.26 2004/02/03 03:31:06 dggoodwin # *** empty log message *** # # Revision 1.25 2003/11/24 16:39:33 dggoodwin diff --git a/Cantera/src/ct2ctml.cpp b/Cantera/src/ct2ctml.cpp index 43be6a4c0..7ae6a670a 100644 --- a/Cantera/src/ct2ctml.cpp +++ b/Cantera/src/ct2ctml.cpp @@ -47,7 +47,7 @@ namespace ctml { if (!f) { throw CanteraError("checkPython","cannot open "+path+" for writing"); } - f << "from Cantera import *\n"; + f << "from Cantera import ctml_writer\n"; f.close(); int ierr = 0; #ifdef WIN32 @@ -85,8 +85,7 @@ namespace ctml { if (!f) { throw CanteraError("ct2ctml","cannot open "+path+" for writing."); } - f << "from Cantera import *\n" - << "from Cantera.ctml_writer import *\n" + f << "from Cantera.ctml_writer import *\n" << "import sys, os, os.path\n" << "file = \"" << file << "\"\n" << "base = os.path.basename(file)\n" @@ -96,7 +95,7 @@ namespace ctml { << "write()\n"; f.close(); #ifdef WIN32 - string cmd = pypath() + " " + path + ">> ct2ctml.log 2>&1"; + string cmd = pypath() + " " + path + "> ct2ctml.log 2>&1"; #else string cmd = pypath() + " " + path + " &> ct2ctml.log"; #endif diff --git a/Makefile.in b/Makefile.in index 0bcc5564a..6a9f95f5d 100755 --- a/Makefile.in +++ b/Makefile.in @@ -145,6 +145,7 @@ endif finish-install: @INSTALL@ -d @ct_docdir@ + @INSTALL@ -d @ct_bindir@ #@INSTALL@ doc/*.pdf @ct_docdir@ @INSTALL@ -d @ct_demodir@/cxx @@ -169,7 +170,6 @@ ifeq ($(os_is_win),0) ln -s @ct_datadir@ @prefix@/cantera/data ln -s @ct_templdir@ @prefix@/cantera/templates ln -s @ct_tutdir@ @prefix@/cantera/tutorials - @INSTALL@ README*.txt @prefix@/cantera @INSTALL@ License.* @prefix@/cantera @INSTALL@ tools/src/finish_install.py tools/bin (PYTHONPATH=''; @PYTHON_CMD@ tools/bin/finish_install.py @prefix@ @PYTHON_CMD@) @@ -177,7 +177,6 @@ ifeq ($(os_is_win),0) else cd Cantera/fortran/f77demos; sed s'/isentropic/ctlib/g' isentropic.dsp > ctlib.dsp @INSTALL@ Cantera/fortran/f77demos/*.dsp @ct_demodir@/f77 - @INSTALL@ README.txt @ct_dir@ @INSTALL@ @buildbin@/* @ct_bindir@ endif diff --git a/config/configure b/config/configure index 773335a8b..47665ae12 100755 --- a/config/configure +++ b/config/configure @@ -578,7 +578,7 @@ fi local_inst=1 if test "x${prefix}" = "xNONE"; then if test "x${OS_IS_CYGWIN}" = "x1"; then - prefix="/cygdrive/c/cantera" + prefix=${CANTERA_INSTALL_DIR} # mkdir ${prefix} else prefix=${ac_default_prefix} diff --git a/config/configure.in b/config/configure.in index 60bd4ef86..b20e8d831 100755 --- a/config/configure.in +++ b/config/configure.in @@ -45,7 +45,7 @@ AC_SUBST(CVF_LIBDIR) local_inst=1 if test "x${prefix}" = "xNONE"; then if test "x${OS_IS_CYGWIN}" = "x1"; then - prefix="/cygdrive/c/cantera" + prefix=${CANTERA_INSTALL_DIR} # mkdir ${prefix} else prefix=${ac_default_prefix} diff --git a/configure b/configure index 609828540..134cc02ca 100755 --- a/configure +++ b/configure @@ -29,7 +29,11 @@ CANTERA_VERSION=${CANTERA_VERSION:="1.5.3"} # # These options only need to be set if you are building Cantera on # a Windows PC. -# +# +# Cantera will be installed by default in c:\cantera. Change this to +# install it somewhere else +CANTERA_INSTALL_DIR=${CANTERA_INSTALL_DIR:="c:\cantera"} + # On a PC running MS-Windows, Cantera can be built either using # Microsoft Visual Studio, with the Visual C++ and Visual Fortran # compilers, or using the linux-like cygwin environment with the @@ -309,6 +313,7 @@ export MAKE export RPFONT export USE_VISUAL_STUDIO export FORTRAN_LIB_DIR +export CANTERA_INSTALL_DIR cd config chmod +x ./configure