ezzetabi wrote:I pretty much agree with BrotherBrick; just I want to add another cent.
In general no settings should be forced in /etc or /usr. There is place for all users default. You should be able to override those defaults with files in ~/.config/openmw
This is the way which configuration is loaded and parsed: global cfg (/etc/xdg/... right now) is overridden by local cfg (./openmw) which is overridden by user cfg (~/.config/openmw/...).
About /etc/ - I was concerned that place can be used for storing some "default" global configuration when openmw is installed via package manager (apt-get/pacman/emerge/whatever), but if you think this is the wrong place, then I will change it to the one you propose.
And both global path functions look suspicious. If I read the code correctly, you are reading from an environment variable that can contain multiple paths. And then you use the first. For example on my system XDG_DATA_DIRS is "/usr/share/gnome:/usr/local/share/:/usr/share/". Since the OpenMW data would probably be installed to a subdirectory of /usr/share/, this would fail.
On my Linux (Arch) I have: "/usr/share/:/usr/local/share/", but as ezzetabi mentioned this directory probably isn't good for us. I will change it but I need to know where we want to store our global configuration - would /etc/openmw be good place?
The only meaningful alternative I can think is installing everything in /opt/openmw/ and its subdirectories. If you decide this second solution every global file should be there.
Since you use Arch you can see the idea with the sauerbraten or pcsx2 packages.
Last edited by ezzetabi on 16 Feb 2012, 21:04, edited 1 time in total.
For the sake of completeness (you probably know that, but I want to make sure that other people reading this don't miss an important point):
This is the way which configuration is loaded and parsed: global cfg (/etc/xdg/... right now) is overridden by local cfg (./openmw) which is overridden by user cfg (~/.config/openmw/...).
Actually. Watching again even in the two packages I told you it seems data files are in /opt while config files are still in /etc.
Now I am confused... what is the point of /opt? Why not use /usr/share?
I was fairly sure that installing in /opt/X was a way to put all files inside /opt/X instead that in the default directories /etc; /usr/share; /usr/lib...
This seems to be a pretty good reference on the topic, with this being the relevant section on opt. To my understanding, we shouldn't use this directory.
It is unfortunate but probably there is no consistency in the usage of all the directories (/opt /etc ...) sometimes I guess not even within one distro.
I would propose that you just decide on one set up and stick to it.
And if I am not too confused there were a reasonably good set up proposed above
by Zini, BrotherBrick and Ezze right ?
/opt seems to be used mostly by closed source apps like virtualbox but calibre have also completly static build for download with simple script. This script installs files into /opt