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

Cannot run Linux build - Potential fixes #114

Open
GeoVa19 opened this issue Feb 18, 2019 · 1 comment
Open

Cannot run Linux build - Potential fixes #114

GeoVa19 opened this issue Feb 18, 2019 · 1 comment

Comments

@GeoVa19
Copy link

GeoVa19 commented Feb 18, 2019

After applying the fixes I described in #113, there seems to be an error with the FILEPATH variable appearing in main.cpp.

The Linux build fails to boot and the console outputs an error message, an excerpt of which is shown below:
ERROR::initGraphics - could not open '/home/$USER/$DIR/rockbot//fonts/pressstart2p.ttf' font. This made me think that there's something wrong with either the FILEPATH or the GAMEPATH variables in main.cpp.

I made the following change and it seems to work:

  • in main.cpp, line 263 of the 9337229 commit, instead of
    FILEPATH += "/";,
    I changed it to
    FILEPATH += "/build/";

However, this change works only for Rockbot 1. By choosing Rockboot2 in the Select Game menu, I received the following error messages (excerpt):
DEBUG.SDLSurfaceFromFile - Error in graphicsLib::SDLSurfaceFromFile - file '/home/$USER/$DIR/rockbot/build/games/Rockbot2/images/tilesets/anim/lab_lava.png' not found and
surfaceFromFile - error loading file: '/home/$USER/$DIR/rockbot/build//games/Rockbot2/images/tilesets/anim/lab_lava.png'

The first line seems "fine".
The second line, however, includes an additional slash between build and games. I tried to fix this error by adding, in method graphicsLib::surfaceFromFile in graphicslib.cpp:
filename = StringUtils::clean_filename(filename); I don't know if this line should be in another place, but, at least for me, it seems to work.

Lastly, about the first line. It says that the file is missing, and maybe that's why Rockboot2 never boots. By running grep -rnw . -e 'lab_lava.png' where . is the root of the repository, it shows me that the only reference to this file is in ./build/games/Rockbot2/anim_block_list.dat, which is a binary file.

Is there any way to add the missing tilesets? Or, is it safe to manually remove these references from the .dat file?

@protoman
Copy link
Owner

Are you still having issues? I remember I did some changes and fixes for missing files, but I forgot to update the issue here - sorry about that.

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