Closed 26F closed 1 year ago
The assets folder is in the root of the repository. The SDL frontend expects to find this folder in the same path where you run it: https://github.com/Dhole/CopperBoy/blob/ab9d3202d9c9ed360b9f5d9c24454f66d845bc56/sdl/src/main.rs#L166 So if you're running it from the root of the repository like this:
./target/x86_64-unknown-linux-gnu/release/sdl ROM_PATH
Or like this:
cargo build --release --target x86_64-unknown-linux-gnu --bin sdl -- ROM_PATH
It should pick the font. If you'd like to run the binary from a different path, you can copy the assets
folder to this new path.
Let me know if you manage to get it working!
In case you're not running a Unix-like OS, let me know as well, I have only tested this on Linux.
I've got it working using: ./target/x86_64-unknown-linux-gnu/release/sdl ROM_PATH and by realising that the roms folder is in the CopperBoy directory. I presumed it was relative to the executable. I should have spent more time before raising the issue.
It's not a software issue so I will close it.
I have attempted to run a rom after building and am met with this errror: SDL2("Couldn't open ./assets/DejaVuSansMono.ttf"). I'm not sure if this is a problem with my installation of SDL or if there is an assets folder which is missing from the release folder when attempting to run the rom.
It would be good to have a fix for this because it was not included in the build instructions.