| 1 |
Fromscip-debian debian godot 4.6.3+ds-2 godot/patches/`Allow-setting-explicit-output-path.patch`#From.: Travis Wrightsman <[email protected]scip-debian . . . identity/`[email protected]`.> |
| 2 |
Datescip-debian debian godot 4.6.3+ds-2 godot/patches/`Allow-setting-explicit-output-path.patch`#Date.: Thu, 23 Oct 2025 16:08:37 +0200 |
| 3 |
Subjectscip-debian debian godot 4.6.3+ds-2 godot/patches/`Allow-setting-explicit-output-path.patch`#Subject.: Allow setting explicit output path |
| 4 |
|
| 5 |
Forwarded: https://github.com/godotengine/godot/pull/101403 |
| 6 |
--- |
| 7 |
SConstruct | 1 + |
| 8 |
platform/linuxbsd/SCsub | 7 ++++--- |
| 9 |
platform/macos/SCsub | 7 ++++--- |
| 10 |
platform/web/SCsub | 2 +- |
| 11 |
platform/windows/SCsub | 7 ++++--- |
| 12 |
5 files changed, 14 insertions(+), 10 deletions(-) |
| 13 |
|
| 14 |
diff --git a/SConstructscip-debian debian godot 4.6.3+ds-2 godot/upstream/SConstruct: b/SConstructscip-debian debian godot 4.6.3+ds-2 godot/upstream/SConstruct: |
| 15 |
index 58c895b..5c272bc 100644 |
| 16 |
--- a/SConstruct |
| 17 |
+++ b/SConstruct |
| 18 |
@@ -247,6 +247,7 @@ opts.Add( |
| 19 |
EnumVariable("warnings", "Level of compilation warnings", "all", ["extra", "all", "moderate", "no"], ignorecase=2) |
| 20 |
) |
| 21 |
opts.Add(BoolVariable("werror", "Treat compiler warnings as errors", False)) |
| 22 |
+opts.Add("output_path", "Explicit path to output Godot binary relative to source root", "") |
| 23 |
opts.Add("extra_suffix", "Custom extra suffix added to the base filename of all generated binary files", "") |
| 24 |
opts.Add("object_prefix", "Custom prefix added to the base filename of all generated object files", "") |
| 25 |
opts.Add(BoolVariable("vsproj", "Generate a Visual Studio solution", False)) |
| 26 |
diff --git a/platform/linuxbsd/SCsubscip-debian debian godot 4.6.3+ds-2 godot/upstream/`platform/linuxbsd/SCsub`: b/platform/linuxbsd/SCsubscip-debian debian godot 4.6.3+ds-2 godot/upstream/`platform/linuxbsd/SCsub`: |
| 27 |
index 87586c5..e352740 100644 |
| 28 |
--- a/platform/linuxbsd/SCsub |
| 29 |
+++ b/platform/linuxbsd/SCsub |
| 30 |
@@ -40,12 +40,13 @@ if env["dbus"]: |
| 31 |
if env["use_sowrap"]: |
| 32 |
common_linuxbsd.append("dbus-so_wrap.c") |
| 33 |
|
| 34 |
+godot_bin_path = f"#{env['output_path']}" if env["output_path"] else "#bin/godot" |
| 35 |
if env["library_type"] == "static_library": |
| 36 |
|
| 37 |
+ prog = env.add_library(godot_bin_path, common_linuxbsd) |
| 38 |
elif env["library_type"] == "shared_library": |
| 39 |
|
| 40 |
+ prog = env.add_shared_library(godot_bin_path, common_linuxbsd) |
| 41 |
else: |
| 42 |
|
| 43 |
+ prog = env.add_program(godot_bin_path, common_linuxbsd) |
| 44 |
|
| 45 |
if env["debug_symbols"] and env["separate_debug_symbols"]: |
| 46 |
env.AddPostAction(prog, env.Run(platform_linuxbsd_builders.make_debug_linuxbsd)) |
| 47 |
diff --git a/platform/macos/SCsubscip-debian debian godot 4.6.3+ds-2 godot/upstream/`platform/macos/SCsub`: b/platform/macos/SCsubscip-debian debian godot 4.6.3+ds-2 godot/upstream/`platform/macos/SCsub`: |
| 48 |
index 883bd53..a80b898 100644 |
| 49 |
--- a/platform/macos/SCsub |
| 50 |
+++ b/platform/macos/SCsub |
| 51 |
@@ -44,12 +44,13 @@ if env["library_type"] == "executable": |
| 52 |
else: |
| 53 |
files += ["libgodot_macos.mm"] |
| 54 |
|
| 55 |
+godot_bin_path = f"#{env['output_path']}" if env["output_path"] else "#bin/godot" |
| 56 |
if env["library_type"] == "static_library": |
| 57 |
|
| 58 |
+ prog = env.add_library(godot_bin_path, files) |
| 59 |
elif env["library_type"] == "shared_library": |
| 60 |
|
| 61 |
+ prog = env.add_shared_library(godot_bin_path, files) |
| 62 |
else: |
| 63 |
|
| 64 |
+ prog = env.add_program(godot_bin_path, files) |
| 65 |
|
| 66 |
if env["debug_symbols"] and env["separate_debug_symbols"]: |
| 67 |
env.AddPostAction(prog, env.Run(platform_macos_builders.make_debug_macos)) |
| 68 |
diff --git a/platform/web/SCsubscip-debian debian godot 4.6.3+ds-2 godot/upstream/`platform/web/SCsub`: b/platform/web/SCsubscip-debian debian godot 4.6.3+ds-2 godot/upstream/`platform/web/SCsub`: |
| 69 |
index ea974ac..4881d22 100644 |
| 70 |
--- a/platform/web/SCsub |
| 71 |
+++ b/platform/web/SCsub |
| 72 |
@@ -101,7 +101,7 @@ if env["dlink_enabled"]: |
| 73 |
sys = sys_env.add_program(build_targets, ["web_runtime.cpp"]) |
| 74 |
|
| 75 |
# The side library, containing all Godot code. |
| 76 |
|
| 77 |
+ wasm = env.add_program(f"#{env['output_path']}" if env["output_path"] else "#bin/godot.side${PROGSUFFIX}.wasm", web_files) |
| 78 |
build = sys + [wasm[0]] |
| 79 |
else: |
| 80 |
# We use IDBFS. Since Emscripten 1.39.1 it needs to be linked explicitly. |
| 81 |
diff --git a/platform/windows/SCsubscip-debian debian godot 4.6.3+ds-2 godot/upstream/`platform/windows/SCsub`: b/platform/windows/SCsubscip-debian debian godot 4.6.3+ds-2 godot/upstream/`platform/windows/SCsub`: |
| 82 |
index aefb048..fb34e5f 100644 |
| 83 |
--- a/platform/windows/SCsub |
| 84 |
+++ b/platform/windows/SCsub |
| 85 |
@@ -84,12 +84,13 @@ sources += res_obj |
| 86 |
if env["accesskit"] and not env.msvc: |
| 87 |
sources += env.DEFLIB("uiautomationcore") |
| 88 |
|
| 89 |
+godot_bin_path = f"#{env['output_path']}" if env["output_path"] else "#bin/godot" |
| 90 |
if env["library_type"] == "static_library": |
| 91 |
|
| 92 |
+ prog = env.add_library(godot_bin_path, sources, PROGSUFFIX=env["PROGSUFFIX"]) |
| 93 |
elif env["library_type"] == "shared_library": |
| 94 |
|
| 95 |
+ prog = env.add_shared_library(godot_bin_path, sources, PROGSUFFIX=env["PROGSUFFIX"]) |
| 96 |
else: |
| 97 |
|
| 98 |
+ prog = env.add_program(godot_bin_path, sources, PROGSUFFIX=env["PROGSUFFIX"]) |
| 99 |
arrange_program_clean(prog) |
| 100 |
|
| 101 |
env.Depends(prog, "godot.manifest") |