diff options
Diffstat (limited to 'editor/editor_export.cpp')
-rw-r--r-- | editor/editor_export.cpp | 91 |
1 files changed, 79 insertions, 12 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index e2a7011ccb..e20744e424 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -75,11 +75,14 @@ bool EditorExportPreset::_get(const StringName &p_name, Variant &r_ret) const { return false; } + void EditorExportPreset::_get_property_list(List<PropertyInfo> *p_list) const { for (const List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) { - p_list->push_back(E->get()); + if (platform->get_option_visibility(E->get().name, values)) { + p_list->push_back(E->get()); + } } } @@ -601,6 +604,58 @@ Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, co return OK; } +void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) { + + String host = EditorSettings::get_singleton()->get("network/debug_host"); + + if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST) + host = "localhost"; + + if (p_flags & DEBUG_FLAG_DUMB_CLIENT) { + int port = EditorSettings::get_singleton()->get("filesystem/file_server/port"); + String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password"); + r_flags.push_back("-rfs"); + r_flags.push_back(host + ":" + itos(port)); + if (passwd != "") { + r_flags.push_back("-rfs_pass"); + r_flags.push_back(passwd); + } + } + + if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) { + + r_flags.push_back("-rdebug"); + + r_flags.push_back(host + ":" + String::num(GLOBAL_DEF("network/debug/remote_port", 6007))); + + List<String> breakpoints; + ScriptEditor::get_singleton()->get_breakpoints(&breakpoints); + + if (breakpoints.size()) { + + r_flags.push_back("-bp"); + String bpoints; + for (const List<String>::Element *E = breakpoints.front(); E; E = E->next()) { + + bpoints += E->get().replace(" ", "%20"); + if (E->next()) + bpoints += ","; + } + + r_flags.push_back(bpoints); + } + } + + if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) { + + r_flags.push_back("-debugcol"); + } + + if (p_flags & DEBUG_FLAG_VIEW_NAVIGATION) { + + r_flags.push_back("-debugnav"); + } +} EditorExportPlatform::EditorExportPlatform() { } @@ -804,6 +859,18 @@ void EditorExport::load_config() { block_save = false; } +bool EditorExport::poll_export_platforms() { + + bool changed = false; + for (int i = 0; i < export_platforms.size(); i++) { + if (export_platforms[i]->poll_devices()) { + changed = true; + } + } + + return changed; +} + EditorExport::EditorExport() { save_timer = memnew(Timer); @@ -1666,7 +1733,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func } break; //use default } - String image_listD_METHOD5; + String image_list_md5; { MD5_CTX ctx; @@ -1679,7 +1746,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func } MD5Final(&ctx); - image_listD_METHOD5=String::md5(ctx.digest); + image_list_md5=String::md5(ctx.digest); } //ok see if cached String md5; @@ -1724,7 +1791,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func if (atlas_valid) { //check md5 of list of image /names/ - if (f->get_line().strip_edges()!=image_listD_METHOD5) { + if (f->get_line().strip_edges()!=image_list_md5) { atlas_valid=false; print_line("IMAGE MD5 INVALID!"); } @@ -1743,17 +1810,17 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func if (slices.size()!=10) { atlas_valid=false; - print_line("CANT SLICE IN 10"); + print_line("CAN'T SLICE IN 10"); break; } uint64_t mod_time = slices[0].to_int64(); uint64_t file_mod_time = FileAccess::get_modified_time(F->get()); if (mod_time!=file_mod_time) { - String imageD_METHOD5 = slices[1]; - String fileD_METHOD5 = FileAccess::getD_METHOD5(F->get()); + String image_md5 = slices[1]; + String file_md5 = FileAccess::get_md5(F->get()); - if (imageD_METHOD5!=fileD_METHOD5) { + if (image_md5!=file_md5) { atlas_valid=false; print_line("IMAGE INVALID "+slices[0]); break; @@ -1788,7 +1855,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func for (List<StringName>::Element *F=atlas_images.front();F;F=F->next()) { - imd->add_source(EditorImportPlugin::validate_source_path(F->get()),FileAccess::getD_METHOD5(F->get())); + imd->add_source(EditorImportPlugin::validate_source_path(F->get()),FileAccess::get_md5(F->get())); } @@ -1846,7 +1913,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func options["shrink"]=EditorImportExport::get_singleton()->image_export_group_get_shrink(E->get()); options["image_format"]=group_format; //f->store_line(options.to_json()); - f->store_line(image_listD_METHOD5); + f->store_line(image_list_md5); } //go through all ATEX files @@ -1882,8 +1949,8 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func if (f) { //recreating deps.. String depline; - //depline=String(F->get())+"::"+itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::getD_METHOD5(F->get()); name unneccesary by top md5 - depline=itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::getD_METHOD5(F->get()); + //depline=String(F->get())+"::"+itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::get_md5(F->get()); name unnecessary by top md5 + depline=itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::get_md5(F->get()); depline+="::"+itos(region.pos.x)+"::"+itos(region.pos.y)+"::"+itos(region.size.x)+"::"+itos(region.size.y); depline+="::"+itos(margin.pos.x)+"::"+itos(margin.pos.y)+"::"+itos(margin.size.x)+"::"+itos(margin.size.y); f->store_line(depline); |