Make use of the resource bundle optional #8
Merged
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.
The goal of this PR is to allow configuration of the project for
loadImage path
(and future APIs that load resources) to load resources from the filesystem instead of the resourcebundle.h
.This is done in multiple steps.
The
makeBundle.lean
script now creates resources inbundle.h
with path prefixed withresource/
, i.e their relative paths in the repository. So now in the Window example the image is loaded usingloadImage "resources/Asset.svg"
instead ofloadImage "Asset.svg"
.A C-flag
RAYLEAN_NO_BUNDLE
is added so that raylib-binding.c can be configured to use the RaylibLoadFileData
instead of loading data from the bundle. TheloadImage "resources/Asset.svg"
will continue to work when the example executable is run from the root of the project (i.e withjust run
).A config option
bundle
is now used in the lakefile to configure if the bundle is used or not.Builds using
just
will continue to use the resource bundle by default.To disable use of the bundle in just use:
Projects that depend on the raylean library will have the bundle disabled by default. It can be enabled by setting the
bundle
configuration setting to on in the lakefile requires block:or via the CLI: