summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-19 17:48:10 -0300
committerGitHub <noreply@github.com>2017-08-19 17:48:10 -0300
commit56d9f9df67200b4b5c8ca56b339c75bf94f90007 (patch)
tree86b1a935105abb50ff87aaf5c17f422a745c248c /platform
parent588ffbc08aaf7d1fa30163f46702d56e032de04a (diff)
parentb9dcebb37cf15f7f0c062740ad4a755d32f88ed5 (diff)
Merge pull request #10464 from godotengine/revert-10445-args-doubledash
Revert "Second take at making command-line arguments more UNIX-like + main.cpp and help cleanup"
Diffstat (limited to 'platform')
-rw-r--r--platform/android/export/export.cpp28
-rw-r--r--platform/android/godot_android.cpp1
-rw-r--r--platform/android/java/src/org/godotengine/godot/Godot.java12
-rw-r--r--platform/android/java_glue.cpp4
-rw-r--r--platform/iphone/view_controller.mm2
-rw-r--r--platform/uwp/app.cpp2
-rw-r--r--platform/uwp/export/export.cpp2
7 files changed, 26 insertions, 25 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index ee93c29577..3c52834d92 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -1220,10 +1220,10 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
/*String host = EditorSettings::get_singleton()->get("filesystem/file_server/host");
int port = EditorSettings::get_singleton()->get("filesystem/file_server/post");
String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
- cl.push_back("--remote-fs");
+ cl.push_back("-rfs");
cl.push_back(host+":"+itos(port));
if (passwd!="") {
- cl.push_back("--remote-fs-password");
+ cl.push_back("-rfs_pass");
cl.push_back(passwd);
}*/
@@ -1243,10 +1243,10 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
err = save_pack(pf);
memdelete(pf);
- cl.push_back("--use_apk_expansion");
- cl.push_back("--apk_expansion_md5");
+ cl.push_back("-use_apk_expansion");
+ cl.push_back("-apk_expansion_md5");
cl.push_back(FileAccess::get_md5(fullpath));
- cl.push_back("--apk_expansion_key");
+ cl.push_back("-apk_expansion_key");
cl.push_back(apk_expansion_pkey.strip_edges());
} else {
@@ -1262,10 +1262,10 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
}
if (use_32_fb)
- cl.push_back("--use_depth_32");
+ cl.push_back("-use_depth_32");
if (immersive)
- cl.push_back("--use_immersive");
+ cl.push_back("-use_immersive");
if (cl.size()) {
//add comandline
@@ -3330,10 +3330,10 @@ public:
/*String host = EditorSettings::get_singleton()->get("filesystem/file_server/host");
int port = EditorSettings::get_singleton()->get("filesystem/file_server/post");
String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
- cl.push_back("--remote-fs");
+ cl.push_back("-rfs");
cl.push_back(host+":"+itos(port));
if (passwd!="") {
- cl.push_back("--remote-fs-password");
+ cl.push_back("-rfs_pass");
cl.push_back(passwd);
}*/
@@ -3350,10 +3350,10 @@ public:
return OK;
}
- cl.push_back("--use_apk_expansion");
- cl.push_back("--apk_expansion_md5");
+ cl.push_back("-use_apk_expansion");
+ cl.push_back("-apk_expansion_md5");
cl.push_back(FileAccess::get_md5(fullpath));
- cl.push_back("--apk_expansion_key");
+ cl.push_back("-apk_expansion_key");
cl.push_back(apk_expansion_pkey.strip_edges());
} else {
@@ -3367,10 +3367,10 @@ public:
}
if (use_32_fb)
- cl.push_back("--use_depth_32");
+ cl.push_back("-use_depth_32");
if (immersive)
- cl.push_back("--use_immersive");
+ cl.push_back("-use_immersive");
if (cl.size()) {
//add comandline
diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp
index 5933b83d06..6fbd42d7b3 100644
--- a/platform/android/godot_android.cpp
+++ b/platform/android/godot_android.cpp
@@ -616,6 +616,7 @@ static void engine_handle_cmd(struct android_app *app, int32_t cmd) {
//do initialization here, when there's OpenGL! hackish but the only way
engine->os = new OS_Android(_gfx_init, engine);
+ //char *args[]={"-test","gui",NULL};
__android_log_print(ANDROID_LOG_INFO, "godot", "pre asdasd setup...");
#if 0
Error err = Main::setup("apk",2,args);
diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java
index d444d37c2f..d620b2b9c4 100644
--- a/platform/android/java/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/src/org/godotengine/godot/Godot.java
@@ -387,7 +387,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
new_cmdline = new String[ 2 ];
}
- new_cmdline[cll]="--main_pack";
+ new_cmdline[cll]="-main_pack";
new_cmdline[cll+1]=expansion_pack_path;
command_line=new_cmdline;
}
@@ -452,9 +452,9 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
for(int i=0;i<command_line.length;i++) {
boolean has_extra = i< command_line.length -1;
- if (command_line[i].equals("--use_depth_32")) {
+ if (command_line[i].equals("-use_depth_32")) {
use_32_bits=true;
- } else if (command_line[i].equals("--use_immersive")) {
+ } else if (command_line[i].equals("-use_immersive")) {
use_immersive=true;
if(Build.VERSION.SDK_INT >= 19.0){ // check if the application runs on an android 4.4+
window.getDecorView().setSystemUiVisibility(
@@ -467,12 +467,12 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
UiChangeListener();
}
- } else if (command_line[i].equals("--use_apk_expansion")) {
+ } else if (command_line[i].equals("-use_apk_expansion")) {
use_apk_expansion=true;
- } else if (has_extra && command_line[i].equals("--apk_expansion_md5")) {
+ } else if (has_extra && command_line[i].equals("-apk_expansion_md5")) {
main_pack_md5=command_line[i+1];
i++;
- } else if (has_extra && command_line[i].equals("--apk_expansion_key")) {
+ } else if (has_extra && command_line[i].equals("-apk_expansion_key")) {
main_pack_key=command_line[i+1];
SharedPreferences prefs = getSharedPreferences("app_data_keys", MODE_PRIVATE);
Editor editor = prefs.edit();
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index eb139fb471..683e1cfb22 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -844,7 +844,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
} else {
//__android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is: %s\n",i,rawString);
- if (strcmp(rawString, "--main_pack") == 0)
+ if (strcmp(rawString, "-main_pack") == 0)
use_apk_expansion = true;
}
@@ -867,7 +867,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
__android_log_print(ANDROID_LOG_INFO, "godot", "**SETUP");
#if 0
- char *args[]={"--test","render",NULL};
+ char *args[]={"-test","render",NULL};
__android_log_print(ANDROID_LOG_INFO,"godot","pre asdasd setup...");
Error err = Main::setup("apk",2,args,false);
#else
diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm
index 921ef8f607..574598e1d3 100644
--- a/platform/iphone/view_controller.mm
+++ b/platform/iphone/view_controller.mm
@@ -42,7 +42,7 @@ int add_path(int p_argc, char **p_args) {
if (!str)
return p_argc;
- p_args[p_argc++] = "--path";
+ p_args[p_argc++] = "-path";
[str retain]; // memory leak lol (maybe make it static here and delete it in ViewController destructor? @todo
p_args[p_argc++] = (char *)[str cString];
p_args[p_argc] = NULL;
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index 8824d1c1d0..c773c0b746 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -512,7 +512,7 @@ void App::UpdateWindowSize(Size size) {
char **App::get_command_line(unsigned int *out_argc) {
- static char *fail_cl[] = { "--path", "game", NULL };
+ static char *fail_cl[] = { "-path", "game", NULL };
*out_argc = 2;
FILE *f = _wfopen(L"__cl__.cl", L"rb");
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index 68307c4e90..39717196aa 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -1330,7 +1330,7 @@ public:
}
if (!(p_flags & DEBUG_FLAG_DUMB_CLIENT)) {
- cl.push_back("--path");
+ cl.push_back("-path");
cl.push_back("game");
}