From: SirAnthony Date: Fri, 21 Mar 2014 06:22:09 +0000 (+0600) Subject: Make voglgen accept specdir as option X-Git-Url: https://git.cworth.org/git?p=vogl;a=commitdiff_plain;h=a04c975ec589b8d1fb10baa3953cfcac4a29f8ed Make voglgen accept specdir as option --- diff --git a/src/voglgen/voglgen.cpp b/src/voglgen/voglgen.cpp index aa8eb96..add362d 100644 --- a/src/voglgen/voglgen.cpp +++ b/src/voglgen/voglgen.cpp @@ -63,6 +63,7 @@ static command_line_param_desc g_command_line_param_descs[] = { "ctype_regex", 1, false, NULL }, { "namespace_regex", 1, false, NULL }, { "srcdir", 1, false, NULL }, + { "specdir", 1, false, NULL }, }; //----------------------------------------------------------------------------------------------------------------------- @@ -2019,7 +2020,14 @@ public: bool init() { // TODO: I'm going to move the "glspec" dir from under bin to raddebugger/glspec (or whatever) - if (!file_utils::does_file_exist("gl.spec")) + dynamic_string specdir; + + if (g_command_line_params.get_value_as_string(specdir, "specdir")) + { + file_utils::change_directory(specdir.c_str()); + console::warning("Changing current directory to %s\n", specdir.c_str()); + } + else if (!file_utils::does_file_exist("gl.spec")) { if (file_utils::does_file_exist("glspec/gl.spec")) {