Skip to content

Commit

Permalink
Update instructions; make search/replace for binary references optionsl
Browse files Browse the repository at this point in the history
  • Loading branch information
jmp75 committed Oct 11, 2013
1 parent 996a6f7 commit f285e19
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 8 deletions.
8 changes: 8 additions & 0 deletions Binaries/Readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

This folder is where the C# projects expect the following R.NET libraries to be:

- RDotNet.NativeLibrary.dll
- RDotNet.dll

See the file REAMDE.md in the parent directory

4 changes: 2 additions & 2 deletions HelloWorld/HelloWorld.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="RDotNet">
<HintPath>..\..\..\..\bin\R.NET\1.5.5\RDotNet.dll</HintPath>
<HintPath>..\Binaries\RDotNet.dll</HintPath>
</Reference>
<Reference Include="RDotNet.NativeLibrary">
<HintPath>..\..\..\..\bin\R.NET\1.5.5\RDotNet.NativeLibrary.dll</HintPath>
<HintPath>..\Binaries\RDotNet.NativeLibrary.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion RDotNetSetup/SetupHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static void SetupPath()
{
var oldPath = System.Environment.GetEnvironmentVariable("PATH");

var rPath = System.Environment.Is64BitProcess ? @"C:\Program Files\R\R-3.0.1\bin\x64" : @"C:\Program Files\R\R-3.0.1\bin\i386";
var rPath = System.Environment.Is64BitProcess ? @"C:\Program Files\R\R-3.0.2\bin\x64" : @"C:\Program Files\R\R-3.0.2\bin\i386";

if (Directory.Exists(rPath) == false)
throw new DirectoryNotFoundException(string.Format("Could not found the specified path to the directory containing R.dll: {0}", rPath));
Expand Down
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,21 @@ Installation

* Clone (and fork if you wish) this repository with your git client. You can also use GitHub's "Download ZIP" in the bottom right hand corner.
* The solution and project files were authored with Visual Studio 2012 Express Desktop edition. You should be able to read them with VS2010 and monodevelop, but I have not tested.
* Most of the .csproj files have referenced to the compiled R.NET*.dll, as shown below. To localize this to your own system, I'd recommend you use a decent text editor, which if decent should have handy capabilities to replace in files. If you are lacking an editor I recommend [Notepad++](http://notepad-plus-plus.org) for Windows. Of course, you can update the references the manual way via visual studio: your call.
* Most of the .csproj files have references to pre-compiled .NET binaries RDotNet.dll and RDotNet.NativeLibrary.dll, expected to be in the folder named "Binaries". You can:
** Either copy these to the Binaries folder
** or localize this to your own system, I'd recommend you use a decent text editor, which if decent should have handy capabilities to replace in files. If you are lacking such an editor I recommend [Notepad++](http://notepad-plus-plus.org) for Windows. Of course, you can update the references the manual way via visual studio: your call.

The Csharp project files contain the following references by default:
```xml
<Reference Include="RDotNet">
<HintPath>..\Binaries\RDotNet.dll</HintPath>
</Reference>
<Reference Include="RDotNet.NativeLibrary">
<HintPath>..\Binaries\RDotNet.NativeLibrary.dll</HintPath>
</Reference>
```

So you can do a search and replace on the string "..\Binaries" in all the files "*.csproj" and replace with the path of your choice, e.g.:
```xml
<Reference Include="RDotNet">
<HintPath>..\..\..\..\bin\R.NET\1.5.5\RDotNet.dll</HintPath>
Expand All @@ -18,3 +31,13 @@ Installation
<HintPath>..\..\..\..\bin\R.NET\1.5.5\RDotNet.NativeLibrary.dll</HintPath>
</Reference>
```

Getting started
-------------

Open the solution OnboardRDotNet.sln with a "recent" version of visual studio or MonoDevelop (Xamarin Studio)
You may want to look at and experiment with the projects in the following order:
* HelloWorld
* Sample1 is taken from the R.NET web site, a simple statistical T-test
* Sample2 is mostly for issues diagnosis at this stage
* Tutorial1: To Be Determined
4 changes: 2 additions & 2 deletions Sample1/Sample1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="RDotNet">
<HintPath>..\..\..\..\bin\R.NET\1.5.5\RDotNet.dll</HintPath>
<HintPath>..\Binaries\RDotNet.dll</HintPath>
</Reference>
<Reference Include="RDotNet.NativeLibrary">
<HintPath>..\..\..\..\bin\R.NET\1.5.5\RDotNet.NativeLibrary.dll</HintPath>
<HintPath>..\Binaries\RDotNet.NativeLibrary.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
4 changes: 2 additions & 2 deletions Sample2/Sample2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="RDotNet">
<HintPath>..\..\..\..\bin\R.NET\1.5.5\RDotNet.dll</HintPath>
<HintPath>..\Binaries\RDotNet.dll</HintPath>
</Reference>
<Reference Include="RDotNet.NativeLibrary">
<HintPath>..\..\..\..\bin\R.NET\1.5.5\RDotNet.NativeLibrary.dll</HintPath>
<HintPath>..\Binaries\RDotNet.NativeLibrary.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down

0 comments on commit f285e19

Please sign in to comment.