JonasJurczok / faketorio

Run automatic tests for your mod inside Factorio
MIT License
19 stars 4 forks source link

Macos/Steam issues #49

Open hoylemd opened 6 years ago

hoylemd commented 6 years ago

While working on factorio-todo-list on a mac which has factorio installed via steam, I discovered that faketorio doesn't quite work out of the box.

First Issue - confirm launch with steam

The first issue is that Steam asks the user to confirm (by clicking a button!!!) the launch with cli args every time. I don't think this is something faketorio can avoid, so feel free to disregard :)

Second Issue - spaces in paths break things

Faketorio doesn't seem to handle spaces in path names very well. This is relevant because the path to the factorio executable on mac+steam is /Users/<user_name>/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio Faketorio can't seem to follow that path. Similar issue exists with pointing to the mods directory. workaround: I made a symlink in my home directory that points to the 'app data' directory that contains mods and saves (/Users/<user_name>/Library/Application Support/factorio/), and put a symlink in there that links to the executable directly, so it's all in one place and there're no pesky spaces in the path. Then I updated my .faketorio file to point to the symlinks. This allowed faketorio to launch the game with the new mod build, but added a third issue:

Third Issue - won't create the blank savegame

Faketorio doesnt actually create the 'testing sandbox' savegame in this environment, so upon launching it shows the 'can't find specified save' error. I suspect this also has to do with the complicated filestructure. workaround: The error isn't fatal, so I just load up an existing game or make a new one and run /faketorio ¯\_(ツ)_/¯

JonasJurczok commented 6 years ago

Thanks for the detailed report. This gives me something to test and fix for all environments.

danielbrauer commented 5 years ago

Hey, I just encountered the second issue above trying out faketorio on macOS. I believe the problem is this:

danielbrauer commented 5 years ago

The solution to the first problem is of course to use the non-Steam version of the game. Incidentally, this will probably avoid the second problem.

JonasJurczok commented 5 years ago

Yeah.. I have it working on my mac but never got around to document it in the readme.

There is definitely an easy solution to most of this :)