Skip to content

Commit

Permalink
Update windows install to include libtiledb source
Browse files Browse the repository at this point in the history
  • Loading branch information
mojaveazure committed Nov 13, 2024
1 parent 3eb236f commit ee2b20e
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 9 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export("return_as<-")
export("selected_points<-")
export("selected_ranges<-")
export("strings_as_factors<-")
export(.pkg_config)
export(allows_dups)
export(array_consolidate)
export(array_vacuum)
Expand Down
28 changes: 28 additions & 0 deletions man/dot-pkg_config.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CXX_STD = CXX17
RWINLIB = ../windows/rwinlib-tiledb
# RWINLIB = ../windows/rwinlib-tiledb
RWINLIB = ../inst/tiledb

PKG_CPPFLAGS = -I. -I../inst/include -I$(RWINLIB)/include -I$(RWINLIB)/include/tiledb -DTILEDB_STATIC_DEFINE -DTILEDB_SILENT_BUILD
PKG_LIBS = \
Expand Down
23 changes: 15 additions & 8 deletions tools/winlibs.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ if (!file.exists(dcffile)) stop("TileDB Version file not found.")
dcf <- read.dcf(dcffile)
ver <- dcf[[1, "version"]]

if (!file.exists("../windows/rwinlib-tiledb/include/tiledb/tiledb.h")) {
# if (!file.exists("../windows/rwinlib-tiledb/include/tiledb/tiledb.h")) {
if (!file.exists("../inst/tiledb/include/tiledb/tiledb.h")) {
if (getRversion() < "4") stop("This package requires Rtools40 or newer")
op <- options()
options(timeout=180) # CRAN request to have patient download settings
download.file(sprintf("https://github.com/TileDB-Inc/rwinlib-tiledb/archive/v%s.zip", ver), "lib.zip", quiet = TRUE)
op <- options(timeout = 180) # CRAN request to have patient download settings
zipfile <- tempfile(tmpdir = tempdir(check = TRUE), fileext = '.zip')
download.file(
sprintf("https://github.com/TileDB-Inc/rwinlib-tiledb/archive/v%s.zip", ver),
destfile = zipfile,
quiet = TRUE
)
options(op)
dir.create("../windows", showWarnings = FALSE)
unzip("lib.zip", exdir = "../windows")
file.rename(sprintf("../windows/rwinlib-tiledb-%s", ver), "../windows/rwinlib-tiledb")
unlink("lib.zip")
# dir.create("../windows", showWarnings = FALSE)
# unzip("lib.zip", exdir = "../windows")
unzip(zipfile, exdir = "../inst")
# file.rename(sprintf("../windows/rwinlib-tiledb-%s", ver), "../windows/rwinlib-tiledb")
file.rename(sprintf("../inst/rwinlib-tiledb-%s", ver), "../inst/tiledb")
unlink(zipfile, force = TRUE)
}

0 comments on commit ee2b20e

Please sign in to comment.