return boost::to_upper_copy(str);\r
}\r
\r
-int main(int argc, wchar_t* argv[])\r
+int main(int argc, char* argv[])\r
{ \r
static_assert(sizeof(void*) == 4, "64-bit code generation is not supported.");\r
\r
\r
bool restart = false;\r
tbb::task_scheduler_init init;\r
+ std::wstring config_file_name(L"casparcg.config");\r
\r
try \r
{\r
// Configure environment properties from configuration.\r
- caspar::env::configure(L"casparcg.config");\r
+ if (argc >= 2)\r
+ {\r
+ config_file_name = caspar::widen(argv[1]);\r
+ }\r
+\r
+ caspar::env::configure(config_file_name);\r
\r
caspar::log::set_log_level(caspar::env::properties().get(L"configuration.log-level", L"debug"));\r
\r
std::wstringstream str;\r
boost::property_tree::xml_writer_settings<wchar_t> w(' ', 3);\r
boost::property_tree::write_xml(str, caspar::env::properties(), w);\r
- CASPAR_LOG(info) << L"casparcg.config:\n-----------------------------------------\n" << str.str().c_str() << L"-----------------------------------------";\r
+ CASPAR_LOG(info) << config_file_name << L":\n-----------------------------------------\n" << str.str().c_str() << L"-----------------------------------------";\r
tbb::atomic<bool> wait_for_keypress;\r
wait_for_keypress = false;\r
\r
catch(boost::property_tree::file_parser_error&)\r
{\r
CASPAR_LOG_CURRENT_EXCEPTION();\r
- CASPAR_LOG(fatal) << L"Unhandled configuration error in main thread. Please check the configuration file (casparcg.config) for errors.";\r
+ CASPAR_LOG(fatal) << L"Unhandled configuration error in main thread. Please check the configuration file (" << config_file_name << L") for errors.";\r
system("pause"); \r
}\r
catch(...)\r