T
twostars
Server: Add config for directory paths (#731)
* Server: Add config for directory paths
AI server:
--map-dir ([PATH] MAP_DIR=xyz)
--event-dir ([PATH] EVENT_DIR=xyz)
Ebenezer:
--map-dir ([PATH] MAP_DIR=xyz)
--quests-dir ([PATH] QUESTS_DIR=xyz)
We add config and command-line args to override the config.
If a command-line arg is supplied, it will always use that. It will also save this to config if config isn't already set. If no command-line arg is supplied, but config was previously saved, then it will use that. If no command-line arg is supplied and no config has ever been set, then it will use the existing defaults.
This allows us to better decouple our server asset paths from our binary paths.
We remove GetProgPath() because it's useless now (it used to return the path to the executable, now it's the working dir -- relative paths do the same thing).
We also move debugger defaults before Microsoft.Cpp.targets so user config correctly overrides them, as well as setting the debugger defaults for our paths appropriately.
VS debugger defaults are also consistently set in the CMake projects, so VS users will always use the repository's asset dirs directly instead of the "installed" assets.
Github Commit Görüntüle...
See Commints...
..
* Server: Add config for directory paths
AI server:
--map-dir ([PATH] MAP_DIR=xyz)
--event-dir ([PATH] EVENT_DIR=xyz)
Ebenezer:
--map-dir ([PATH] MAP_DIR=xyz)
--quests-dir ([PATH] QUESTS_DIR=xyz)
We add config and command-line args to override the config.
If a command-line arg is supplied, it will always use that. It will also save this to config if config isn't already set. If no command-line arg is supplied, but config was previously saved, then it will use that. If no command-line arg is supplied and no config has ever been set, then it will use the existing defaults.
This allows us to better decouple our server asset paths from our binary paths.
We remove GetProgPath() because it's useless now (it used to return the path to the executable, now it's the working dir -- relative paths do the same thing).
We also move debugger defaults before Microsoft.Cpp.targets so user config correctly overrides them, as well as setting the debugger defaults for our paths appropriately.
VS debugger defaults are also consistently set in the CMake projects, so VS users will always use the repository's asset dirs directly instead of the "installed" assets.
Github Commit Görüntüle...
See Commints...
..