UltraStar-Deluxe / Play

Free and open source singing game with song editor for desktop, mobile, and smart TV
https://ultrastar-play.com
MIT License
398 stars 74 forks source link

Allow local settings and relative SongDir paths for portable USP installations #502

Open JakobStaudt opened 2 weeks ago

JakobStaudt commented 2 weeks ago

Issue type: Feature request

Actual behaviour

Ultrastar Play on Windows uses the AppData directory to store its config data (Settings.json etc.).

Expected behaviour

For some applications (mainly a portable USP installation on an external drive that should be usable on multiple computers), it would be useful to have the settings located close to the USP files. This would allow the settings to be persistent across computers, if the external drive is connected to other computers. It would also be necessary to allow relative paths for the SongDirs, so mounting the external drive (containing USP and songs) as a different Drive Letter doesn't break the SongDir settings.

Implementation hints

On Startup, USP should check if the USP directory (or its parent?) contains a settings dir as it would normally be found in AppData. If a settings dir is found, it should be used, and no directory in AppData should be created. Only if no local settings are found, the AppData folder should be used/created. The SongDirs Setting should be able to use relative paths. Ideally, the paths specified should be interpreted as relative to the settings file (or its parent?), so the location from which USP is started doesn't affect the behaviour.

achimmihca commented 1 week ago

You can already specify a custom settings file via command line argument --settingsPath. See https://github.com/UltraStar-Deluxe/Play/wiki/Command-Line-Parameters