Generating Your Own Wrapper
Currently only generating a wrapper from a ROOT distribution is supported.
So, if you have some extra objects you've put into a TTree, generation isn't
support. Clearly a shortcoming.
To test that the generation works, I setup a machine as follows. I'm sure
other versions of the OS/tools would also work, but this is what I tested on:
- Windows Vista, Business edition.
- Visual C++/Visual Studio 2005, Professional. I'm pretty sure the free Express editions
won't work for this (though you should be able to use the wrappers there
just fine). However, I've not tested - it could work!
- All updates from Windows Update (which includes some for VS2005).
For CVS access I used Tortoisecvs
(version 1.8.31). However, if you want you can just
grab the ZIP file of the download and use that instead (see below). For
versions prior to v1.1, see the older
instructions.
Do the following to build a new version of the wrapper.
- Download and install ROOT. For this test I did
5.16/00, a stable
production release. I used the VC++ 8.0 version (you have to match versions
that ROOT was built with!!). I downloaded the tar file.
- Make sure that c:\root\bin (or whatever) is part of the PATH variable. I have
found that if you install ROOT as an administrator but then log in as
another user you won't have this!
- MAKE sure you download the VS2005 version of ROOT (only available in
the tar file). This is because the VS2003 and 2005 versions are not
compatible!!
- The ROOT directory name cannot have any spaces in it!
- Download the Wrapper and Wrapper Generators modules of ROOT.NET
- Get them from the
ZIP file that has been uploaded
(easy).
- Get them directly from
sourceforge cvs.
If you do this, create a folder called "ROOT.NET". In that folder
download the "Wrappers" and "Wrapper Generators" module (and the Tests
if you like). The names must not be changed -- they are hard coded into
some of the build code.
- Start a Visual Studio 2005 Command Prompt -- this can be found in
the MSVC 2005 -> Tools menu under the Start menu.
- cd to the Wrapper Generators directory.
- Enter the following command to build everything:
DoEverythingAtOnce\BuildROOTWrappers %ROOTSYS% rootout
You can replace %ROOTSYS% with the directory where ROOT is installed if
you like. rootout will be the name of the subdirectory under the Wrappers
directory where you can find the result.
- Copy the files from the new Wrappers/rootout/release directory over to where you'd
like to keep the .NET wrapper library. Everything else can now be deleted!