[Rd] Custom installer [was: Version names]
Philippe Grosjean
phgrosjean at sciviews.org
Mon Nov 29 12:06:35 CET 2004
Hello,
The discussion about version names leads me to the following question
(sorry, I change the message title):
Is it possible to enforce the user to select an option during R
installation? For instance, I want R to be installed with the registry entry
option set up and, let's say, with tcltk files installed. How do I ensure
this?
Well, under Windows, Inno Setup that is used as the installer is plenty of
resources for that! You have lots of command line arguments, including
/SAVEINF and LOADINF/ that use a custom information file about the options.
Then, you can run the setup silently with /SP-, /SILENT or /VERYSILENT from
the command line, thus, from a batch script.
Ultimately, it is possible to write an installer that will install R with
several options, with additional packages, etc... very easily without having
to rebuid the original R installer. You need both the rwXXXX.exe installer
(about 23Mb), and your custom installer (let's say with a couple of
additional packages, weighting a few hundreds of kb) downloaded in the same
directory. You run your custom installer, which in turn installs R silently
with the right options (it even can detect if R is already installed or
not).
There is a real interest for this approach for projects like R Commander, or
SciViews-R. Indeed, it targets beginners and installation should be as
straigthforward as possible. Currently, you have to (1) install R (2) with
specific options, (3) install additional packages, and (4) switch Rgui in
SDI mode under Windows... before you can start working in R Commander or
SciViews-R. Definitely too many tasks for a beginner!
So, I will experiment a little bit with Inno Setup in this direction and
intend to propose a web page about this topic, for Windows.
Now, my two questions:
1) Does anyone has some experience using Inno Setup this way?
2) How to solve the problem of custom installation this way under
Linux/Unix? [with a batch script, I presume, but does somebody have a
skeleton for that: installing R with specific options + several additional
packages at once].
Thanks,
Philippe Grosjean
..............................................<°}))><........
) ) ) ) )
( ( ( ( ( Prof. Philippe Grosjean
) ) ) ) )
( ( ( ( ( Numerical Ecology of Aquatic Systems
) ) ) ) ) Mons-Hainaut University, Pentagone
( ( ( ( ( Academie Universitaire Wallonie-Bruxelles
) ) ) ) ) 6, av du Champ de Mars, 7000 Mons, Belgium
( ( ( ( (
) ) ) ) ) phone: + 32.65.37.34.97, fax: + 32.65.37.33.12
( ( ( ( ( email: Philippe.Grosjean at umh.ac.be
) ) ) ) )
( ( ( ( ( web: http://www.umh.ac.be/~econum
) ) ) ) )
..............................................................
> -----Original Message-----
> From: r-devel-bounces at stat.math.ethz.ch
> [mailto:r-devel-bounces at stat.math.ethz.ch] On Behalf Of Gabor
> Grothendieck
> Sent: Monday, November 29, 2004 3:12 AM
> To: r-devel at stat.math.ethz.ch
> Subject: Re: [Rd] Version names
>
> Gabor Grothendieck <ggrothendieck <at> myway.com> writes:
>
> >
> > Simon Urbanek <simon.urbanek <at> math.uni-augsburg.de> writes:
> >
>
> > : If all you want to do is to determine the current (most recently
> > : installed) R version, then all it takes is two lines of C
> code [just
> > : read one registry entry] - and it's at least as portable across
> > Windows
> > : systems as a batch script, but far more flexible. (There
> may even be
> > a
> > : way to get that info w/o coding at all - I'm not sure whether
> > regedit
> > : has any batch mode or something ...).
> >
> > I don't think regedit has a batch mode. e.g. regedit /?
> does not give help.
>
> I looked into a bit more and some of this information is
> actually in the FAQ:
>
>
> 2.15 Does R use the Registry?
> Not itself.
>
> The installers set some entries to allow uninstallation. In
> addition (by default, but this can be de-selected) they set
> a Registry key LOCAL_MACHINE\Software\R-core\R giving the
> version and install path. Again, this is not used by R
> itself, but it will be used by the DCOM interface
> (http://cran.r-project.org/other-software.html). Finally, a
> file association for extension .RData is set in the
> Registry.
>
> You can add the Registry entries by running RSetReg.exe in
> the bin folder, and remove them by running this with
> argument /U. Note that the settings are all per machine and
> not per user, and that this neither sets up nor removes the
> file associations.
>
> Also it seems that one uses reg.exe rather than regedit.exe from
> batch files so putting all this together we get the following
> Windows XP batch statement to get the current path to the
> rw.... folder.
> It puts the path into the Rrw variable:
>
> for /f "tokens=2*" %%a in (
> 'reg query hklm\software\r-core\r /v InstallPath') do
> set Rrw=%%b
>
> The bad news is that this is not 100% guaranteed to work
> since, as mentioned
> above, the user can deselect modification of the registry
> during installation
> but its certainly more than sufficient for my purposes and
> probably most
> other purposes too.
>
> Thanks for pointing the way.
>
> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
More information about the R-devel
mailing list