| 16 | | TODO: Building instructions |
| | 16 | Steps: |
| | 17 | |
| | 18 | 1. Build libLAS C++ and C DLLs |
| | 19 | |
| | 20 | nmake /f makefile.vc |
| | 21 | |
| | 22 | or |
| | 23 | |
| | 24 | Open trunk/build/msvc80/liblas.sln in VS2005 or VS2008. Build the solution. Successfull build is required for only two projects: liblas_lib.vcproj and liblas_c_dll.vcproj. |
| | 25 | |
| | 26 | 2. Load trunk/csharp/dotnetLibLAS.sln in VS2005/2008 and build solution dotnetLibLAS dll. |
| | 27 | |
| | 28 | or |
| | 29 | |
| | 30 | Now, in order to build .NET bindings, one can do: |
| | 31 | |
| | 32 | 2.1. cd trunk/csharp |
| | 33 | 2.2. nmake -f makefile.vc |
| | 34 | |
| | 35 | To clean: |
| | 36 | |
| | 37 | 2.3. nmake -f makefile.vc clean |
| | 38 | |
| | 39 | To rebuild: |
| | 40 | |
| | 41 | 2.4. nmake -f makefile.vc rebuild |
| | 42 | |
| | 43 | This makefile is just a tiny proxy calling MSBuild which in turn |
| | 44 | builds the dotnetLibLAS.sln solution. Debug/Release builds is controlled by BUILD_DEBUG variable defined in nmake.opt. |
| | 45 | |
| | 46 | Notes: |
| | 47 | - To build dotnetLibLAS is not mandatory build the native C/C++ library but it is if you want use the .NET bindings. |
| | 48 | - dotnetLibLAS search liblas1.dll according the Dynamic-Link Library Search Order of Windows: |
| | 49 | http://msdn.microsoft.com/en-us/library/ms682586.aspx |
| | 50 | - If you try the HelloWorldLAS sample and you have a P/Invoke exception, perhaps is because the .NET bindings don`t find the native DLL. |
| | 51 | |
| | 52 | Register the dotnetLibLAS Assembly in the GAC in Windows/.NET and Unix/Mono |
| | 53 | ------------------------------------------------------------------------------ |
| | 54 | 1. Use the sn.exe tool to create a new key file in trunk/csharp/dotnetLibLAS: |
| | 55 | sn -k liblas.snk |
| | 56 | |
| | 57 | 2. Add your assembly to the GAC |
| | 58 | |
| | 59 | gacutil /i dotnetLibLAS.dll |
| | 60 | |
| | 61 | To uninstall this assembly from the GAC, use the command: |
| | 62 | |
| | 63 | 3. gacutil /u dotnetLibLAS |
| | 64 | |
| | 65 | Notes: |
| | 66 | - This operation is not recomended by now. Remember you need have the Native DLL install in your computer. |
| | 67 | - If your path environment variables aren't set, you'll have to go to the C:\Program Files\Microsoft.NET\FrameworkSDK\Bin\ directory to run sn.exe |
| | 68 | |
| | 69 | Run the test |
| | 70 | ------------------------------------------------------------------------------ |
| | 71 | dotnetLibLAS use the NUNIT library to testing: |
| | 72 | http://www.nunit.org/index.php |
| | 73 | |
| | 74 | Steps to run the test: |
| | 75 | |
| | 76 | 1. Download the last NUNIT version: |
| | 77 | http://prdownloads.sourceforge.net/nunit/NUnit-2.4.8-net-2.0.msi?download |
| | 78 | |
| | 79 | 2. Install NUNIT in your computer to have the NUNIT assembly and the NUNIT applications to run the test. |
| | 80 | |
| | 81 | 3. Open the NUNIT test project from trunk/csharp/dotnetLibLAS/NUnitTest |
| | 82 | |
| | 83 | 3. Update the nunit.dll reference in the properties of the project. |
| | 84 | |
| | 85 | or |
| | 86 | |
| | 87 | if you have problems delete nunit.dll reference and add it. Previous NUNIT intallation installed nunit.dll in the GAC for you. |
| | 88 | |
| | 89 | 4. From Windows Start Menu\Programs menu open the NUnit Gui Runner application. |
| | 90 | http://www.nunit.org/index.php?p=nunit-gui&r=2.4.8 |
| | 91 | |
| | 92 | or |
| | 93 | |
| | 94 | use the NUnit-Console applications instead: |
| | 95 | http://www.nunit.org/index.php?p=nunit-console&r=2.4.8 |
| | 96 | |
| | 97 | 5. Run the test of this assembly: |
| | 98 | trunk/csharp/csharp/NUnitTest/bin/release/NUnitTest.dll |