[Rd] Is it possible to make install.packages compile source code on Unix but use shipped binary on Windows?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Jun 18 13:20:59 CEST 2014
On 18/06/2014 09:11, Renaud Gaujoux wrote:
> Thank you for the replies and hints.
>
>> A 'pre-built windows binary' of what?
>
> Sorry this was not clear, src/ contains source code for a binary
> executable, which produces no .lib or .dll.
> It is all fine in a R development environment:
> * On Linux, the executable is compiled and copied to
> R_PACKAGE_DIR/binR_ARCH using a custom install.libs.R script.
> * Same thing on Windows, if Rtools is installed, install.packages
> compiles and installs both 32 and 64 bits .exe.
>
>> You can easily ship a DLL or .exe for use on Windows: just make use of
>> configure.win and/or Makefile.win. If you have a Makefile.win it will
>> override the normal procedures for directory src.
>
> I have tried using Makevars.win, but this requires make to be
> installed (as by Rtools). So I guess using Makefile.win would also not
> work, on a classic non-development geared Windows host.
> Would using configure.win work without Rtools?
Maybe. Read the documentation and sources for yourself (see below).
>> OTOH, shipping something in exec will be installed everywhere.
>
> True, although it seems that sub-directories of exec/ are actually not
> installed though. Is this intentional?
Yes, *and documented* (including that it should not be used for Windows
executables).
Neither I nor R-devel is a documentation-reading service: do read
http://www.r-project.org/posting-guide.html very carefully.
>> Watch out for sub-architectures: 'Windows' is in fact two platforms. We
>> have over the years seen a lot of problem with people shipping 64-bit
>> Windows binaries: 32-bit Windows does not recognize those.
>
> Indeed, and I think I properly take care of this in install.libs.R.
>
> @Grabriel: the package is provided as a source package. This one is
> installable locally from file, although in may case users actually get
> it through a personal CRAN-like repository, using argument
> type='both'.
>
> Thank you.
>
> Bests,
> Renaud
>
--
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
More information about the R-devel
mailing list