Building R-2.1.0 from Source

crashclappergapΛογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 3 χρόνια και 7 μήνες)

104 εμφανίσεις

Building R
-
2.1.0 from Source

(How I’ve done it as of 4/19/2005)


Files that are needed:


http://jrsoftware.org/isinfo.php

http://www.murd
och
-
sutherland.com/Rtools/tools.zip

http://www.activestate.com/Products/ActivePerl/Download.html

http://www.mingw.org/

(and the
mingw
-
run
time

and
w32api

updates)

http://www.murdoch
-
sutherland.com/Rtools/iconv.zip

http://www.murdoch
-
sutherland.com/Rtools/h
tmlhelp.exe

http://www.miktex.org/

http://www.murdoch
-
sutherland.com/Rtools/R_Tcl.zip

To build the DLL
Rbitmap.dll

for bit
-
mapped graphics devices
you will need
libpng

and
jpeg

sources (available, e.g., from

ftp://ftp.uu.net/graphics/

[png,jpeg]

and many mirrors). You will need files
libpng
-
1.2.8.tar.gz

and
jpegsrc.v6b.tar.gz

or later. Some currently active
links are
libpng

and
jpeg
.

(Students in STT 4865: I will give these do you so you do not have to download 100 +
megs of files.)


Create a new folder at
C:/

called
Rtools

Then, copy the Downloads folder into
C:/Rtools

(Path will now be
C:/Rtools/Downloads
)


Click on the file
tools.zip
. Extract all the files to
C:
\
Rtools
\
. This will create
the folder
C:
\
Rtools
\
tools
\


For Windows NT, 2000, and XP, click
Star
t > Settings > Control Panel
;
System
;
Advanced
;
Environment Variables
; at the bottom of the screen click
on Path in the System Variables window.


Install Html Workshop by clicking on
htmlhelp.exe

in the
C:
\
Rtools
\
Downloads

folder. Click
Yes
,
Yes
. Change
the path to
C:
\
Rtools
\
HTMLws

and click
OK
.
Yes

will create it.


Install Inno Setup by clicking on
isetup
-
5.0.8.exe

in the
C:
\
Rtools
\
Downloads

folder.

Select English language and click
OK
.
Next>
,
I accept
,
Next>
.

Change the path to
C:
\
Rtools
\
InnoSetup5

(r
emove the spaces). Then click
Next>
,
Next>
,
Next>
,
Install
,
Finish
. Close the windows that pop up.


Install ActivePerl 5.8.6.811 by clicking on the

ActivePerl
-
5.8.6.811
-
MSWin32
-
x86
-
122208.msi
Windows installer
program.

Accept the terms and license.

N
EXT>
, To change the Location: of the installation, click Browse and change the
directory to
C:
\
Rtools
\
Perl
\

(the Perl will need to be typed), Click
OK
.

NEXT>
,
NEXT>
,
NEXT>
,
Install
.

After the installation is complete, click
finish
.


Install MinGW 3.2.
0 by clicking on the

MinGW
-
3.2.0
-
rc
-
3.exe

file.
Yes
,
Continue
.

NEXT
,
Yes
,
NEXT>
,

Select the destination directory of
C:
\
Rtools
. (MinGW will be a default subdirectory)

Next>
,
Install
. After the installation is complete, click
finish
.


Add to the “path”
environment variable at the Beginning:

.;C:
\
Rtools
\
tools
\
bin;C:
\
Rtools
\
MinGW
\
bin;
C:
\
Rtools
\
perl
\
bin;C:
\
texmf
\
miktex
\
bin

(this path is where the LaTeX
distribution of MikTeX lives if you have it installed

this is optional);
C:
\
Rtools
\
HTMLws
\
;C:
\
Rsource
\
R2
01
\
bin;


and leave untouched the rest of the path already present. (NOTE THAT THERE ARE
NO SPACES

AFTER THE SEMICOLON AND THE NEXT PATH!)


