Comment out code that is causing project loading to fail on osx #11482
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Commented out some code that I introduced that I think is the source of trouble for #11450
I haven't removed it at this point because I think we should discuss this further, so tagging @Calinou , @akien-mga and @reduz :)
Right now the OSX build makes the resource folder in the app bundle the current working folder so that if there is a datapack file in that folder, it will get loaded. That all works fine now.
I originally got thrown off by the get_resource_dir method as it made sense to have this return the resources path and it would open up the datapack from there. I only found out later there was a comment in the project loading code that this had become defunct and indeed, it only attempts to load a project.godot file from this location if specified. I left the code so we could have a discussion whether we want to change how this works.
What I didn't realise is that returning this value would cause the rest of the loading code to be skipped regardless of whether a project file was found. The result of this is that a tools build put inside of an app bundle won't load any projects!! (hence 11450)
Only when run directly things work as they should.
For now I've commented out the code so our tools build works again. Hope to catch you guys on IRC so we can decide whether to remove this all together or whether we do want to implement get_resource_dir the way I suggest and either make an exception for the tools build or remove the code that stops further loading if a project file can't be loaded from this location.