MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / gen_export_flags

Method gen_export_flags

editor/export/editor_export_platform.cpp:2257–2309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2255}
2256
2257Vector<String> EditorExportPlatform::gen_export_flags(BitField<EditorExportPlatform::DebugFlags> p_flags) {
2258 Vector<String> ret;
2259 String host = EDITOR_GET("network/debug/remote_host");
2260 int remote_port = (int)EDITOR_GET("network/debug/remote_port");
2261
2262 if (get_name() == "Android" && EditorSettings::get_singleton()->has_setting("export/android/use_wifi_for_remote_debug") && EDITOR_GET("export/android/use_wifi_for_remote_debug")) {
2263 host = EDITOR_GET("export/android/wifi_remote_debug_host");
2264 } else if (p_flags.has_flag(DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST)) {
2265 host = "localhost";
2266 }
2267
2268 if (p_flags.has_flag(DEBUG_FLAG_DUMB_CLIENT)) {
2269 int port = EDITOR_GET("filesystem/file_server/port");
2270 String passwd = EDITOR_GET("filesystem/file_server/password");
2271 ret.push_back("--remote-fs");
2272 ret.push_back(host + ":" + itos(port));
2273 if (!passwd.is_empty()) {
2274 ret.push_back("--remote-fs-password");
2275 ret.push_back(passwd);
2276 }
2277 }
2278
2279 if (p_flags.has_flag(DEBUG_FLAG_REMOTE_DEBUG)) {
2280 ret.push_back("--remote-debug");
2281
2282 ret.push_back(get_debug_protocol() + host + ":" + String::num_int64(remote_port));
2283
2284 List<String> breakpoints;
2285 ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
2286
2287 if (breakpoints.size()) {
2288 ret.push_back("--breakpoints");
2289 String bpoints;
2290 for (List<String>::Element *E = breakpoints.front(); E; E = E->next()) {
2291 bpoints += E->get().replace(" ", "%20");
2292 if (E->next()) {
2293 bpoints += ",";
2294 }
2295 }
2296
2297 ret.push_back(bpoints);
2298 }
2299 }
2300
2301 if (p_flags.has_flag(DEBUG_FLAG_VIEW_COLLISIONS)) {
2302 ret.push_back("--debug-collisions");
2303 }
2304
2305 if (p_flags.has_flag(DEBUG_FLAG_VIEW_NAVIGATION)) {
2306 ret.push_back("--debug-navigation");
2307 }
2308 return ret;
2309}
2310
2311bool EditorExportPlatform::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const {
2312 bool valid = true;

Callers

nothing calls this directly

Calls 12

itosFunction · 0.85
sizeMethod · 0.65
get_nameFunction · 0.50
has_settingMethod · 0.45
has_flagMethod · 0.45
push_backMethod · 0.45
is_emptyMethod · 0.45
get_breakpointsMethod · 0.45
frontMethod · 0.45
nextMethod · 0.45
replaceMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected