| 2255 | } |
| 2256 | |
| 2257 | Vector<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 | |
| 2311 | bool EditorExportPlatform::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const { |
| 2312 | bool valid = true; |
nothing calls this directly
no test coverage detected