From 3b8e2070bf6aec289cdb6a8c49fbca3276e786fa Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Mon, 11 Apr 2016 15:44:31 +0100 Subject: [PATCH] Add RInside Developer Instructions ... see doc/user/RInside.txt --- doc/user/RInside.txt | 51 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 doc/user/RInside.txt diff --git a/doc/user/RInside.txt b/doc/user/RInside.txt new file mode 100644 index 000000000..7fcb37e80 --- /dev/null +++ b/doc/user/RInside.txt @@ -0,0 +1,51 @@ +Quick guide for developers on getting RInside built +and installed to integrate with GoldenCheetah + +Make sure you have a working GC build already. + +1. install R + +2. install Rcpp + +R> install.packages("Rcpp") +R> q() + +3. install RInside with callback enabled + +$ cd ~ +$ mkdir temp +$ cd temp +$ git clone https://github.com/eddelbuettel/rinside.git RInside +$ vi RInside/inst/include/RInsideConfig.h + +we use vi, but use an editor of your choice +uncomment the line from: +// #define RINSIDE_CALLBACKS + +to look like this: +#define RINSIDE_CALLBACKS + +$ R CMD INSTALL RInside + +The package is now installed and available to embed +within GC, so we can now just delete the temp directory +and contents we just created: + +4. cd .. +5. rm -rf temp + +Now we can build GC with R enabled: + +6. cd +7. vi gcconfig.pri + +we use vi, but use an editor of your choice +add the line: + +DEFINES += GC_WANT_R + +8. qmake +9. make + +All should be good. If its working help>about>version +should show the version of R that is embedded.