[bt-devel] Windows SVN Build

Matthew Talbert ransom1982 at gmail.com
Tue Apr 7 01:12:07 MST 2009


>> Also, I had to make a c:\Documents and Settings\<login>\.sword directory and
>> set an environment variable SWORD_PATH to point at this directory. BibleTime
>> was working then.
>
> I might be able to create that automatically with the installer (the
> ~\.sword directory, that is), but I don't think I can mess with the
> environment variables.  The .sword file shouldn't be necessary - it's
> absent from my system and has been on everyone else, I believe, who
> has tested it.  But yes, the SWORD_PATH needs to point to something.
> In my case, I point it to the C:\Program Files (x86)\CrossWire\The
> SWORD Project directory, which is where my modules are installed.

FWIW, Xiphos and jsword both use %APPDATA%/Sword for module
installation. Xiphos also allows the use of a shared directory,
determined either by SWORD_PATH or %ALLUSERSPROFILE%/Application Data
if SWORD_PATH is not set. Both of these places will be searched by
default in the next release of sword.

For setting SWORD_PATH, if it isn't already set by the user, we set it
during startup using the glib-equivalent of setenv(). I'm sure QT
provides a way to do that as well. These variables are not permanent;
they only last as long as the program is running.

I strongly discourage setting SWORD_PATH with the installer. This
might cause confusion if the user has set it to something else, or is
just expecting the default in another frontend, but suddenly things
are different after installing BT (I know no one has mentioned doing
that yet).

We spent a lot of time testing this setup on various computers and
Windows versions. We feel that it is the best approach to use on Vista
and up in particular, because it allow normal users to install
modules, plus it allows some modules to be private and others shared,
just as you would expect on *nix. Some disagree with this approach,
preferring to install modules to "C:\Program Files\CrossWire\The SWORD
Project". Based on my testing, this location triggers UAC on Vista+,
plus makes it impossible for normal users to install modules. I guess
it depends on whether that sort of thing matters to you or not, but to
me it does.

Don't hesitate to ask if you want to know more about how Xiphos does
this, or if you don't understand my explanations above. Of course, I
think that the route we have chosen is best :) and it would be nice if
we could both do the same thing.

Matthew



More information about the bt-devel mailing list