@ -126,15 +126,19 @@ static String unescape_cmdline(const String &p_str) {
void Main : : print_help ( const char * p_binary ) {
OS : : get_singleton ( ) - > print ( VERSION_FULL_NAME " (c) 2008-2017 Juan Linietsky, Ariel Manzur. \n " ) ;
OS : : get_singleton ( ) - > print ( " Usage: %s [options] [scene] \n " , p_binary ) ;
OS : : get_singleton ( ) - > print ( VERSION_FULL_NAME " - https://godotengine.org \n " ) ;
OS : : get_singleton ( ) - > print ( " (c) 2007-2017 Juan Linietsky, Ariel Manzur. \n " ) ;
OS : : get_singleton ( ) - > print ( " (c) 2014-2017 Godot Engine contributors. \n " ) ;
OS : : get_singleton ( ) - > print ( " \n " ) ;
OS : : get_singleton ( ) - > print ( " Usage: %s [options] [path to scene or 'engine.cfg' file] \n " , p_binary ) ;
OS : : get_singleton ( ) - > print ( " \n " ) ;
OS : : get_singleton ( ) - > print ( " Options: \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -path [dir] : Path to a game, containing engine.cfg \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -h, -help : Print these usage instructions. \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -path <dir> : Path to a game, containing engine.cfg. \n " ) ;
# ifdef TOOLS_ENABLED
OS : : get_singleton ( ) - > print ( " \t -e,-editor : Bring up the editor instead of running the scene. \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -e, -editor : Bring up the editor instead of running the scene.\n " ) ;
# endif
OS : : get_singleton ( ) - > print ( " \t -test [test] : Run a test. \n " ) ;
OS : : get_singleton ( ) - > print ( " \t \t ( " ) ;
OS : : get_singleton ( ) - > print ( " \t -test <test> : Run a test ( " ) ;
const char * * test_names = tests_get_names ( ) ;
const char * coma = " " ;
while ( * test_names ) {
@ -143,49 +147,49 @@ void Main::print_help(const char *p_binary) {
test_names + + ;
coma = " , " ;
}
OS : : get_singleton ( ) - > print ( " ) \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -r WIDTHxHEIGHT\t : Request Window Resolution \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -p XxY\t : Request Window Position \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -f \t \t : Request Fullscreen \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -mx \t \t Request Maximized \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -w \t \t Request Windowed \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -vd DRIVER\t : Video D river (" ) ;
OS : : get_singleton ( ) - > print ( " ) . \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -r <width>x<height> : Request window resolution. \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -p <X>x<Y> : Request window position. \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -f : Request fullscreen. \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -mx : Request maximized. \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -w : Request windowed. \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -vd <driver> : Video d river (" ) ;
for ( int i = 0 ; i < OS : : get_singleton ( ) - > get_video_driver_count ( ) ; i + + ) {
if ( i ! = 0 )
OS : : get_singleton ( ) - > print ( " , " ) ;
OS : : get_singleton ( ) - > print ( " %s " , OS : : get_singleton ( ) - > get_video_driver_name ( i ) ) ;
}
OS : : get_singleton ( ) - > print ( " ) \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -ldpi \t : Force low-dpi mode (OSX Only) \n " ) ;
OS : : get_singleton ( ) - > print ( " ) . \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -ldpi : Force low-dpi mode (OSX only). \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -ad DRIVER\t : Audio D river (" ) ;
OS : : get_singleton ( ) - > print ( " \t -ad <driver> : Audio d river (" ) ;
for ( int i = 0 ; i < OS : : get_singleton ( ) - > get_audio_driver_count ( ) ; i + + ) {
if ( i ! = 0 )
OS : : get_singleton ( ) - > print ( " , " ) ;
OS : : get_singleton ( ) - > print ( " %s " , OS : : get_singleton ( ) - > get_audio_driver_name ( i ) ) ;
}
OS : : get_singleton ( ) - > print ( " ) \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -rthread <mode> \t : Render Thread M ode ('unsafe', 'safe', 'separate').\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -s, -script [script] : Run a script.\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -d, -debug : Debug (local stdout debugger).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -rdebug ADDRESS : Remote debug (<ip>:<port> host address).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -fdelay [msec] : Simulate high CPU load (delay each frame by [msec]).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -timescale [msec]: Simulate high CPU load (delay each frame by [msec]).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -bp : b reakpoint list as source::line comma separated pairs, no spaces (%%20,%%2C,etc instead).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -v : Verbose stdout mode \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -lang [locale]: Use a specific locale \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -rfs <host/ip>[:<port>] : Remote FileS ystem.\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -rfs_pass <password> : Password for Remote FileS ystem.\n " ) ;
OS : : get_singleton ( ) - > print ( " ) . \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -rthread <mode> : Render thread m ode ('unsafe', 'safe', 'separate').\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -s, -script <script> : Run a script.\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -d, -debug : Debug (local stdout debugger).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -rdebug <address> : Remote debug (<ip>:<port> host address).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -fdelay <msec> : Simulate high CPU load (delay each frame by [msec]).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -timescale <msec> : Define custom timescale (time between frames in [msec]).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -bp : B reakpoint list as source::line comma separated pairs, no spaces (%%20 instead).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -v : Verbose stdout mode . \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -lang <locale> : Use a specific locale. \n " ) ;
OS : : get_singleton ( ) - > print ( " \t -rfs <host/ip>[:<port>] : Remote files ystem.\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -rfs_pass <password> : Password for remote files ystem.\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -dch : Disable crash handler when supported by the platform code. \n " ) ;
# ifdef TOOLS_ENABLED
OS : : get_singleton ( ) - > print ( " \t -doctool FILE: Dump the whole engine api to FILE in XML format. If FILE exists, it will be merged.\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -nodocbase : Disallow dump the base types (used with -doctool).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -optimize FILE Save an optimized copy of scene to FILE .\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -optimize_preset [preset] Use a given preset for optimization.\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -export [target] Export the project using given export target.\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -doctool <file> : Dump the whole engine api to <file> in XML format. If <file> exists, it will be merged.\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -nodocbase : Disallow dump the base types (used with -doctool).\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -optimize <file> : Save an optimized copy of scene to <file> .\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -optimize_preset <preset> : Use a given preset for optimization.\n " ) ;
OS : : get_singleton ( ) - > print ( " \t -export <target> : Export the project using given export target.\n " ) ;
# endif
}
@ -285,7 +289,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
if ( I - > get ( ) = = " -noop " ) {
// no op
} else if ( I - > get ( ) = = " -h " | | I - > get ( ) = = " - -help" | | I - > get ( ) = = " /? " ) { // resolution
} else if ( I - > get ( ) = = " -h " | | I - > get ( ) = = " - help" | | I - > get ( ) = = " - -help" | | I - > get ( ) = = " /? " ) { // resolution
goto error ;