jianghua.wei Posted October 2, 2014 Share Posted October 2, 2014 Dear Support, I'm trying to put all the startup command-line options in to an array and would like to use them when initialize the engine, but it doesn't work. there is a similar case like mine:https://developer.unigine.com/forum/topic/1627-solved-how-to-pass-startup-command-line-options-for-building-release/?hl=+command#entry8716 But I don't understand the anser of {{"-sound_app","openal"does the trick.}} Could you help me to achieve this? Thank you very much! The source code: #include"Unigine.h" using namespace Unigine; char *my_argv[] = { "-data_path ../", "-system_script core/unigine.cpp", "-engine_config ../data/Myproject.cfg", "-engine_log ../Myproject_log.htm", "-extern_define QUALITY_HIGH", "-extern_plugin Interface", "-extern_define EDITOR" }; int main(int argc,char **argv) { Engine *engine = Engine::init(UNIGINE_VERSION,7,my_argv,"Myproject"); engine->main(); Engine::shutdown(); return 0; } Link to comment
silent Posted October 2, 2014 Share Posted October 2, 2014 Hi, Just increase number of commad line arguments from 7 to 14 and modify my_argv[] to something like this: char *my_argv[] = { "-data_path", "../", "-system_script", "core/unigine.cpp", "-engine_config", "../data/Myproject.cfg", "-engine_log", "../Myproject_log.htm", "-extern_define", "QUALITY_HIGH", "-extern_plugin", "Interface", "-extern_define", "EDITOR", }; Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
jianghua.wei Posted October 2, 2014 Author Share Posted October 2, 2014 Hi, Just increase number of commad line arguments from 7 to 14 and modify my_argv[] to something like this: char *my_argv[] = { "-data_path", "../", "-system_script", "core/unigine.cpp", "-engine_config", "../data/Myproject.cfg", "-engine_log", "../Myproject_log.htm", "-extern_define", "QUALITY_HIGH", "-extern_plugin", "Interface", "-extern_define", "EDITOR", }; Thanks! Thank you very much, it works well,! Link to comment
jianghua.wei Posted October 3, 2014 Author Share Posted October 3, 2014 Hi, Just increase number of commad line arguments from 7 to 14 and modify my_argv[] to something like this: char *my_argv[] = { "-data_path", "../", "-system_script", "core/unigine.cpp", "-engine_config", "../data/Myproject.cfg", "-engine_log", "../Myproject_log.htm", "-extern_define", "QUALITY_HIGH", "-extern_plugin", "Interface", "-extern_define", "EDITOR", }; Thanks! Dear Sir, BTW, is it possible to hide the DOS window when start the app, by adding what code inside the upper code? I find launch_editor.bat can do it, but I can not.... best regards, Link to comment
silent Posted October 3, 2014 Share Posted October 3, 2014 Hi, There are a lot of options how to do this. Please, check this stackoverflow answer (it worked fine in my case for debug and release builds): http://stackoverflow.com/a/6882500 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts