Trivial: .springrc belongs in .spring

Trivial: .springrc belongs in .spring

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Trivial: .springrc belongs in .spring

Post 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 ;)
User avatar
theHive
Posts: 124
Joined: 13 May 2007, 06:54

Post 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
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Post 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
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Post 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
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Post 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
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Post 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!
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post 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,
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Post 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.
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Post 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)
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post 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.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Post 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 )
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Post 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.
semi
Posts: 69
Joined: 30 Mar 2007, 20:42

Post 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...
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Post 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:
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Post 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)
Radtoo
Posts: 50
Joined: 12 May 2006, 14:21

Post 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.
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Post by clericvash »

Map packages would be pretty nice, would be a completely no-fuss way to have us maps on linux.
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Post 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) ;)
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Post 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.
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Post 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.
Post Reply

Return to “Linux”