Use short form of cantera_version when looking for data directory

This commit is contained in:
Ray Speth 2015-06-14 19:51:00 -04:00
parent eefffa78b9
commit 484eff996b
3 changed files with 5 additions and 1 deletions

View file

@ -1231,6 +1231,7 @@ else:
# **************************************
configh['CANTERA_VERSION'] = quoted(env['cantera_version'])
configh['CANTERA_SHORT_VERSION'] = quoted(env['cantera_short_version'])
# Conditional defines
def cdefine(definevar, configvar, comp=True, value=1):

View file

@ -5,6 +5,9 @@
// Cantera version -> this will be a double-quoted string value
%(CANTERA_VERSION)s
// Just the major + minor version (i.e. 2.2 instead of 2.2.0)
%(CANTERA_SHORT_VERSION)s
//------------------------ Development flags ------------------//
//
// Compile in additional debug printing where available.

View file

@ -414,7 +414,7 @@ void Application::setDefaultDirectories()
// subdirectory of the main installation directory.
std::string installDir;
readStringRegistryKey("SOFTWARE\\Cantera\\Cantera 2.2",
readStringRegistryKey("SOFTWARE\\Cantera\\Cantera " CANTERA_SHORT_VERSION,
"InstallDir", installDir, "");
if (installDir != "") {
dirs.push_back(installDir + "data");