Client Directories

For all the help you need with Armagetron!
Post Reply
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Client Directories

Post by Light »

Could I get the path to the variables listed here please? I know most of them, but I don't fully understand what all of each contains. For example, the screenshots folder. And the resource folder, would that be the folder "resource" or the parent and it creates the folder? Then autoresource, would it need a full path, or would that cause folders inside of the resource if it uses $RESOURCE/$PATH?

Okay .. I'll just wait to see the directories so it should make more sense to me then. :P

Code: Select all

--datadir <Directory>        : read game data (textures, sounds and texts)
                               from this directory
--userdatadir <Directory>    : read customized game data from this directory
--configdir <Directory>      : read game configuration (.cfg-files)
                               from this directory
--userconfigdir <Directory>  : read user game configuration from this directory
--vardir <Directory>         : save game logs and highscores in this directory

--resourcedir <Directory>    : look for resources in this directory

--autoresourcedir <Directory>: download missing resources into this directory
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Client Directories

Post by Light »

Nevermind, I've figured it out. usrdatadir is the directory that holds the screenshot directory. So, if it helps anyone else, here's my final result that will keep everything in one easy to access folder, with subdirectories of course.

Also, you can still use the parameters with this bash script to change any of my preferred defaults, or use the additional options. Note the help parameter will prevent execution, so you don't have to worry about switching back 'n forth for anything.

Code: Select all

#!/bin/bash

prefix="/home/tom/armagetronad/client"
tron="${prefix}/bin/armagetronad-experimental"

datadir="${prefix}/share/data"
userdatadir="${prefix}/usr"
userconfigdir="${prefix}/usr"
configdir="${prefix}/usr/config"
vardir="${prefix}/usr/var"
resourcedir="${prefix}/share/resource"
autoresourcedir="${resourcedir}/automatic"


$tron --datadir $datadir --userdatadir $userdatadir --userconfigdir $userconfigdir --configdir $configdir \
--vardir $vardir --resourcedir $resourcedir --autoresourcedir $autoresourcedir $(printf '%s ' "$@")
And I assume it's okay to ignore this warning?

Code: Select all

Warning in void FindConfigurationPath() in tools/tDirectories.cpp:1687 : 
 	Could not determine path to configuration files. Using defaults or command line arguments.
User avatar
Z-Man
God & Project Admin
Posts: 11717
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Client Directories

Post by Z-Man »

Seems like overkill. If you have to set the system directories, you probably are doing something wrong. What are you actually trying to do?
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Client Directories

Post by Light »

Z-Man wrote:Seems like overkill. If you have to set the system directories, you probably are doing something wrong. What are you actually trying to do?
A few of them I just changed the folder or folder name for my liking, and some are probably default, I can't remember which I changed. Most of them were already in the one folder, I just took out like etc/game/armagetronad-experimental since it was the only directory in there and made it the top-level dir and renamed it. Just personal preference, it wasn't any real change there.

I moved the user config, screenshots, resource (and auto resource), and var folders into it as well. That way everything is bundled up into one directory instead of one folder in ~/.config/arma* and three folders in ~/.local/share/arma*. I know it's pointless to most, but there's actually a reason for it for me which is gonna make life a little easier.
User avatar
Z-Man
God & Project Admin
Posts: 11717
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Client Directories

Post by Z-Man »

Light wrote:
Z-Man wrote:Seems like overkill. If you have to set the system directories, you probably are doing something wrong. What are you actually trying to do?
A few of them I just changed the folder or folder name for my liking, and some are probably default, I can't remember which I changed. Most of them were already in the one folder, I just took out like etc/game/armagetronad-experimental since it was the only directory in there and made it the top-level dir and renamed it. Just personal preference, it wasn't any real change there.
If you want to make updates hell for you... It's easier to keep the relative paths of system folders. That way, the binary will find them without any additional parameters. Or just use the PortableLinuxApp distribution, or just run the game from the build directory if you're building from source.
Light wrote:I moved the user config, screenshots, resource (and auto resource), and var folders into it as well. That way everything is bundled up into one directory instead of one folder in ~/.config/arma* and three folders in ~/.local/share/arma*. I know it's pointless to most, but there's actually a reason for it for me which is gonna make life a little easier.
It used to be that just setting --userdatadir to something would have the desired effect. Since the ~/.config-move, it may be that --vardir or --userconfigdir is required as well., I'm not sure.
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Client Directories

Post by Light »

vardir, userdatadir, and autoresourcedir are all in ~/.local as well which I wanted to change, and then yeah, userconfigdir is in ~/.config

If updates end up being too much of a pain, I may just change it back. It would only take a second to put back to normal. Just tryin' to make it easier to move around a bit without forgetting my config or something.

But what you're saying is just to move the required ones and not make pointless adjustments I take it? Lol, it would make sense.

/edit

Now I see why you thought it was so dumb to change that. lol Did an update just for fun, and removing them three parameters (the only three extra) would make it no work at all.

So, this is a little better? :P

Code: Select all

#!/bin/bash

prefix="/home/tom/armagetronad/client"
tron="${prefix}/bin/armagetronad-experimental"

userdatadir="${prefix}/usr"
userconfigdir="${prefix}/usr"
vardir="${prefix}/usr/var"
autoresourcedir="${prefix}/share/games/armagetronad-experimental/resource/automatic"


$tron --userdatadir $userdatadir --userconfigdir $userconfigdir \
--vardir $vardir --autoresourcedir $autoresourcedir $(printf '%s ' "$@")
User avatar
Z-Man
God & Project Admin
Posts: 11717
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Client Directories

Post by Z-Man »

Yeah :) Please don't be insulted if I question your ways, by the way. You can do whatever you want and whatever works for you and if you want to completely move everything around, that's fine and you need all those parameters. I just had to comment because you framed it a bit as a recommendation and as that... well, it was in need of improvement.

And I'll definitely look into the split paths again. I do think that a single parameter should suffice to make the game not use any of the hardcoded user specific directories. If possible. I use it myself to keep my admin config separate from the regular config.
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Client Directories

Post by Light »

Z-Man wrote:Yeah :) Please don't be insulted if I question your ways, by the way. You can do whatever you want and whatever works for you and if you want to completely move everything around, that's fine and you need all those parameters. I just had to comment because you framed it a bit as a recommendation and as that... well, it was in need of improvement.

And I'll definitely look into the split paths again. I do think that a single parameter should suffice to make the game not use any of the hardcoded user specific directories. If possible. I use it myself to keep my admin config separate from the regular config.
I'm not insulted in any way. I didn't think ahead, and I actually like to be proven wrong and see what I didn't pay attention to or missed. You were completely right, and setting it back would have made the update much easier. I didn't even have updating in mind, just ease of access with the currently existing files. The new one works perfectly fine and confines everything to the directory I use, so I'm happy with it. :)

Thanks for pointing out the flaws. And, as for the recommendation thing. It was just sort of a, it works for me, you can use it too if you want. But the last one I posted is a much better idea. Although, if they did a sysinstall, then my script is probably pointless anyways, so it probably wouldn't be used by many if anyone, just thought I'd post it in case.
Post Reply