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

Fix the run-suite brommy.bmp not found issue #35

Open
illuhad opened this issue Feb 21, 2020 · 2 comments
Open

Fix the run-suite brommy.bmp not found issue #35

illuhad opened this issue Feb 21, 2020 · 2 comments

Comments

@illuhad
Copy link
Collaborator

illuhad commented Feb 21, 2020

It used to work. But we don't know why. Now it doesn't and we know why. We should transform this to a state where it works and (ideally, but at a lower priority) we know why.

@biergaizi
Copy link

biergaizi commented May 18, 2023

The problem here is that the test case uses relative path to find the file, as in

load_bitmap_mirrored("../../share/Brommy.bmp", size, input);

This is entirely unreliable, since the build directory can be anywhere in the file system. It won't run without this very specific assumption of path. I suggest to fix it by always loading the file from the build directory, such as ./Brommy.bmp. Then, during build, we let CMake to copy Brommy.bmp to the specified build path. This way it can always work.

@biergaizi
Copy link

biergaizi commented May 18, 2023

Wait a minute, my previous comment would only fix the in-tree file. If make install is used, search path again becomes a problem... I imagine the full solution would be, first, define a preprocessor macro for the path through CMake... And if it's not found, then fallback to searching the executable's directory, so both running from build and running from /usr is supported...

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

No branches or pull requests

2 participants