QuakeInjector icon indicating copy to clipboard operation
QuakeInjector copied to clipboard

Config should be stored in a sensible place, not CWD

Open SpiritQuaddicted opened this issue 6 years ago • 6 comments
trafficstars

The config.properties is stored in the current working directory, not in the Quake directory or next to the quakeinjector.jar.

We should either store it in the Quake directory (with a better filename) or whatever place the operating system wants configs to be store in.

SpiritQuaddicted avatar Jan 26 '19 21:01 SpiritQuaddicted

Ref for nix: https://en.wikipedia.org/wiki/Freedesktop.org#Base_Directory_Specification

SpiritQuaddicted avatar Nov 09 '21 21:11 SpiritQuaddicted

+1 for this. Storing it next to quakeinjector.jar would be preferable since it's configuring that application, rather than the quake binary.

WRFitch avatar Nov 12 '21 10:11 WRFitch

Hm, I much prefer using the OS' standard place to store the stuff, not sure why I suggested that other option at all when I posted this. The quakeinjector.jar is pretty much the executable which the user could store anywhere and I think it would be nice to not force the executable to the data and vice-versa. Maybe a user supplied local configuration in the same directory as the .jar could override the "nicely stored" one though?

SpiritQuaddicted avatar Nov 12 '21 20:11 SpiritQuaddicted

I would suggest to use a common way and put the configs to user home directory - like ~/.quakeinjector for unix systems (similar thing exists for windows)

demoth avatar Jul 18 '22 19:07 demoth

Best would be ~/.config/QuakeInjector/ on Linux. No idea what MacOS uses. Windows should be AppData/Roaming/QuakeInjector/ or AppData/Local/QuakeInjector/ I presume although https://docs.microsoft.com/en-us/windows/apps/design/app-settings/store-and-retrieve-app-data says that this is meant for volatile data.

I have a very strong preference for

Maybe a user supplied local configuration in the same directory as the .jar could override the "nicely stored" one though?

SpiritQuaddicted avatar Jul 19 '22 08:07 SpiritQuaddicted

Linux: https://wiki.archlinux.org/title/XDG_Base_Directory

Xdg config dir specifically

19 Jul 2022 10:01:53 SpiritQuaddicted @.***>:

Best would be ~/.config/QuakeInjector/ on Linux. No idea what MacOS uses. Windows should be AppData/Roaming/QuakeInjector/ or AppData/Local/QuakeInjector/ I presume although https://docs.microsoft.com/en-us/windows/apps/design/app-settings/store-and-retrieve-app-data says that this is meant for volatile data.

I have a very strong preference for

Maybe a user supplied local configuration in the same directory as the .jar could override the "nicely stored" one though?

— Reply to this email directly, view it on GitHub[https://github.com/hrehfeld/QuakeInjector/issues/117#issuecomment-1188729329], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAATX55IBWJPBULKOVYVUVDVUZOGNANCNFSM4GSRQZ2Q]. You are receiving this because you are subscribed to this thread.[Tracking image][https://github.com/notifications/beacon/AAATX53L35FSBQNYOJZGY2TVUZOGNA5CNFSM4GSRQZ22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOI3NJD4I.gif]

hrehfeld avatar Jul 19 '22 08:07 hrehfeld