From 484eff996b48e7a92b3fe0da1d62e93e15cc648a Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sun, 14 Jun 2015 19:51:00 -0400 Subject: [PATCH] Use short form of cantera_version when looking for data directory --- SConstruct | 1 + include/cantera/base/config.h.in | 3 +++ src/base/application.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 308981ee1..77c48904f 100644 --- a/SConstruct +++ b/SConstruct @@ -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): diff --git a/include/cantera/base/config.h.in b/include/cantera/base/config.h.in index cdffa00af..4d488dfdd 100644 --- a/include/cantera/base/config.h.in +++ b/include/cantera/base/config.h.in @@ -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. diff --git a/src/base/application.cpp b/src/base/application.cpp index 467387581..4e7500cac 100644 --- a/src/base/application.cpp +++ b/src/base/application.cpp @@ -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");