5 #include "utility/string_convert.h"
\r
7 #include <boost/property_tree/ptree.hpp>
\r
8 #include <boost/property_tree/xml_parser.hpp>
\r
9 #include <boost/filesystem.hpp>
\r
10 #include <boost/thread/once.hpp>
\r
12 #include <functional>
\r
19 std::wstring ftemplate;
\r
21 boost::property_tree::ptree pt;
\r
25 std::string initialPath = boost::filesystem::initial_path().file_string();
\r
27 boost::property_tree::read_xml(initialPath + "\\caspar.config", pt);
\r
29 auto paths = pt.get_child("configuration.paths");
\r
30 media = widen(paths.get("media-path", initialPath + "\\media\\"));
\r
31 log = widen(paths.get("log-path", initialPath + "\\log\\"));
\r
32 ftemplate = widen(paths.get("template-path", initialPath + "\\template\\"));
\r
33 data = widen(paths.get("data-path", initialPath + "\\data\\"));
\r
38 static boost::once_flag setup_flag = BOOST_ONCE_INIT;
\r
39 boost::call_once(do_setup, setup_flag);
\r
42 const std::wstring& env::media_folder()
\r
48 const std::wstring& env::log_folder()
\r
54 const std::wstring& env::template_folder()
\r
60 const std::wstring& env::data_folder()
\r
66 const std::wstring& env::version()
\r
68 static std::wstring ver = L"2.0.0.2";
\r
72 const std::wstring& env::version_tag()
\r
74 static std::wstring tag = L"Experimental";
\r
78 const boost::property_tree::ptree& env::properties()
\r