bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] How to change the directory where settings saved?


From: Philippe Michel
Subject: Re: [Bug-gnubg] How to change the directory where settings saved?
Date: Sun, 27 Oct 2013 21:21:27 +0100 (CET)
User-agent: Alpine 2.00 (BSF 1167 2008-08-23)

On Sun, 27 Oct 2013, Ben Stover wrote:

Anyway this trick
- should be documented

Indeed

- allow a relative path (like "..\mypreferences") starting at GnuBGs installation directory which means "go up one dir and then step down into neighbor dir "mypreferences"

This should work as well. It does on unix and there is no reason why it wouldn't on Windows.

- not only available as cmdline flag but as menu option

It seems quite awkward to me :
- you start gnubg with no pre-existing user preferences
- it uses its default settings (including saving its preferences in $HOME/.gnubg)
- you change the setting for the preferences directory
- and then it shouldn't autosave its settings (like it usually does when the configuration is changed) but on the contrary reread them from this new directory

Isn't creating a shortcut starting it with the right flag  simpler ?


This should be enough when the memory stick always uses the same drive letter, but to have something truly portable, I think we'll have to use some kind of environment variable in the settings involving a path.

Consider this scenario :
- you install gnubg in E:\gnubg
- the first time it runs, it creates a gnubgautorc with lines like:
set matchequitytable "E:\gnubg\met\Rockwell-Kazaross.xml"
- you use your memory stick on another computer where it is seen as F:\

It seems the beginning of such paths, if it matches the installation directory, should be replaced by a variable, something like:
set matchequitytable "%GNUBGDATA\met\Rockwell-Kazaross.xml"

And then, at runtime, it would use this environment variable if set, or default to its installation directory.

The portable version would then be started from a short script that determines where it is run from, sets the environment variable accordingly and launches the real executable with -s %GNUBGDATA\preferences or something similar.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]