On 11/05/2017 03:18 AM, Tor Andersson wrote:
> Just tested this on Windows 7. It works, but there are two potential
> issues with it:
> The "garglk.ini" file that is opened with the "Options..." menu has
> unix line endings, and that confuses notepad. It would be nice if the
> installer uses DOS line endings for this file.
Good idea. I've just submitted a pull request that does this.
> Installing in the default "Program Files" directory means that files
> inside it can only be modified by the administrator account. Thus the
> "garglk.ini" file cannot be edited by default. This can be fixed by
> installing outside the "Progam Files" directory, and should probably
> be mentioned in the installer at the "Choose Install Location" screen
> if possible.
The usage of garglk.ini does need to be better documented. A whole lot
From reading the source, it looks like garglk.ini is searched for in the
1. The directory containing gargoyle.exe (Windows), or /etc/garglk.ini
2. $GARGLK_INI/garglk.ini (plus, in the launcher only,
7. (game directory)/garglk.ini
8. (game directory)/(name of game).ini, e.g. zork1.ini.
And unfortunately, the launcher has its own code to do the same thing,
in order to find interpreters. At the very least the "find
gargoyle.ini" code should be consolidated, but I'm not sure looking in 8
places is ideal. For config options, all files are used, but if there
are duplicate config options, the last one takes precedence (so, for
example, garglk.ini in the game directory overrides config options in
1. $XDG_CONFIG_HOME should be confined to Unix (OS X? I don't know).
2. $HOME maybe should be Unix-only, too, and on Windows, a more proper
way to locate config files should be used. In Bocfel I look in $APPDATA
and $LOCALAPPDATA, but I'm not sure that's "proper". If any Windows
developers want to chime in that'd be great.
3. We should choose either .garglkrc or garglk.ini, or, more in line
with tradition, check both $HOME/.garglkrc and $XDG_CONFIG_HOME/garglkrc.
4. Allowing games themselves to provide configs should be optional; that
is, there should be an option like "ignore_game_config" or something
when, if true, stops ini parsing at step 6 above. This is probably less
important, and maybe just a personal thing: I don't like games
overriding my config options.
5. The "system" config file (number 1 above) should maybe just be an
example, i.e. not used by Gargoyle. It feels a little wrong to me for a
system-wide config file to exist, because it can require users to write
their configs to specifically counteract whatever the current system has.
6. $GARGLK_INI? I don't know... is it really necessary? If so, I'd at
least expect it to point to an actual config file instead of a directory.
To explain #5 a bit better, an example: I have a .vimrc file I copy
around to any system I'm going to be using vim on for an extended period
of time. Sometimes my vim starts acting really weird, even with my
config file, and it's because for some reason there's an /etc/vimrc file
which turns on some options I don't like. As a result, my vimrc, which
is meant to work with a non-configured vim, all of a sudden isn't
sufficient. I have to add more options to disable whatever the local
administrator has enabled. With something that end-users will be using
(i.e. not a system daemon), I just don't see the utility in a
system-wide configuration file. In short, I think that the proper
defaults should be built into Gargoyle, and only users, not the
administrator, should be able to modify them.
OK, so I'd tentatively propose something like the following for config
1. <local configuration directory>/<.garglkrc or garglkrc or
garglk.ini>. This might search multiple locations.
2. (perhaps only if not disabled) <game directory>/garglk.ini.
> Thanks again for keeping the torch lit!
Thank you for creating what I consider the gold standard in desktop