Added a new boolean t.secondarysource to love.conf
If set to true when the game is in fused release mode, love.filesystem will gain a new read-only directory: the folder containing the love file.
In Windows, this will typically be the folder containing the game's executable.
In Linux, most "fused" love games will either be moved at the user's discretion, put into ~/.gamename or a similar place by an install script, or directly fused to the love executable for distribution via a third party tool (Desura, etc). In the first case, the game creator would be responsible for informing the player to keep the love file with any potential data in the surrounding folder, as would be expected with any program distributed in a similar manner.
There are several reasons for having love.filesystem read access to the folder containing the love file, in fused release mode:
- Easier/more intuitive moddability of games, since the game creator can choose data or code to expose fully in places players expect viewable data to be.
- Consistency with other programs and games (in Windows and OSX). Most Windows and OSX programs store their data in the locations mentioned above. LÖVE is currently an "odd man out" in terms of read-access storage locations, on those two OS'.
- A second love-designated place for loading C lua libraries packaged with the game (not included in this commit). The current options are less than ideal: it's unintuitive and wasteful to have to copy libraries from the love file to the save directory, and relying on Lua's loaders and the current working directory is not reliable or portable.
Linux has less to benefit than the other two desktop OS' from this addition, but the restriction to fused release mode with an extra conf.lua flag means it will only be used when the love file is already being distributed in a prepackaged manner of the game creator's choosing.