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

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

AbnormalPoof
Copy link
Collaborator

@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 size: small A small pull request with 10 or fewer changes. pr: haxe PR modifies game code. labels Nov 11, 2024
@EliteMasterEric EliteMasterEric added status: pending triage Awaiting review. type: enhancement Involves an enhancement or new feature. status: accepted PR was approved for contribution. If it's not already merged, it may be merged on a private branch. and removed status: pending triage Awaiting review. labels Jan 17, 2025
@EliteMasterEric EliteMasterEric changed the base branch from main to develop January 17, 2025 01:06
@AbnormalPoof
Copy link
Collaborator Author

Merge conflicts should be fixed up!

@EliteMasterEric EliteMasterEric merged commit ad45b72 into FunkinCrew:develop Jan 17, 2025
2 checks passed
@AbnormalPoof AbnormalPoof deleted the patch-5 branch January 17, 2025 20:46
@EliteMasterEric EliteMasterEric added this to the 0.6.0 milestone Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: haxe PR modifies game code. size: small A small pull request with 10 or fewer changes. status: accepted PR was approved for contribution. If it's not already merged, it may be merged on a private branch. type: enhancement Involves an enhancement or new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants