Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web/Android/iOS: Build: Don't force using template_debug #89597

Conversation

dustdfg
Copy link
Contributor

@dustdfg dustdfg commented Mar 17, 2024

Before it SCons ignored target specified in custom.py file and always used template_debug. The command line parameters wasn't affected so it was possible to manually specify target

I didn't test android and ios but it works for web

Before it SCons ignored target specified in `custom.py` file and always
used `template_debug`. The command line parameters **wasn't** affected
so it was possible to manually specify target

Signed-off-by: Yevhen Babiichuk (DustDFG) <[email protected]>
@AThousandShips
Copy link
Member

AThousandShips commented Mar 17, 2024

I'm not sure about this change, this sounds like the loading of custom needs to be fixed instead, the iOS target should default to template or it'll confuse people as there's no editor for that, I'll break anyone who uses the default as it stands right now

Can you try moving this code further down after the options loaded from the detect.py code?

godot/SConstruct

Lines 159 to 166 in fe01776

customs = ["custom.py"]
profile = ARGUMENTS.get("profile", "")
if profile:
if os.path.isfile(profile):
customs.append(profile)
elif os.path.isfile(profile + ".py"):
customs.append(profile + ".py")

This section also needs to be updated if we make this change

@dustdfg
Copy link
Contributor Author

dustdfg commented Mar 17, 2024

Can you try moving this code further down after the options loaded from the detect.py code?

  1. It looks like it isn't possible because many lines after use args defined there (but I don't know I just guess)
  2. I don't understand how it works. I understand what it does but I don't understand how it loads from custom.py file...

OK. I found a place where override is done for command line args:

godot/SConstruct

Lines 538 to 544 in fe01776

# Platform specific flags.
# These can sometimes override default options.
flag_list = platform_flags[selected_platform]
for f in flag_list:
if not (f[0] in ARGUMENTS) or ARGUMENTS[f[0]] == "auto": # Allow command line to override platform flags
env[f[0]] = f[1]

@dustdfg
Copy link
Contributor Author

dustdfg commented Mar 17, 2024

I'm not sure about this change, this sounds like the loading of custom needs to be fixed instead

I agree but I can't do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants