Moved ~/.armagetronad/ folder

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
nux
Round Winner
Posts: 206
Joined: Mon Sep 12, 2011 11:20 pm

Moved ~/.armagetronad/ folder

Post by nux »

To keep it more organised, im making a topic here so we can stop posting off-topic on a (semi) unrelated thread. Original thread is at http://forums3.armagetronad.net/viewtop ... 7&start=15

Last post:
Z-Man wrote:No reason, that's why! So now,
UserConfigDir is $XDG_CONFIG_HOME/armagetronad,
UserDataDir is $XDG_DATA_HOME/armagetronad,
VarDir is $XDG_DATA_HOME/armagetronad/var
by default.
A case could be made for frommaster.srv to reside in $XDG_CACHE_HOME because deleting it (usually, since almost nobody uses score bias) has no ill effect OR $XDG_CONFIG_HOME because it contains user configuration (score bias) and for the resource cache to go to $XDG_CACHE_HOME for obvious reasons, but I'm not in the mood do add another path class, mostly to avoid user confusion (also, laziness). I already had to add another directory open menu item for the user config directory.

Also, affecting all platforms, user.cfg now is in UserDataDir, no longer in Var, and no config files except user.cfg's from old installations are ever read from var.
Will the ~/.armagetronad be removed? Whats going to happen with the original screenshots; will they be moved or remain untouched? Will the users get prompt to remove this dir or every user should handle it the way they want? In case of conflict with user.cfg(different files in ~/.armagetronad/ and $XDG_DATA_HOME/armagetronad/var) , which one will be prioritised?
There's a difference between knowing your shit, and knowing you're shit. Grammar does matter.
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Moved ~/.armagetronad/ folder

Post by Z-Man »

All old data is left in place (including screenshots), doing anything with it would break old versions the user may want to get back to. Standard cleanup methods (my choice: whenever I set up a new system, I only copy ~/.-entries from the last setup on demand) will have to take care of ~/.armagetronad.
Data and config files in the new directories override data from the old directories, anything else would just be broken :) There is one known case where this may be problematic, if an incomplete texture pack is installed in the new place. Missing textures for that would then be searched for, and maybe found, in the old directories. That's nothing new, though, the same applies to incomplete data sets in the user data directory getting completed by things in the system directory.
User avatar
Phytotron
Formerly Oscilloscope
Posts: 5041
Joined: Thu Jun 09, 2005 10:06 pm
Location: A site or situation, especially considered in regard to its surroundings.
Contact:

Re: Moved ~/.armagetronad/ folder

Post by Phytotron »

Z-Man wrote:UserConfigDir is $XDG_CONFIG_HOME/armagetronad,
UserDataDir is $XDG_DATA_HOME/armagetronad,
VarDir is $XDG_DATA_HOME/armagetronad/var

...UserDataDir
Huh? What are all those and where are they? When will this be applied?

So confusing. Why must a simple video game be made confusing and complicated like Linux? Like the new cockpit and all this stuff. :(
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Re: Moved ~/.armagetronad/ folder

Post by epsy »

On a typical linux install, these are the old/new paths:

Code: Select all

~/.armagetronad/ -> ~/.local/share/armagetronad/
~/.armagetronad/var/ -> ~/.local/share/armagetronad/var/
~/.armagetronad/var/*.cfg -> ~/.config/armagetronad/
Hope that makes things not as abstract. The changes applies in the latest 0.4alpha builds and will propagate to release 0.4.0.

The purpose of the ~/.local/ and ~/.config/ folders is to put an end to pouring down stuff directly into the home folder, while actually defining what the right place is for them to go.

If for whatever reason, your setup is not "typical", you can find out the new target folders using this command on a terminal:

Code: Select all

echo $XDG_DATA_HOME/armagetronad $XDG_CONFIG_HOME/armagetronad
nux
Round Winner
Posts: 206
Joined: Mon Sep 12, 2011 11:20 pm

Re: Moved ~/.armagetronad/ folder

Post by nux »

n@ubuntu:~$ echo $XDG_DATA_HOME/armagetronad $XDG_CONFIG_HOME/armagetronad
/armagetronad /armagetronad
Ok, this better handle my case correctly :(
There's a difference between knowing your shit, and knowing you're shit. Grammar does matter.
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Moved ~/.armagetronad/ folder

Post by Z-Man »

Yeah, if the variables are not set, the defaults epsy mentioned are used. The specs demand it!
Also, no need for command line magic. Just use the Help/Open Directories/ menus to open the relevant directories, works on all systems and all deployment methods. The relevant docs will be adapted to that.
User avatar
Phytotron
Formerly Oscilloscope
Posts: 5041
Joined: Thu Jun 09, 2005 10:06 pm
Location: A site or situation, especially considered in regard to its surroundings.
Contact:

Re: Moved ~/.armagetronad/ folder

Post by Phytotron »

epsy wrote:On a typical linux install, these are the old/new paths:

Code: Select all

~/.armagetronad/ -> ~/.local/share/armagetronad/
~/.armagetronad/var/ -> ~/.local/share/armagetronad/var/
~/.armagetronad/var/*.cfg -> ~/.config/armagetronad/
OK, I think. :/ But what about the rest of it:
UserConfigDir is $XDG_CONFIG_HOME
UserDataDir is $XDG_DATA_HOME
VarDir is $XDG_DATA_HOME
What does all that mean? Is that code/programmer-side stuff, or you all changing the names of everything again?
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Re: Moved ~/.armagetronad/ folder

Post by epsy »

UserConfigDir, UserDataDir and VarDir are the names armagetron uses internally to refer to these directories.

$XDG_CONFIG_HOME, $XDG_DATA_HOME and $XDG_DATA_HOME refer to Environment variables. In short, a user or program can set XDG_CONFIG_HOME to something, and $XDG_CONFIG_HOME would be replaced with("expanded to") that. These three will usually be set by the system, unless changed by the user. So this is indeed "programmer-side" stuff. XDG refers to a previous name of freedesktop.org, a group that aims towards providing better user experiences through standardisation and more.

Everything is still called the same in the game, and if in doubt, the Help menu available from the main menu can open the right directories for you.
User avatar
Phytotron
Formerly Oscilloscope
Posts: 5041
Joined: Thu Jun 09, 2005 10:06 pm
Location: A site or situation, especially considered in regard to its surroundings.
Contact:

Re: Moved ~/.armagetronad/ folder

Post by Phytotron »

OK. I wasn't so much thinking about in-game things, but more wondering if you all were again changing the names of the actual files and folders the average user deals with: e.g., var, config, settings.cfg, etc.

So, if I'm following, would that mean that any old [filename].cfg files one has should be moved into the ~/.config/armagetronad/ folder?

I suppose it would be a good idea for someone to post on the Wiki exactly what files go in each of those three directories, once this is settled (if it's not already). Not just what's installed by default, but the usual things one would manually add.


By the way, not to veer too off-topic, but are there any 'read me'/help/support docs that come with the Linux/Ubuntu version (0.2.8.3.1, forward)? If so, where does it get put? I just installed from the Software Center, eh.
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Re: Moved ~/.armagetronad/ folder

Post by epsy »

Phytotron wrote:So, if I'm following, would that mean that any old [filename].cfg files one has should be moved into the ~/.config/armagetronad/ folder?
Don't worry, that will be done automatically.
By the way, not to veer too off-topic, but are there any 'read me'/help/support docs that come with the Linux/Ubuntu version (0.2.8.3.1, forward)? If so, where does it get put? I just installed from the Software Center, eh.
If anywhere it should be in /usr/share/doc/armagetronad/. The about menu in the main menu lists the different data directories, too.
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Moved ~/.armagetronad/ folder

Post by Z-Man »

epsy wrote:
Phytotron wrote:So, if I'm following, would that mean that any old [filename].cfg files one has should be moved into the ~/.config/armagetronad/ folder?
Don't worry
yes.
epsy wrote:that will be done automatically.
No, but they will still be found in the old place.

In 0.4, our included, slightly crappy html docs are accessible over the Help/Documentation menu item. The software center version probably is 0.2.8, though, so that won't help.
nux
Round Winner
Posts: 206
Joined: Mon Sep 12, 2011 11:20 pm

Re: Moved ~/.armagetronad/ folder

Post by nux »

Code: Select all

n@ubuntu:~$ aptitude show armagetronad
Package: armagetronad                    
State: not installed
Version: 0.2.8.3.1-1
Priority: optional
Section: universe/games
Maintainer: Ubuntu Developers <[email protected]>
Uncompressed Size: 2,634 k
Depends: armagetronad-common (= 0.2.8.3.1-1), libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libgl1-mesa-glx | libgl1, libglu1-mesa | libglu1, libjpeg62, libpng12-0 (>= 1.2.13-4), libsdl-image1.2 (>= 1.2.5),
         libsdl1.2debian (>= 1.2.10-1), libstdc++6 (>= 4.4.0), libxml2 (>= 2.7.4), zlib1g (>= 1:1.1.4)
Description: 3D Tron-like high speed game
 The rules are simple: you ride a light cycle (a kind of motorbike that can only turn 90 degrees at a time, leaves a wall behind and cannot be stopped) and have to avoid running into walls while at the
 same time you have to try to get your opponent to run into them. 
 
 The idea is based on the Disney movie from 1982 called "Tron".  If you ever wanted to take a try at one of those speed demons features in the movie, this is your chance. 
 
 Armagetron Advanced can be played against AI opponents, against other humans over the network, or a mixture of both.
Homepage: http://armagetronad.sourceforge.net/

n@ubuntu:~$ 
There's a difference between knowing your shit, and knowing you're shit. Grammar does matter.
User avatar
Phytotron
Formerly Oscilloscope
Posts: 5041
Joined: Thu Jun 09, 2005 10:06 pm
Location: A site or situation, especially considered in regard to its surroundings.
Contact:

Re: Moved ~/.armagetronad/ folder

Post by Phytotron »

Yes, nux, I'm well aware.
Phytotron wrote:So, if I'm following, would that mean that any old [filename].cfg files one has should be moved into the ~/.config/armagetronad/ folder?
Z-Man wrote:
epsy wrote:that will be done automatically.
No, but they will still be found in the old place.
Right, I got that. But take the case of someone deleting their old directories, or transferring config files themselves from another computer (e.g., previous had 0.2.8.3.1, new one will have 0.4). Would that be the appropriate destination for all .cfg files?

Also, we were talking awhiles back about moving settings_visual.cfg...somewhere. How's that impacted by this?

This all may fall into the "it'll be obvious once you look at it" category once it comes out, but may as well be prepared ahead of time.
Phytotron wrote:By the way, not to veer too off-topic, but are there any 'read me'/help/support docs that come with the Linux/Ubuntu version (0.2.8.3.1, forward)? If so, where does it get put? I just installed from the Software Center, eh.
epsy wrote:If anywhere it should be in /usr/share/doc/armagetronad/. The about menu in the main menu lists the different data directories, too.
Z-Man wrote:In 0.4, our included, slightly crappy html docs are accessible over the Help/Documentation menu item. The software center version ... is 0.2.8, though, so that won't help.
Hmm. Here's what I got from the 0.2.8.3.1 install:
armagetronad.png
armagetronad-common.png
Marlin's Miller Columns. :D

I think that may actually be more than what currently comes with 0.2.8.3.1 for OSX, but I'd have to check.
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Re: Moved ~/.armagetronad/ folder

Post by epsy »

The html folder is the thing.
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Moved ~/.armagetronad/ folder

Post by Z-Man »

Phytotron wrote:But take the case of someone deleting their old directories, or transferring config files themselves from another computer (e.g., previous had 0.2.8.3.1, new one will have 0.4). Would that be the appropriate destination for all .cfg files?
Yep, you could move them to ~/.config/armagetronad.
Phytotron wrote:Also, we were talking awhiles back about moving settings_visual.cfg...somewhere. How's that impacted by this?
settings_textures.cfg has been split up from settings_visual.cfg and resides with the texture files. Nothing has changed there. Custom texture mods are preferred in ~/.local/share/armagetronad/textures now, though.
Phytotron wrote:This all may fall into the "it'll be obvious once you look at it" category once it comes out.
Yes, that. Don't worry so much.
Post Reply