forked from r-devel/r-svn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrtools40-installer.sh
executable file
·48 lines (40 loc) · 1.65 KB
/
rtools40-installer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
# Minimal script to build R for Windows from SVN.
# You must run this script inside the rtools40 shell.
# This builds and checks a single architecture (no manuals or installer)
# Run script safely and emit some verbose output
set -e
set -x
# Absolute path to this script
scripts=$(dirname $(realpath $0))
sources=$(cygpath ${GITHUB_WORKSPACE})
# Put pdflatex on the path (needed only for CMD check)
export PATH="$PATH:/c/progra~1/git/bin:/c/progra~1/MiKTeX/miktex/bin/x64"
echo "PATH: $PATH"
pdflatex --version
texindex --version
texi2any --version
make --version
perl --version
# Extra steps to prepare SVN build (rather than official tarball)
cd "${sources}"
sed -i.bak 's|$(GIT) svn info|./.github/workflows/svn-info.sh|' src/include/Makefile.win
curl -sSL https://curl.haxx.se/ca/cacert.pem > etc/curl-ca-bundle.crt
./tools/rsync-recommended
./.github/workflows/svn-info.sh
# Install system libs
pacman -Syu --noconfirm
pacman -S --needed --noconfirm mingw-w64-{i686,x86_64}-{gcc,gcc-fortran,icu,libtiff,libjpeg,libpng,pcre2,xz,bzip2,zlib,cairo,tk,curl}
# Create the TCL bundle required by tcltk package
mkdir -p Tcl/{bin,bin64,lib,lib64}
${scripts}/create-tcltk-bundle.sh
# Copy source dir and build 32-bit R
MSYS="winsymlinks:lnk" cp -Rf "." "../build32"
cd "../build32/src/gnuwin32"
sed -e "s|@win@|32|" -e "s|@texindex@||" -e "s|@home32@||" "${scripts}/MkRules.local.in" > MkRules.local
make 32-bit
# Build 64 bit + docs and installers
cd "${sources}/src/gnuwin32"
TEXINDEX=$(cygpath -m $(which texindex))
sed -e "s|@win@|64|" -e "s|@texindex@|${TEXINDEX}|" -e "s|@home32@|${sources}/../build32|" "${scripts}/MkRules.local.in" > MkRules.local
make distribution