Day 48/100 100 Days of Code

Day 48/100 100 Days of Code

Rebuild Back Better

It works!

I added cpplocate as a submodule to the project and now the program can find the assets in the .app bundle file. Getting the path to the bundle with the library is quite easy:

std::string Game::execpath = cpplocate::getBundlePath();

Then, I concatenated the path from the bundle to the font:

 execpath + std::string("/Contents/Resources/fonts/ArianaVioleta-dz2K.ttf")

Running the .app bundle now executes the application and loads the fonts gracefully.