Configuration & Packaging

Everything about development and the OpenMW source code.
User avatar
lgromanowski
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Contact:

Re: Configuration & Packaging

Post by lgromanowski »

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.
User avatar
lgromanowski
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Contact:

Re: Configuration & Packaging

Post by lgromanowski »

Zini wrote:As far as I can see getUserPath doesn't have a openmw/ part at the end.
It's fixed in commit 80008ed
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?
ezzetabi
Posts: 407
Joined: 03 Feb 2012, 16:52

Re: Configuration & Packaging

Post by ezzetabi »

It is the right 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.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Configuration & Packaging

Post by Zini »

/etc/openmw/ sounds good.

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/...).
Add to this: overridden by command line options.
User avatar
lgromanowski
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Contact:

Re: Configuration & Packaging

Post by lgromanowski »

ezzetabi wrote:Since you use Arch you can see the idea with the sauerbraten or pcsx2 packages.
OK, thanks I will check that packages :)
ezzetabi
Posts: 407
Joined: 03 Feb 2012, 16:52

Re: Configuration & Packaging

Post by ezzetabi »

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...
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Configuration & Packaging

Post by Zini »

Lol! And now the confusion is complete. We need a Linux-guru! ;)
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Configuration & Packaging

Post by raevol »

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.
trikorder
Posts: 44
Joined: 07 Feb 2012, 16:33

Re: Configuration & Packaging

Post by trikorder »

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 ?
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Configuration & Packaging

Post by sirherrbatka »

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