|Subject:||Re: [Bug-gnubg] How to change the directory where settings saved?|
|Date:||Mon, 28 Oct 2013 10:09:16 +0100|
On 2013-10-27 14:21, Philippe Michel wrote:[snip]
> 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.
The only way to pass a command line parameter to GNUBG and have it work
with relative paths is to create a batch (.cmd or .bat) file that
For the MS Windows world, I was toying with a solution a long the lines
of your suggestion since portability seems to be a feature request
there. The idea is to add an option to the installer for those who wish
to create a portable install (Some installers have a similar advanced
portable install feature). This advanced/expert option would be a page that:
a) Asks users if they wish to install to a portable device (ie. USB)
b) Ask user for a relative path to install preferences. Default is blank
which would translate to a period (.) directory being passed to GNUBG
which would result in the base preferences directory being that of the
c) Installer launches gnubg-cli.exe, issues "save settings" command,
then exits. This creates a new configuration file (gnubgautorc) but with
d) Once gnubg-cli exits the installer reads the config file and does a
simple text deletion. All the absolute paths (The install directory
base) is simply removed.
d) Create a batch file (.cmd) in the install directory that launches
GNUBG with the required -s parameter.
Once installed a portable user launches the batch file to start GNUBG.
This doesn't require changes to GNUBG, but does require the installer to
do text substitution on an initially created gnubgautorc resulting in
making the data path elements relative (sound files, MET file etc).
|[Prev in Thread]||Current Thread||[Next in Thread]|