- Linux: will write from now on to ~/.config/spring and default configfile will be ~/.config/spring/springsettings.cfg
- Windows: won't run anymore by default in portable mode, means it won't write anymore to the installdir just cause it got write access to it, instead it will write everything (including config!) to C:/.../My Games/Spring
If you want an all-in-one-folder setup (= portable mode), then you need to place a springsettings.cfg next to spring.exe & unitsync.dll. - all settings from the old layout will be read, but the engine will write them to the new locations
- Spring will just write to a single folder (even the config file!).
- Spring will read from multiple folders (even in portable mode, it will check the known default locations!), except it runs in Isolation Mode.
- Config files will be read from all DataDirs (that's new!).
- Checked locations for DataDirs is now simply grouped in 3 sections.
- Nearly all user defined directories allow to define multiple dirs in one string (separated by ":" on *nix and ";" on windows) and may contain relative paths & EnvVars (like $HOME, %HOME%, ...).
Scanned DataDirs
Sorted by priority the engine may use multiple data directories,
but it will use only the one with the highest priority as writable, to write cache & log files to.
The hierarchy the engine loads DATA DIRs in can be grouped in 3 sections (don't confuse the 3 sections with the 3 modes!):
Normal Mode:
- directory defined via --write-dir
- SPRING_WRITEDIR envvar
- --------------------
- CONFIG_HOME
- ETC_DIRS
- USR_SHARE
- --------------------
- SPRING_DATADIR envvar
- SpringData configtag
- directory defined via --write-dir
- SPRING_WRITEDIR envvar
- --------------------
- INSTALL_DIR <-- that's the only change to Normal Mode
- CONFIG_HOME
- ETC_DIRS
- USR_SHARE
- --------------------
- SPRING_DATADIR envvar
- SpringData configtag
- directory defined via --write-dir
- SPRING_WRITEDIR envvar
- --------------------
- ISOLATION_DIR
- --------------------
- SPRING_DATADIR envvar
- SpringData configtag
- Config directories in user's home.
*nix/MacOSX:- ${XDG_CONFIG_HOME-"~/.config"}/spring
~/.spring
- C:/.../My Documents/My Games/Spring/
C:/.../My Documents/Spring/
C:/.../All Users/Applications/Spring/
- ${XDG_CONFIG_HOME-"~/.config"}/spring
ETC_DIRS Additional ':' separated DATA DIRs defined in /etc/spring/datadir.
USR_SHARE
- *nix: /usr/.../share/spring
MacOSX: .../Spring.app/Contents/Resources/share/games/spring/base/
Windows: Install directory
- Mode A (--isolation): INSTALL_DIR
Mode B (--isolation-dir): supplied dir
Engine scans following directories for config files:
- file defined via '--config'
- write DATA DIR (by default ~/.config/spring | ../My Games/Spring)
-
- (skipped in Isolated mode)
*nix/MacOSX: ~/.springrc
Windows: C:\Users\USER\AppData\Local\springsettings.cfg
- (skipped in Isolated mode)
- all read DATA DIRs
The filename of such config files can be as following:
- springsettings-%Engine_Version%.cfg
- springsettings.cfg
- springrc-%Engine_Version% (*nix/MacOSX only)
- springrc (*nix/MacOSX only)
Glossary
DataDir
Data directories are searched for content, and among other things, may contain: config files, logs, games, maps, AIs, cache
Portable Mode
An all-in-one-folder setup, which allows to run Spring without installation.
To do so all relevant files (binaries & basecontent) must be in a single folder,
esp. spring(.exe), libunitsync.so/unitsync.dll and springsettings.cfg.
Spring will then use the all-in-one-folder for writing and won't do so anywhere else on the system,
but it may open other files & directories for reading.
Isolation Mode
Not to confuse with Portable Mode, this mode disables all automatic Data Dir scanning and limit reading & writing to a single folder.
This is very usefull when games want to run separate from other Spring games.
PS: All this information can be found in spring's manpage.
PPS: too much text, too lazy to fix grammar.