greggman / HappyFunTimes

A System for creating 10-100+ player local games
http://greggman.github.io/HappyFunTimes
BSD 3-Clause "New" or "Revised" License
381 stars 55 forks source link

HFT doesn't run on Linux #9

Closed ChrisJan00 closed 9 years ago

ChrisJan00 commented 9 years ago

I followed the instructions from http://docs.happyfuntimes.net/docs/linux.html

All seemed to work until I run the last step:

    $  hft start --app-mode
    ERROR: happyFunTimes does not appear to be installed.

Apparently it's looking for a config file in

    $HOME/.happyfuntimes/config.json

but this directory does not exist, nor the file. Thus getHftInstallDir() in hft-config.js is throwing an exception and returning "undefined".

Probably the problem would be solved with one more step in the instructions for creating the missing directory + config file.

ChrisJan00 commented 9 years ago

Yes, I could fix the error in my machine by manually creating said directory and file, with the contents:

{
     "installDir": "/DIRECTORY/WHERE/HFT/WAS/CLONED"
}

(of course, with the proper path in there)

greggman commented 9 years ago

I think hft init might also have fixed it?

greggman commented 9 years ago

No, doh! I'll look into it

ChrisJan00 commented 9 years ago

oh! well, then this line is missing in the instructions :)

btw: I had trouble installing games, and after some testing I found that the cause was that I was missing yet another property in my manual config.json: "gamesDir" (where to install the games, basically). Now it works alright.

The error message from hft was that "could not parse package.json", which was a bit misleading since the problem was not in the downloaded game but in my config file.

greggman commented 9 years ago

Okay, updated the instructions. it was missing

 cd <path/to/cloned/dir>
 ./cli/hft.js init

which writes the config files. There's more than one file. you might want to try it see if it fixes your game download issues

ChrisJan00 commented 9 years ago

That worked alright. Thank you!