1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Fix Windows to Windows SSH remote deploy. Fix Windows execute exit code.

This commit is contained in:
bruvzg
2023-02-27 09:54:49 +02:00
parent 0cd1483132
commit 94355249c3
2 changed files with 9 additions and 2 deletions

View File

@@ -879,7 +879,11 @@ Error EditorExportPlatformWindows::run(const Ref<EditorExportPreset> &p_preset,
print_line("Creating temporary directory...");
ep.step(TTR("Creating temporary directory..."), 2);
String temp_dir;
#ifndef WINDOWS_ENABLED
err = ssh_run_on_remote(host, port, extra_args_ssh, "powershell -command \\\"\\$tmp = Join-Path \\$Env:Temp \\$(New-Guid); New-Item -Type Directory -Path \\$tmp | Out-Null; Write-Output \\$tmp\\\"", &temp_dir);
#else
err = ssh_run_on_remote(host, port, extra_args_ssh, "powershell -command \"$tmp = Join-Path $Env:Temp $(New-Guid); New-Item -Type Directory -Path $tmp ^| Out-Null; Write-Output $tmp\"", &temp_dir);
#endif
if (err != OK || temp_dir.is_empty()) {
CLEANUP_AND_RETURN(err);
}
@@ -891,6 +895,10 @@ Error EditorExportPlatformWindows::run(const Ref<EditorExportPreset> &p_preset,
CLEANUP_AND_RETURN(err);
}
if (cmd_args.is_empty()) {
cmd_args = " ";
}
{
String run_script = p_preset->get("ssh_remote_deploy/run_script");
run_script = run_script.replace("{temp_dir}", temp_dir);