Page 1 of 2

Trivial: .springrc belongs in .spring

Posted: 09 Nov 2007, 22:23
by HAARP
As mentioned here, according to FSA, an app should either have one file in the home folder, or a directory containing several files. Spring currently creates a .springrc in the homefolder, but other stuff gets its own folder, .spring
.springrc should be renamed springrc and put in the .spring folder.
This is definitely not important, but it should be done before too many people use the current constellation ;)

Posted: 10 Nov 2007, 02:04
by theHive
I disagree with that, though.

My .springrc file holds my settings for my game, but my spring directory is in home/spring (so all user accounts can access it).

I want settings to be set by account though, not globally, so then i would need a .spring directory as well, which would contain just one file.

So I'm happier with it as .springrc

Posted: 10 Nov 2007, 04:25
by thesleepless
i think all non user specific spring data should go in $PREFIX/share/spring/
and any user specific stuff should be in ~/.spring/
when loading data it should check first ~/.spring/ and then $PREFIX/share/spring/ so that the user can update things over the top of the base install

Posted: 10 Nov 2007, 10:56
by HAARP
theHive wrote:I disagree with that, though.

My .springrc file holds my settings for my game, but my spring directory is in home/spring (so all user accounts can access it).

I want settings to be set by account though, not globally, so then i would need a .spring directory as well, which would contain just one file.

So I'm happier with it as .springrc
In that case, it would be convenient if you could specify your own paths to the configure-script before compiling. Still, it should default to how the FSA recommends it

Posted: 10 Nov 2007, 11:14
by koshi
HAARP wrote: In that case, it would be convenient if you could specify your own paths to the configure-script before compiling.
You can: http://spring.clan-sy.com/wiki/SetupGui ... re_Options

Posted: 10 Nov 2007, 21:07
by HAARP
koshi wrote:
HAARP wrote: In that case, it would be convenient if you could specify your own paths to the configure-script before compiling.
You can: http://spring.clan-sy.com/wiki/SetupGui ... re_Options
Cool. Well, there's no reason not to comply to FSA. OBEY!

Posted: 10 Nov 2007, 21:09
by trepan
Afaik, the spring engine itself only uses .springrc. The .spring/
directory is being used by lobby clients. It may not be a bad idea
to move .springrc into .spring/config.txt. Anyone wanting to use
shared data dirs could still do so with links,

Posted: 10 Nov 2007, 21:19
by HAARP
Spring itself does seem to create a few files and folders in .spring (AI/, demos/, infolog.txt, etc.)
Maybe not name it *.txt, just keep it at springrc. Other apps don't use any extension either.

Posted: 10 Nov 2007, 21:58
by koshi
you could check out the spring source, goto rts/System/Platform/Linux/DotFileHandler.h and edit

Code: Select all

#define DOTCONFIGFILE ".springrc"
then compile and see if everything works well ( mv .springrc to-whatever-you-specified first)

Posted: 10 Nov 2007, 22:09
by trepan
HAARP:
You sure about .spring/ being used by the engine?
Could you point us to that code that does so?

Also, I have seen other apps use extensions for their
configuration files, bzflag, bind, xorg, etc... Using .conf
as a configuratoion extension seems popular.

Posted: 10 Nov 2007, 22:28
by BrainDamage
.spring/ isn't used by the engine, it's in fact .springrc wich tells spring where to put his data files (SpringData=)

using .spring is just a convection that the packagers & the wiki editors picked up, but you're free to not follow it

eg, mysefl i use $HOME/spring-data/ since i don't like to copy/paste/download stuff in invisible folder (and the name reminds me it's pourpose more :P )

Posted: 10 Nov 2007, 22:42
by clericvash
Im with brain damage, the invisible folder annoys me muchly since it is needed a lot to change stuff.

Which is why i set it up to use a folder on one of my partitions. Well i used to till i nuked my spring and re-installed with debs, gotta re-do folder now.

Posted: 11 Nov 2007, 19:54
by semi
There's this mysterious thing in linux that's called a link, either hard or symbolic, that makes you able to have aliases for your "hidden folders".

Hidden folders...

Btw there's more personal stuff in spring data dir: your demos, LuaUI saved data, etc...

Posted: 11 Nov 2007, 22:57
by HAARP
Well, Spring still does use .spring (directory), but it does not appear to be hardcoded. In my case, this seems to be specified in /etc/spring/datadir.

As for extensions: developers decide what to use. No extension is fine, .conf is fine, whatever floats your boat. But for the love of all that is not Microsoft, don't use .txt :wink:

Posted: 11 Nov 2007, 23:08
by YokoZar
clericvash wrote:Im with brain damage, the invisible folder annoys me muchly since it is needed a lot to change stuff.

Which is why i set it up to use a folder on one of my partitions. Well i used to till i nuked my spring and re-installed with debs, gotta re-do folder now.
The invisible folder is annoying, but this is largely because the current interface is inadequate. There's no way to install maps system-wide, or even using the lobby client. The former will change once I start uploading more map packages though (you can already apt-get install spring-maps-hunterw)

Posted: 14 Nov 2007, 07:38
by Radtoo
YokoZar wrote:The invisible folder is annoying, but this is largely because the current interface is inadequate. There's no way to install maps system-wide, or even using the lobby client.
Much of this is Linux as designed (at least if following FHS). Basically, the user's home folder is the best place to put maps by default. Sure, the "by default" part is a bit contradictory - going by the same FHS, /home does not have to exist or be writable. However, in reality, it exists on almost all of the "desktop" Linux distributions, and is our best bet for an user-writable, persistent directory.

Other than /home, maps could go somewhere into /usr/share/games (which is supposed to be read-only after installation, and thus usually root only for writes), or /var/games (this should work for sharing maps between users on many setups, but may not even exist on some).

And as people said, the spring datadir is already configurable...


As far as other things go, I agree with the initial post.

Posted: 14 Nov 2007, 13:55
by clericvash
Map packages would be pretty nice, would be a completely no-fuss way to have us maps on linux.

Posted: 15 Nov 2007, 01:11
by YokoZar
Radtoo wrote:Other than /home, maps could go somewhere into /usr/share/games (which is supposed to be read-only after installation, and thus usually root only for writes), or /var/games (this should work for sharing maps between users on many setups, but may not even exist on some).
This is exactly where the map package I made puts them (Linux packages install as root). The lobby client itself would have to put downloaded maps in the user's home folder. Unless, of course, we went all out and taught the lobby client how to download map packages on Linux with something like packagekit (think how codecs are installed in Ubuntu) ;)

Posted: 15 Nov 2007, 02:54
by thesleepless
perhaps spring should use physicsfs: icculus.org/physfs/
then it'd be easy to set up multiple directories/packages for maps and other data.
have the main install data in $PREFIX/share/spring or $PREFIX/share/games/spring and then other stuff can go wherever else you please such as in your home directory.

Posted: 15 Nov 2007, 03:23
by YokoZar
thesleepless wrote:perhaps spring should use physicsfs: icculus.org/physfs/
then it'd be easy to set up multiple directories/packages for maps and other data.
have the main install data in $PREFIX/share/spring or $PREFIX/share/games/spring and then other stuff can go wherever else you please such as in your home directory.
There's no need to overengineer this, the way it already is works fine when someone is using the Spring packages (all packaged stuff goes into the standard read only folders, then he can put other stuff in ~/.spring). Spring can handle multiple data directories by just modifying the .springrc file if need be.

Eventually, the lobby client itself might start downloading maps and shoving them into ~/.spring. For now, though, things are just fine.