Skip to content

Commit f173acc

Browse files
committed
Restore RWinLib
1 parent ede47f9 commit f173acc

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/Makevars.win

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
CXX_STD = CXX11
2+
3+
RWINLIB = ../windows/baselibs-3.5.0
4+
5+
PKG_CPPFLAGS = -I${RWINLIB}/include \
6+
-DSTRICT_R_HEADERS
7+
8+
PKG_LIBS = -L${RWINLIB}/lib${R_ARCH} -lpng -lz
9+
10+
all: clean winlibs
11+
12+
winlibs:
13+
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" ${VERSION}
14+
15+
clean:
16+
rm -f $(OBJECTS)

tools/winlibs.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
BASELIB <- "3.5.0"
2+
if(!file.exists(sprintf("../windows/baselibs-%s/include/png.h", BASELIB))){
3+
if(getRversion() < "3.3.0") setInternet2()
4+
download.file(sprintf("https://github.com/rwinlib/baselibs/archive/v%s.zip", BASELIB), "lib.zip", quiet = TRUE)
5+
dir.create("../windows", showWarnings = FALSE)
6+
unzip("lib.zip", exdir = "../windows")
7+
unlink("lib.zip")
8+
}

0 commit comments

Comments
 (0)