This is a follow-up to Logan Kelly's question at
http://lists.wfu.edu/pipermail/gretl-devel/2014-July/005194.html . While
installing and running more than one version of gretl on a given machine
is not something we'd generally expect people to do, it's possible if you
take some care, and I thought it might be useful to spell out what's what.
I'll start with Linux because that's simpler. On Linux the paths that
gretl needs are recorded in the file .gretl2rc in the user's home
directory. If the settings in this file are right for one gretl
installation they will obviously be wrong for any other installation.
However, you have these options:
1) Get ~/.gretl2rc right for installation A, and copy it to (say)
~/.gretlrcA. Then do the same for installation B. Then depending on
which version you want to run, copy the associated file into place as
~/.gretl2rc before launching the program.
2) Alternatively, use the environment variable GRETL_CONFIG_FILE to
override the default of ~/.gretl2rc and pick up a version-specific config
file, as in
GRETL_CONFIG_FILE=/home/me/alt-gretlrc gretl
Now for Windows. I'll begin by describing the situation up till CVS a
couple of days ago.
When gretl is installed in the usual way an entry for "gretldir" is
written to the registry under HKEY_LOCAL_MACHINE, software, gretl. This
path denotes the directory to which gretl is installed, typically but not
necessarily "C:\Program Files\gretl". This registry entry is taken to be
canonical unless it is overridden by the environment variable GRETL_HOME.
This means that gretl will always take its path information from the
registry entry created by the most recent installation, unless you run
gretl with GRETL_HOME pointing to a different installation. Unfortunately,
running a program with an ad hoc environment-variable setting is not so
easy on Windows (google "set environment variable windows shortcut" to see
the fun and games).
In current CVS I've changed this. We now give precedence to a "gretldir"
value figured out from argv[0], the name of the program as called by the
OS. So, for example, if you create a desktop shortcut pointing to
"C:\Program files\gretl-cvs\gretl.exe" we should infer a gretldir setting
of "C:\Program files\gretl-cvs". (The registry entry is now just used as a
fallback.)
The specific case Logan mentioned has the last gretl release (1.9.90)
installed alongside a snapshot. To get this working you could first
install today's snapshot, then either use regedit to change the gretldir
registry entry to point back to the gretl 1.9.90 installation, or
re-install 1.9.90 to overwrite the registry. Then 1.9.90 will use the
registry entry, and the snapshot will (or should) ignore the registry and
find its own path.
Some testing of this would be nice!
Allin Cottrell