Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ echo " JAVA_HOME=$JAVA_HOME"

echo "JAVA_HOME:=$JAVA_HOME" > src/Makevars.java

if [ -e jri/configure.win ]; then
if [ -e src/jri/configure.win ]; then
echo "=== Building JRI ==="
CONFIGURED=1
export CONFIGURED
Expand All @@ -33,21 +33,21 @@ if [ -e jri/configure.win ]; then
export R_HOME
export RHOME
export JAVA_HOME
cd jri
cd src/jri
sh configure.win
make
BR=$?
cd ..
cd ../..
if [ $BR = 0 ]; then
echo "=== JRI built ==="
mkdir -p inst/jri
# also copy into R_ARCH is present to avoid overwriting different archs
if [ -n "${R_ARCH}" ]; then
mkdir -p inst/jri${R_ARCH}
cp jri/src/jri.dll inst/jri${R_ARCH}/
cp src/jri/src/jri.dll inst/jri${R_ARCH}/
fi
# yet still install into JRI in case users get confused
cp -r jri/run.bat jri/src/jri.dll jri/src/JRI.jar jri/examples inst/jri/
cp -r src/jri/run.bat src/jri/src/jri.dll src/jri/src/JRI.jar src/jri/examples inst/jri/
else
echo "**** WARNING: JRI could NOT be built" >&2
if [ -z "$IGNORE" ]; then
Expand Down
9 changes: 9 additions & 0 deletions src/jri/src/Rdecl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@

#include <Rversion.h>

/* Rinterface.h is not available on Windows */
#ifndef Win32
#define R_INTERFACE_PTRS 1
#define CSTACK_DEFNS 1
#include <Rinterface.h> /* R_ReadConsole since 4.6.0 */
#endif

/* some have been added to R 4.6.0 */
#if R_VERSION >= R_Version(4,6,0)
#include <Rembedded.h> /* run_Rmainloop (since 4.6.0), Rf_initialize_R (since 2.4.0) */

/* required on Windows (since 4.6.0) */
#ifdef Win32
int R_ReadConsole(const char *, unsigned char *, int, int);
#endif

#else
void run_Rmainloop(void); /* main/main.c */
int R_ReadConsole(char*, unsigned char*, int, int); /* include/Defn.h */
Expand Down
Loading