Click
OK
,
OK
,
OK

to save your changes. Then close the control panel window.


Copy from the
C:
\
Rtools
\
Downloads

folde
r two files:

mingw
-
runtime
-
3.7
-
tar.gz

and
w32api
-
3.2
-
src
-
tar.gz


and paste them into the
C:
\
Rtools
\
MinGW

folder.


Click

Start>Programs>Acessories>Command Prompt

to get a
dos

prompt.


Use
cd ..

to move up the directory structure to
C:
\
>
.

Then type “
cd Rto
ols
.” Hit enter. Type “
cd MinGW
.” You should be in the folder
C:
\
Rtools
\
MinGW>
.


To list the files, type “
ls
.”


Next, type

tar zxvf mingw
-
runtime
-
3.7.tar.gz

, hit enter

and

tar zxvf w32api
-
3.2
-
src.tar.gz

, hit enter


Create a folder named
C:
\
Rsourc
e

with the
file>new folder

command issued
while you are at
C:
\


Move the file
R
-
2.1.0.tar.gz

from
C:
\
Rtools
\
Downloads
to

C:
\
Rsource
\


Return to the command prompt and
cd ..

back to
C:
\
>

then
cd Rsource
.

Your prompt should look like
C:
\
Rsource>
.


Type
tar z
xvf R
-
2.1.0.tar.gz

This will create many of the R
-
2.1.0 subdirectories.

Type
mv R
-
2.1.0 R210

to rename the directory to something without dashes or
periods.


Go to the windows explorer in the
C:
\
Rtools
\
Downloads

and click on
iconv.zip
. Extract the files
to
C:
\
Rsource
\
R210
\
src
\
gnuwin32
\
Unicode


Go to windows explorer in the
C:
\
Rtools
\
Downloads

and click on
R_tcl.zip
.
Extract the files to
C:
\
Rsource
\
R210

where a
Tcl

directory will be created.


Return to the dos prompt and
cd

to the directory
C:
\
Rsource
\
R21
0
\
src
\
gnuwin32>


Type edit
Mkrules
. A dos editor should open.


The lines to be changed are:


HHWDIR = C:/Rtools/HTMLws

TCL_HOME = C:/Rsource/R210/Tcl

ISDIR = C:/Rtools/InnoSetup5

Comment out #Header = /users/ripley/R/cross
-
tools/mingw32/include


Alt F, S

to save and Alt F, X to exit.


Type “
make
” at the
C:
\
Rsource
\
R210
\
src
\
gnuwin32>

prompt. (Now is a good
point for a bathroom break or to read the next chapter…)


Move the files
libpng
-
1.2.8
-
config.tar.gz

and
jpegsrc.v6b.tar.gz

from
C:
\
Rtools
\
Downloads

to
C:
\
Rsource
\
R201
\
src
\
gnuwin32
\
bitmap


At the dos prompt,
cd

to
C:
\
Rsource
\
R210
\
src
\
gnuwin32
\
bitmap>

and type

tar zxvf libpng
-
1.2.8
-
config.tar.gz

, hit enter.

Also type
tar zxvf jpegsrc.v6b.tar.gz
, and hit enter.


Type
mv libpng
-
1.2.8
-
config libpng


Type
ma
ke

and hit enter.


cd

to
C:
\
Rsource
\
R210
\
src
\
gnuwin32>


and type “
make recommended
” to install the recommended packages.

If MikTex is installed, you can create the documentation, if you are connected to the
internet, (More than likely you will not have all

of the needed packages installed on
MiKTeX…hence the need to be online).


Copy Folder
C:
\
Rsource
\
R210
\
share
\
texmf

to
C:
\
localtexmf
\
tex

Start > Programs> MiKTeX > MiKTeX Options > General

Click
Refresh now

and
Update Now
. Click
OK
.


cd

to
C:
\
Rsource
\
R210
\
src
\
gnuwin32>


and type “
make manuals