WolvenKit / gpm

gpm or Game Package Manager is a tool for downloading, installing, uninstalling, building, and publishing mod packages
GNU Affero General Public License v3.0
7 stars 3 forks source link

Support local and global configuration and merge them appropriately #14

Open MythicManiac opened 3 years ago

MythicManiac commented 3 years ago

It would be a good idea to support a global configuration for defaults, and allow for specifying project-specific local configuration overrides.

A simple example could be that you have globally configured the cyberpunk2077 game to point to one path, but want to use a different path for a specific project e.g. to an older version of the game.

So the spec is fairly simple:

  1. There should be a global configuration file where defaults can be configured to
  2. Each project should have a local configuration file where overrides to the globals can be stored to. This could be stored in the .gpm directory for example
  3. When loading a configuration, gpm would first load the global configuration, then check if a local configuration exists, and finally merge the local configuration on top of the global configuration.

Hard to say which is the best merge strategy at this point yet, left for later discussion.