From ripley at stats.ox.ac.uk  Thu Jul 12 19:26:11 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 12 Jul 2007 18:26:11 +0100 (BST)
Subject: [Rd] In creating a Windows binary package (zip),
 how do I make the installation configurable
In-Reply-To: <B9A3DF402FE5A44CB903DB0F130225F907D024@VOO-EXCHANGE01.internal.sungard.corp>
References: <B9A3DF402FE5A44CB903DB0F130225F907D024@VOO-EXCHANGE01.internal.sungard.corp>
Message-ID: <Pine.LNX.4.64.0707121823180.25331@gannet.stats.ox.ac.uk>

On Thu, 12 Jul 2007, rick.jones at sungard.com wrote:

> I would like to create a binary package for Windows which when
> installed will give the user an option of whether to install
> one version or another.
>
> Here is the problem, I have a package 'FAME' that can run
> in two different modes on Windows. An old mode that uses
> R to connect to a remote linux machine and a new way that
> uses a locally installed database.
>
> I would allow this decision to be made at run time, but
> the DLL in the later case depends upon the database's DLL
> being on the Windows machine. A runtime solution would
> require at least one extra level of dynamic loading.
>
> So I would like something like this to happen:
> the zip file contains fame-local.dll and fame-remote.dll
> when the user selects 'install packages from a zip file'
> the user should be given the option of which DLL
> should be renamed to 'fame.dll'.
>
> Is this possible??

No.  You can use your own installer, though, just as we do for R itself.

> If not, then are there an recommendations for a solution?

Why not look for the in-FAME DLL in your .onLoad function, and load the 
appropriate DLL at that time?  Or even put up a dialog box to ask the user 
(if there is: think about non-interactive use) at that point.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] In creating a Windows binary package (zip), how do I make the installation configurable
Prof Brian Ripley