[hatari-devel] Default configuration file
Eero Tamminen
eerot at users.berlios.de
Sat Jun 11 18:59:38 CEST 2011
Hi,
On lauantai 11 kesäkuu 2011, Christer Solskogen wrote:
> I don't know if this it intentional or not, but I noticed this when I
> installed hatari on a new machine:
> Configuration file /etc/hatari.cfg not found.
>
> I think it's a bit odd that it looks for hatari.cfg in /etc, when I
> installed hatari in /usr/local (I did not specify a prefix)
> - The question is if it really looks for a configuration file in /etc or
> that it just say it does,
That's what the CMakeLists.txt seems to unconditionally set, regardless
of prefix:
---
add_definitions(-DCONFDIR=\"/etc\")
---
It's a regression from Hatari v1.4. Thomas, could you look at it?
As Hatari itself doesn't install any cfg file, it's not a problem for
file installs, just locating the global config file.
> but what it really do is to search for in in $prefix/etc.
It's a bit more complicated. If $prefix is empty, prefix should default
to /usr. If prefix is /usr, conf should be in /etc. Only when prefix
isn't /usr, conf should be in $prefix/etc. (And that's only Linux/Unix...)
But CMake doesn't seem to support this, only $prefix/<relative path> which
behavior the current Hatari CMakeLists.txt seems to be relying on as
the install paths specified there are relative?
Btw. a global config file should anyway define just settings that correspond
to local machines config. Earlier the main issue was display size[1], but
now that Hatari gets that by itself, only "suitable" things in global config
for normal PCs[1] are file paths to midi & rs-232 which are pretty rare
use-cases I think (e.g. I've never tried Hatari with my old MIDI keyboard).
About everything else is normally user specific.
In some mobile devices without keyboard, a key mapping file, reasonable
default paths (to remove/lessen need for typing) and restrictions on Hatari
features (because they take too much CPU) could be set in global options
too, but in general I think the global config is more of a relic.
- Eero
[1] The screen sizes specified in example hatari configs for mobile devices
under the etc/ dir could probably be removed, but they don't harm
anything.
More information about the hatari-devel
mailing list