BlindMindStudios / StarRuler2-Source

4X Space Strategy game Star Ruler 2's open source distribution.
http://starruler2.com
Other
1.45k stars 244 forks source link

System-wide installation on GNU/Linux? #43

Open l29ah opened 5 years ago

l29ah commented 5 years ago

Okay, i've built the game, but the source doesn't mention where should i put all the resources to be reachable by the game binary. Is there a better way than creating an /opt directory and a wrapper script in PATH?3

Lucas7211 commented 5 years ago

The game expects to discover all its resources in folders relative to the working directory that it is run with. If you're trying to split it into a binary in /usr/bin and assets in /usr/share/ you would have to make some modifications to a number places in the code where assets are discovered.

As is, the StarRuler2.sh launch script automatically sets the working directory to the path that it is in itself, so you should be able to create a symlink to that in /usr/bin, rather than writing your own wrapper. You'll still have to put everything in the same place, though, which /opt sounds like the most logical choice for.