Detect freeglut availability in play command, and help section for Nixos user regarding freeglut
hellwolf opened this issue · 1 comments
hellwolf commented
Would it be a good idea to add this advisory warning to the play
command?
function detectAndWarnAboutGlut() {
(LIBRARY_PATH=$LD_LIBRARY_PATH gcc -lglut --shared -o /dev/null &>/dev/null) || echo 'You should install freeglut in order to play some games'
}
Additionally, for NixOS user, this command may be useful, and can be added to README:
$ nix-shell -p freeglut # or install freeglut
$ export LD_LIBRARY_PATH=`nix eval --impure --raw --expr 'let pkgs = import <nixpkgs>{}; in pkgs.freeglut'`/lib;
simonmichael commented
PR welcome - you could also name the games affected and/or just point to a install/troubleshooting section in the README, I expect it will grow.