Linux style settings under windows
Moderator: Moderators
-
- Posts: 156
- Joined: 13 Oct 2006, 10:48
spring -config <filename> ?
... else, try:
windows:
- C:\My Blah Blah Blah\... ?
- $datadir\$username.config.txt
- $datadir\config.txt
unix:
- $HOME/.springrc
Let's you share the same config file with multiple versions,
and should be fairly easy for windows users to add to their
shortcut (if they have need of using -config).
Which reminds me ... the linux and windows command line
switches should probably use the same format (and as more
linux users know what a command line is, they get to pick: '-')
... else, try:
windows:
- C:\My Blah Blah Blah\... ?
- $datadir\$username.config.txt
- $datadir\config.txt
unix:
- $HOME/.springrc
Let's you share the same config file with multiple versions,
and should be fairly easy for windows users to add to their
shortcut (if they have need of using -config).
Which reminds me ... the linux and windows command line
switches should probably use the same format (and as more
linux users know what a command line is, they get to pick: '-')
How about this scheme:
* If the user passes --config <filename> as a CL parameter, Spring searches for a file called <filename>.config.txt in <$springdir>\configs\ (creating it if necessary) and reads that one, ignoring any other locations.
* Else if the user doesn't pass the --config parameter, Spring searches <$springdir>\configs\ for <$username>.config.txt first (which would have to be placed there manually) and falls back on <$winroot>\<$docs and bla>\Spring\$username.config.txt (which also gets created if necessary) only in case that fails.
Here the advantage would be that reliance on Windows-specific stuff gets "pushed back" as far as possible, yet is still also available as a last resort for those people who don't want to pollute their Spring directory for whatever reason.
BTW, you don't need admin-rights to write a textfile.
* If the user passes --config <filename> as a CL parameter, Spring searches for a file called <filename>.config.txt in <$springdir>\configs\ (creating it if necessary) and reads that one, ignoring any other locations.
* Else if the user doesn't pass the --config parameter, Spring searches <$springdir>\configs\ for <$username>.config.txt first (which would have to be placed there manually) and falls back on <$winroot>\<$docs and bla>\Spring\$username.config.txt (which also gets created if necessary) only in case that fails.
Here the advantage would be that reliance on Windows-specific stuff gets "pushed back" as far as possible, yet is still also available as a last resort for those people who don't want to pollute their Spring directory for whatever reason.
BTW, you don't need admin-rights to write a textfile.

Last edited by Kloot on 27 Nov 2006, 15:35, edited 1 time in total.
-
- Posts: 156
- Joined: 13 Oct 2006, 10:48
-
- Posts: 156
- Joined: 13 Oct 2006, 10:48