Fix directories searched for input files on Windows
Update to use the registry key for Cantera 2.2. The 'templates' subdirectory no longer exists. Fix documentation to not incorrectly claim that COMMONPROGRAMFILES will be searched for input files.
This commit is contained in:
parent
6bec1029e7
commit
aa2b732954
2 changed files with 7 additions and 9 deletions
|
|
@ -66,11 +66,10 @@ void popError();
|
|||
* for input files along a path that includes platform-specific default
|
||||
* locations, and possibly user-specified locations.
|
||||
*
|
||||
* The current directory (".") is always searched first. Then, on Windows
|
||||
* platforms, if environment variable COMMONPROGRAMFILES is set (which it
|
||||
* should be on Win XP or Win 2000), then directories under this one will be
|
||||
* added to the search path. The %Cantera Windows installer installs data
|
||||
* files to this location.
|
||||
* The current directory (".") is always searched first. Then, on Windows, the
|
||||
* registry is checked to find the Cantera installation directory, and the
|
||||
* 'data' subdirectory of the installation directory will be added to the search
|
||||
* path.
|
||||
*
|
||||
* On the Mac, directory '/Applications/Cantera/data' is added to the
|
||||
* search path.
|
||||
|
|
|
|||
|
|
@ -410,15 +410,14 @@ void Application::setDefaultDirectories()
|
|||
|
||||
#ifdef _WIN32
|
||||
// Under Windows, the Cantera setup utility records the installation
|
||||
// directory in the registry. Data files are stored in the 'data' and
|
||||
// 'templates' subdirectories of the main installation directory.
|
||||
// directory in the registry. Data files are stored in the 'data'
|
||||
// subdirectory of the main installation directory.
|
||||
|
||||
std::string installDir;
|
||||
readStringRegistryKey("SOFTWARE\\Cantera\\Cantera 2.0",
|
||||
readStringRegistryKey("SOFTWARE\\Cantera\\Cantera 2.2",
|
||||
"InstallDir", installDir, "");
|
||||
if (installDir != "") {
|
||||
dirs.push_back(installDir + "data");
|
||||
dirs.push_back(installDir + "templates");
|
||||
|
||||
// Scripts for converting mechanisms to CTI and CMTL are installed in
|
||||
// the 'bin' subdirectory. Add that directory to the PYTHONPATH.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue