浏览代码

Merge pull request #104415 from zlago/patch-1

Export: Change unportable `echo` in the Linux/macOS debug launcher script
Thaddeus Crews 5 月之前
父节点
当前提交
d35e22ff22
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      platform/linuxbsd/export/export_plugin.cpp
  2. 1 1
      platform/macos/export/export_plugin.cpp

+ 1 - 1
platform/linuxbsd/export/export_plugin.cpp

@@ -50,7 +50,7 @@ Error EditorExportPlatformLinuxBSD::_export_debug_script(const Ref<EditorExportP
 	}
 
 	f->store_line("#!/bin/sh");
-	f->store_line("echo -ne '\\033c\\033]0;" + p_app_name + "\\a'");
+	f->store_line("printf '\\033c\\033]0;%s\\a' " + p_app_name);
 	f->store_line("base_path=\"$(dirname \"$(realpath \"$0\")\")\"");
 	f->store_line("\"$base_path/" + p_pkg_name + "\" \"$@\"");
 

+ 1 - 1
platform/macos/export/export_plugin.cpp

@@ -1500,7 +1500,7 @@ Error EditorExportPlatformMacOS::_export_debug_script(const Ref<EditorExportPres
 	}
 
 	f->store_line("#!/bin/sh");
-	f->store_line("echo -ne '\\033c\\033]0;" + p_app_name + "\\a'");
+	f->store_line("printf '\\033c\\033]0;%s\\a' " + p_app_name);
 	f->store_line("");
 	f->store_line("function app_realpath() {");
 	f->store_line("    SOURCE=$1");