-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use new module installation mechanism very basic functionality works start on making hashes work seems more or less functional now started rewriting cmake, stuff compiles but crashes at runtime everything seems functional on Linux windows fixes, stuff compiles but weird runtime error building on windows works from a clean build, but more testing is needed more tweaks, update to renv 1.0.2 updates for fallback without lockfile start unifying stuff across OSes autogenerated lockfiles seem to be work okay but need more testing reorganize file + pkgdepends fallback bump jaspModuleInstaller spaces -> tabs bump jaspModuleInstaller spaces -> tabs moved getModuleDependencies to jaspModuleInstaller call setupRenv in setup_renv_rcpp_rinside_jaspModuleInstaller.R.in remove custom Matrix installation make configuration work on macos compilation still fails though... do follow symlinks otherwise it patches nothing move searching for fortran outside of the "does framework not exist if()f" jaspModuleInstaller and fixing of r pkgs needs jaspEngine so change the order in which things are installed add R_LIBS for windows and macos make windows start * dont use Rscript now it builds again on macos arm without R installed * make it build on windows again * fix some path finding cmake * pre install hacks no longer needed * progress * works on windows now? * Merge mistake * Update jasprcpp.cpp * Fix symlink relativation on MAC * fix windows stuff * Update symlinkTools.R * progress' * now works on linux and flatpak(from cellar + lockfiles) * update ModuleInstaller to linux fixed version * make sure we dont forget any Modules * remove leftover logic to collect and restore flatpak cran now surpassed by using simple cellar * fix on mac again * fix v8 * fix * fix jaspBase compilation * devmodules ? * update jaspModuleInstaller * update module installer * this seems to work for Linux local builds at least * submodule update * merge mistakes * windows..... * windows couldn't find module installer because we were overwitting it * update module installer to fix windows * okay one more thing for windows * Enable all modules * Update cleanFlatpak.sh * Update cleanFlatpak.sh * load jaspBase first before loading module * Update install-module.R.in * Update setup_renv_rcpp_rinside.R.in * Update cleanFlatpak.sh * re-add the header includes that are definetly needed * Fix configure vars for jaspColumnEncoder * rewrite scary construction in DynamicModule::generateModuleInstallingR * update module installer * fix problems caused by -j * update submodules * try to satisfy the new flatpak regs * try to satisfy the new flatpak regs again * fix readstat search on fedora --------- Co-authored-by: vandenman <donvdbergh@hotmail.com> Co-authored-by: Joris Goosen <joris@jorisgoosen.nl> Co-authored-by: rens <rens@renss-MacBook-Pro.local> Co-authored-by: Rens <example>
- Loading branch information
1 parent
8ac10c9
commit c6824e9
Showing
90 changed files
with
974 additions
and
6,840 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule jaspModuleInstaller
added at
250272
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"R": { | ||
"Version": "4.3.3", | ||
"Repositories": [ | ||
{ | ||
"Name": "CRAN", | ||
"URL": "https://cran.rstudio.com" | ||
} | ||
] | ||
}, | ||
"Packages": { | ||
"RInside": { | ||
"Package": "RInside", | ||
"Version": "0.2.18", | ||
"Source": "Repository" | ||
}, | ||
"Rcpp": { | ||
"Package": "Rcpp", | ||
"Version": "1.0.12", | ||
"Source": "Repository" | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# Generated from install-jaspBase.R.in | ||
# | ||
Sys.setenv(GITHUB_PAT = "@GITHUB_PAT@") | ||
Sys.setenv(RENV_PATHS_ROOT = "@MODULES_RENV_ROOT_PATH@") | ||
Sys.setenv(RENV_PATHS_CACHE = "@MODULES_RENV_CACHE_PATH@") | ||
Sys.setenv(RENV_PATHS_SANDBOX = "@RENV_SANDBOX@") | ||
Sys.setenv(JASPENGINE_LOCATION = "@JASP_ENGINE_PATH@/JASPEngine") | ||
|
||
if("@R_PKG_CELLAR_PATH@" != "") | ||
Sys.setenv(RENV_PATHS_CELLAR = "@R_PKG_CELLAR_PATH@") | ||
|
||
|
||
#Load the post-install fixes from jaspBase. Think Baron von Munchhausen ;) | ||
source("@PROJECT_SOURCE_DIR@/Engine/jaspModuleInstaller/R/renvOverrides.R") | ||
source("@PROJECT_SOURCE_DIR@/Engine/jaspModuleInstaller/R/checksums.R") | ||
source("@PROJECT_SOURCE_DIR@/Engine/jaspModuleInstaller/R/utils.R") | ||
source("@PROJECT_SOURCE_DIR@/Engine/jaspModuleInstaller/R/installModule.R") | ||
|
||
# The R_LIBRARY_PATH might already be there, but depending on the configuration | ||
# of the CMake, we might be installing in a different location, so, I just add | ||
# it anyway! It gets to if-y. | ||
|
||
|
||
.libPaths("@RENV_LIBRARY@") | ||
sandboxPaths <- renv:::renv_sandbox_activate() | ||
|
||
JASPMODULEINSTALLER_LIBRARY <- "@JASPMODULEINSTALLER_LIBRARY@" | ||
PKGDEPENDS_LIBRARY <- "@PKGDEPENDS_LIBRARY@" | ||
RENV_LIBRARY <- "@RENV_LIBRARY@" | ||
R_CPP_INCLUDES_LIBRARY <- "@R_CPP_INCLUDES_LIBRARY@" | ||
JUNCTION_HANDLING_LIBRARY <- "@JUNCTION_HANDLING_LIBRARY@" | ||
|
||
ENGINE <- file.path("@PROJECT_SOURCE_DIR@", "Engine") | ||
MODULES <- file.path("@PROJECT_SOURCE_DIR@", "Modules") | ||
TOOLS <- file.path("@PROJECT_SOURCE_DIR@", "Tools") | ||
|
||
|
||
modulePkg <- file.path("@PROJECT_SOURCE_DIR@", "Engine", "jaspModuleInstaller") | ||
|
||
cat("Restoring pkgdepends\n") | ||
setupRenv(PKGDEPENDS_LIBRARY) | ||
renv::restore( | ||
library = PKGDEPENDS_LIBRARY, | ||
lockfile = file.path(MODULES, "pkgdepends.lock"), | ||
clean = TRUE | ||
) | ||
|
||
if (.Platform$OS.type == "windows") { | ||
cat("Restoring junction handling library\n") | ||
options(renv.config.cache.symlinks = FALSE) | ||
setupRenv(JUNCTION_HANDLING_LIBRARY) | ||
renv::restore( | ||
library = JUNCTION_HANDLING_LIBRARY, | ||
lockfile = file.path(MODULES, "junctionBootstrap.lock"), | ||
clean = TRUE | ||
) | ||
} | ||
|
||
cat("Restoring jaspModuleInstaller\n") | ||
options(renv.config.cache.symlinks = TRUE) | ||
setupRenv(JASPMODULEINSTALLER_LIBRARY) | ||
renv::restore( | ||
library = JASPMODULEINSTALLER_LIBRARY, | ||
lockfile = file.path(ENGINE, "jaspModuleInstaller", "renv.lock"), | ||
exclude = "jaspModuleInstaller", # otherwise "clean" would remove jaspModuleInstaller | ||
clean = TRUE | ||
) | ||
|
||
print("Installing jaspModuleInstaller") | ||
.libPaths(JASPMODULEINSTALLER_LIBRARY) | ||
setupRenv("@R_LIBRARY_PATH@", modulePkg) | ||
|
||
record <- createLocalRecord(modulePkg, getModuleInfo(modulePkg), cacheAble = FALSE, addJaspToVersion = FALSE) | ||
lf <- renv::lockfile_read(file.path(modulePkg, "renv.lock")) | ||
lf <- renv::record(record, lockfile = lf) | ||
cat(".libPaths()", .libPaths(), sep = "\n") | ||
|
||
# remove the package if it is installed, otherwise renv doesn't realize we want to reinstall it | ||
pkgName <- basename(modulePkg) | ||
if (dir.exists(file.path(.libPaths()[1L], pkgName))) | ||
utils::remove.packages(pkgs = pkgName, lib = .libPaths()[1L]) | ||
|
||
renv::restore(lockfile = lf, library = .libPaths(), rebuild = pkgName) | ||
|
||
|
||
|
||
print("jaspModuleInstaller::writeModuleStatusObject(@PROJECT_SOURCE_DIR@") | ||
jaspModuleInstaller::writeModuleStatusObject("@PROJECT_SOURCE_DIR@") | ||
#This is necessary because of conflicts with Matrix dep of base R lib. | ||
#Can be removed when a new version of R updates its Matrix | ||
if (!@IS_FLATPAK_USED@) { | ||
|
||
if (Sys.info()["sysname"] == "Darwin") { | ||
options(pkgType = "source") | ||
} | ||
|
||
renv::install("Matrix", library = JASPMODULEINSTALLER_LIBRARY, prompt = FALSE) | ||
} | ||
|
||
# Converting the absolute symlinks to relative symlinks on macOS | ||
# Todo, I can do this using CMake like I do on Windows | ||
if (Sys.info()["sysname"] == "Darwin") { | ||
source('@MODULES_BINARY_PATH@/Tools/symlinkTools.R') | ||
convertAbsoluteSymlinksToRelative('@R_LIBRARY_PATH@', '@MODULES_RENV_CACHE_PATH@') | ||
} |
Oops, something went wrong.