diff options
-rw-r--r-- | core/io/file_access_network.cpp | 4 | ||||
-rw-r--r-- | platform/android/export/export.cpp | 37 | ||||
-rw-r--r-- | scene/main/node.cpp | 9 | ||||
-rw-r--r-- | tools/editor/editor_import_export.cpp | 4 | ||||
-rw-r--r-- | tools/editor/editor_import_export.h | 5 |
5 files changed, 55 insertions, 4 deletions
diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp index 10667a4187..e63b57533f 100644 --- a/core/io/file_access_network.cpp +++ b/core/io/file_access_network.cpp @@ -34,9 +34,9 @@ -#define DEBUG_PRINT(m_p) print_line(m_p) +//#define DEBUG_PRINT(m_p) print_line(m_p) //#define DEBUG_TIME(m_what) printf("MS: %s - %lli\n",m_what,OS::get_singleton()->get_ticks_usec()); -//#define DEBUG_PRINT(m_p) +#define DEBUG_PRINT(m_p) #define DEBUG_TIME(m_what) diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index c908f6729b..40b125e391 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -1513,6 +1513,13 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) { //export_temp ep.step("Exporting APK",0); + + bool use_adb_over_usb = bool(EDITOR_DEF("android/use_remote_debug_over_adb",true)); + + if (use_adb_over_usb) { + p_flags|=EXPORT_REMOTE_DEBUG_LOCALHOST; + } + String export_to=EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmpexport.apk"; Error err = export_project(export_to,true,p_flags); if (err) { @@ -1559,6 +1566,35 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) { return ERR_CANT_CREATE; } + if (use_adb_over_usb) { + + args.clear(); + args.push_back("reverse"); + args.push_back("--remove-all"); + err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv); + + int port = Globals::get_singleton()->get("debug/debug_port"); + args.clear(); + args.push_back("reverse"); + args.push_back("tcp:"+itos(port)); + args.push_back("tcp:"+itos(port)); + + err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv); + print_line("Reverse result: "+itos(rv)); + + int fs_port = EditorSettings::get_singleton()->get("file_server/port"); + + args.clear(); + args.push_back("reverse"); + args.push_back("tcp:"+itos(fs_port)); + args.push_back("tcp:"+itos(fs_port)); + + err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv); + print_line("Reverse result2: "+itos(rv)); + + } + + ep.step("Running on Device..",3); args.clear(); args.push_back("-s"); @@ -1724,6 +1760,7 @@ void register_android_exporter() { //EDITOR_DEF("android/release_username",""); //EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/release_keystore",PROPERTY_HINT_GLOBAL_FILE,"*.keystore")); EDITOR_DEF("android/timestamping_authority_url",""); + EDITOR_DEF("android/use_remote_debug_over_adb",false); Ref<EditorExportPlatformAndroid> exporter = Ref<EditorExportPlatformAndroid>( memnew(EditorExportPlatformAndroid) ); EditorImportExport::get_singleton()->add_export_platform(exporter); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 0780a4bdaf..191e3ec04c 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1510,6 +1510,15 @@ Node *Node::duplicate(bool p_use_instancing) const { node->set_name(get_name()); + List<GroupInfo> gi; + get_groups(&gi); + for (List<GroupInfo>::Element *E=gi.front();E;E=E->next()) { + + node->add_to_group(E->get().name, E->get().persistent); + } + + _duplicate_signals(this, node); + for(int i=0;i<get_child_count();i++) { if (get_child(i)->data.parent_owned) diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index 5203ace125..77331256f3 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -1000,6 +1000,9 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags String host = EditorSettings::get_singleton()->get("network/debug_host"); + if (p_flags&EXPORT_REMOTE_DEBUG_LOCALHOST) + host="localhost"; + if (p_flags&EXPORT_DUMB_CLIENT) { int port = EditorSettings::get_singleton()->get("file_server/port"); String passwd = EditorSettings::get_singleton()->get("file_server/password"); @@ -1014,6 +1017,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags if (p_flags&EXPORT_REMOTE_DEBUG) { r_flags.push_back("-rdebug"); + r_flags.push_back(host+":"+String::num(GLOBAL_DEF("debug/debug_port", 6007))); List<String> breakpoints; diff --git a/tools/editor/editor_import_export.h b/tools/editor/editor_import_export.h index 1a0686fb50..272464d9b0 100644 --- a/tools/editor/editor_import_export.h +++ b/tools/editor/editor_import_export.h @@ -136,8 +136,9 @@ public: enum ExportFlags { EXPORT_DUMB_CLIENT=1, EXPORT_REMOTE_DEBUG=2, - EXPORT_VIEW_COLLISONS=4, - EXPORT_VIEW_NAVIGATION=8 + EXPORT_REMOTE_DEBUG_LOCALHOST=4, + EXPORT_VIEW_COLLISONS=8, + EXPORT_VIEW_NAVIGATION=16, }; |