Jump to content

[SOLVED] failed to user startup command-line options for building release


photo

Recommended Posts

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

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:

Link to comment

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

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
×
×
  • Create New...