Skip to content

Commit

Permalink
Merge branch 'windows_staticlib' of github.com:nimble-dev/nimble into…
Browse files Browse the repository at this point in the history
… windows_staticlib
  • Loading branch information
duncantl committed Jul 11, 2016
2 parents c964e3f + e49e8d3 commit 9cfdc72
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 6 deletions.
8 changes: 8 additions & 0 deletions packages/RELEASE_INSTRUCTIONS
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ git push --tags ## this is how you push *tags* to the remote
before release to CRAN put "$FLIBS" at end of last line in src/Makevars.in
and comment out rstan usage as in cran_0.5 branch on CJP machine

### building binaries

make sure there is no libnimble.{a,dylib,so} in inst/CppCode or it will be copied over and interfere with the libnimble created during the build process

### Building of Windows version (instructions from DT)

put this in build.bat:
Expand All @@ -105,4 +109,8 @@ if you're in the directory with the batch file (build.bat), then just type "buil

Not clear (should check with DTL) if the resulting installed package can then simply be zipped and if that is equivalent to what CRAN does when it builds the Windows binary.

# Or, Duncan's instructions to Dao

R CMD build nimble # to build tar.gz
R CMD INSTALL --build --merge-multiarch nimble_0.6.tar.gz # to build zip file

43 changes: 41 additions & 2 deletions packages/nimble/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,47 @@
# UNIX

One can specify the path to where the Eigen header files are located
and also whether to link common C++ files into every DSO/DLL we create
or whether to treat the files as an extra library with:

R CMD INSTALL . --configure-args='--with-eigen=/home/duncan/local --enable-lib'
```
R CMD INSTALL --configure-args='--with-eigen=/home/duncan/local --enable-lib' nimble
```
or, within R
```
install.packages("nimble", configure.args = c("--with-eigen=/home/duncan/local", "--enable-lib=true"), repos = NULL)
```

install.packages(".", configure.args = c("--with-eigen=/home/duncan/local", "--enable-lib=true"), repos = NULL)

# Windows

Typically, you need the R developer tools (i.e., compiler, make, etc.) to use nimble.
Accordingly, it is quite straightforward to install the package from source as you will have the necessary tools
already installed. These are available from the [Rtools](https://cran.r-project.org/bin/windows/Rtools/) page on CRAN.

To install the package from source, from within R,
```r
install.packages("nimble", type = "source", INSTALL_opts = "--merge-multiarch")
```
or from a local copy of the source package,
```
install.packages("nimble_0.6.tar.gz", repos = NULL, INSTALL_opts = "--merge-multiarch")
```
Alternatively, use the shell command (in the DOS Command prompt)
```
R CMD INSTALL --merge-multiarch nimble_0.6.tar.gz
```
Of course, you can also compile directly from a clone of the git repository:
```
R CMD INSTALL --merge-multiarch nimble
```

The --merge-multiarch is necessary when using a version of R that supports both 32 and 64 bit.
This option to installation will ensure that create both 32 and 64 bit installations.

## Creating a Windows Binary
```
R CMD build nimble
R CMD INSTALL --build --merge-multiarch nimble_0.6.tar.gz
```
We need to create the .tar.gz file first, hence the first command.
3 changes: 2 additions & 1 deletion packages/nimble/inst/CppCode/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.a
*.o
*.so
Makevars
*.dylib
Makevars
4 changes: 2 additions & 2 deletions packages/nimble/inst/CppCode/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ libnimble$(DYLIB_EXT): $(OBJECTS)
#clean:
# -rm $(OBJECTS) libnimble$(DYLIB_EXT) libnimble$(ARCH_SUFFIX).a


libnimble32.a libnimble64.a libnimble_x64.a libnimble_i386.a: $(OBJECTS)
# libnimble32.a libnimble64.a
libnimble.a libnimble_x64.a libnimble_i386.a: $(OBJECTS)
echo "Making nimble $@"
echo "$(OBJECTS)"
$(AR) rcs $@ $(OBJECTS)
Expand Down
2 changes: 1 addition & 1 deletion packages/testNimblePkgBinary
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if ! test -d RTempLib ; then
fi

CONFIG_ARGS="'--enable-lib=false'"
R CMD INSTALL -lRTempLib --configure-args="$CONFIG_ARGS" --build ../nimble
R CMD INSTALL --configure-args="$CONFIG_ARGS" --build ../nimble

GZ=`ls nimble_*gz`
echo "** Installing nimble binary package $GZ"
Expand Down

0 comments on commit 9cfdc72

Please sign in to comment.