comparison PalantirServer/PalantirInitialization.cpp @ 19:e85455ff6039

standalon
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 24 Jul 2012 10:17:12 +0200
parents 3959d33612cc
children 62bd05fe4b7c
comparison
equal deleted inserted replaced
18:f3551378e8f3 19:e85455ff6039
46 { 46 {
47 Toolbox::ReadFile(content, configurationFile); 47 Toolbox::ReadFile(content, configurationFile);
48 } 48 }
49 else 49 else
50 { 50 {
51 #if PALANTIR_RELEASE == 0 51 try
52 boost::filesystem::path p = PALANTIR_PATH; 52 {
53 p /= "Resources"; 53 #if PALANTIR_STANDALONE == 0
54 p /= CONFIGURATION_FILE; 54 boost::filesystem::path p = PALANTIR_PATH;
55 Toolbox::ReadFile(content, p.string()); 55 p /= "Resources";
56 p /= CONFIGURATION_FILE;
57 Toolbox::ReadFile(content, p.string());
56 #else 58 #else
57 Toolbox::ReadFile(content, CONFIGURATION_FILE); 59 Toolbox::ReadFile(content, CONFIGURATION_FILE);
58 #endif 60 #endif
61 }
62 catch (PalantirException&)
63 {
64 // No configuration file found, give up with empty configuration
65 return;
66 }
59 } 67 }
60 68
61 Json::Reader reader; 69 Json::Reader reader;
62 if (!reader.parse(content, *configuration_)) 70 if (!reader.parse(content, *configuration_))
63 { 71 {