Commit 0b62abd7 authored by jfuser's avatar jfuser
Browse files

add gdal2 dependencies download for windows binaries

add windows ci
parent 58e22e79
Pipeline #82 failed with stage
in 13 minutes and 1 second
......@@ -14,3 +14,12 @@ package-devel:
- "R CMD build . --resave-data"
- "R CMD check --as-cran $(ls -rt landsepi_* |tail -1)"
package-windows:
tags:
- "win10"
- "R"
- "binaries"
script:
- "Rscript -e \"roxygen2::roxygenize('.', roclets=c('rd', 'collate', 'namespace'))\""
- "R CMD build . --resave-data"
- "R CMD INSTALL --build --force-biarch $(ls -rt landsepi_* |tail -1)"
......@@ -27,7 +27,7 @@ Depends:
utils,
grDevices (>= 3.0.0),
graphics (>= 3.0.0),
R (>= 3.4.0),
R (>= 3.3.0),
Rcpp (>= 0.9.0),
rgdal (>= 1.2-16)
Imports:
......
......@@ -14,4 +14,17 @@ PKG_LIBS = \
-lodbc32 -lodbccp32 -liconv -lpsapi -lws2_32 -lcrypt32 -lwldap32 -lsecur32 -lgdi32 \
-lgsl
all: clean winlibs
CXX_STD=CXX11
winlibs:
mkdir -p ../inst
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" --vanilla "../tools/winlibs.R"
cp -r ../windows/gdal2-2.2.0/share/gdal ../inst/
cp -r ../windows/gdal2-2.2.0/share/proj ../inst/
clean:
rm -f $(SHLIB) $(OBJECTS)
.PHONY: all winlibs clean
if(getRversion() < "3.3.0") {
stop("Your version of R is too old. This package requires R-3.3.0 or newer on Windows.")
}
# Download gdal-2.2.0 from rwinlib
if(!file.exists("../windows/gdal2-2.2.0/include/gdal/gdal.h")){
download.file("https://github.com/rwinlib/gdal2/archive/v2.2.0.zip", "lib.zip", quiet = TRUE)
dir.create("../windows", showWarnings = FALSE)
unzip("lib.zip", exdir = "../windows")
unlink("lib.zip")
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment