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

[ENHANCEMENT] Add DEBUG_BUILD to Constants. #3853

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AbnormalPoof
Copy link
Contributor

@AbnormalPoof AbnormalPoof commented Nov 11, 2024

Currently, there's no real way to detect whether or not the game is a debug build in HScript (MacroUtil doesn't work, so does basically anything that involves getting compiler defines), you COULD do something like this:

function isDebugBuild():Bool {
  return Constants.versionSuffix == ' PROTOTYPE';
}

However, this is unreliable since V-Slice forks can change the version suffix.

This PR adds a new boolean to Constants, DEBUG_BUILD. Which is basically self-explanatory, false if it's a release build, and true if it's debug (has the FEATURE_DEBUG_FUNCTIONS compiler flag).

@github-actions github-actions bot added small A small pull request with 10 or fewer changes haxe Issue/PR modifies game code labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
haxe Issue/PR modifies game code small A small pull request with 10 or fewer changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants