zenorogue / hyperrogue

A SDL roguelike in a non-euclidean world
GNU General Public License v2.0
569 stars 72 forks source link

Won't Launch from Custom Desktop File #298

Open SgtMooshroom opened 2 years ago

SgtMooshroom commented 2 years ago

I compiled the game and tried creating a desktop shortcut, and I enabled both launching and running as a program, but I get a black screen for three seconds followed by a crash. It can only be launched directly from its parent folder.

Ubuntu 21.10, HP 255-G5

Quuxplusone commented 2 years ago

FWIW, I'd call this "not a bug." You'll probably find that the game doesn't crash; it simply exits cleanly with messages like

000651 start_game
000652   initcells
000992   initGame
001000     addMessage: Welcome to HyperRogue!
001000     addMessage: Press F1 or right-shift-click things for help.
001001     (done)
001001   restartGraph
001001     (done)
001001   (done)
linking log (99): WARNING: Could not find vertex shader attribute 'aTexture' to match BindAttributeLocation request.

linking log (196): WARNING: Could not find vertex shader attribute 'aColor' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'aTexture' to match BindAttributeLocation request.

error: Font file not found: DejaVuSans-Bold.ttf

You can fix this yourself. When you create the shortcut, make sure that the shortcut changes the "current working directory" to the HyperRogue directory before launching the game. On Windows, apparently this is hidden in the "Properties" of the shortcut file: this SO question is relevant to your interests.

SgtMooshroom commented 2 years ago

Tried it. It still doesn't work.

zenorogue commented 2 years ago

@SgtMooshroom mentioned Ubuntu, so not a Windows problem.

But I agree that it looks like some issue with the shortcut itself. (I do not use Ubuntu myself, so hard to help here.)