[Liblas-devel] Building .NET bindings

Martin Vales martinvales00 at gmail.com
Wed Oct 8 16:52:00 EDT 2008


2008/10/8 Mateusz Łoskot <mateusz at loskot.net>

> Martin,
>
> I can't find any instructions on the Wiki or README file in the source tree
> about how to build .NET bindings.

Yes you are right. I need ad support for build the bindings.

>
>
> Could you please give me the list of steps needed to build .NET
> bindings using Visual Studio 2005/2008 ?

sure. This bindings are build acording most engineering apps in .NET.

In .NET people can create solutions. Solutions can manage several projects
inside (it´s the same that netbeans for c++). In the trunk i add a solution
and several folders. In that folder i add projects. If you open the solution
you can see all projects on your right hand (like in visual c++). One
project is the liblasdotnet bindings. Other project is the hello world (I
will add more project with samples). Other project is the NUNIT test.

In a solution you need set some projects like the main project. In my case i
have the hello world app like the main app (perhaps dont work for you
because i read a las file in my computer.).

.NET project have references. Hello world app have liblasdotnet like
reference. NUNIT test have NUnit and libladotnet like references. If you
make changes in the liblasdotnet project and you compile the visual studio
magically copy the update DLL to all projects.

Here MSBuild help i a lot i think.
http://www.monodevelop.com/Release_notes_for_MonoDevelop_2.0_Alpha_1#MSBuild_File_format
MSBuild is like NMAKE but for .NET.
Now MSBuild is the default build system for visual studio and monodevelop.


Visual studio for .NET by default create a debug and release folder for
every project. If you run the app you compile in the debug folder.
If you want build a release version you need build the solution in the build
button.

....

Now the problems come.

Usually in .NET references are add magically to the projects. but native
libraries not. This is not a common problem because
if you call to the winapi for example you know that libraries in the system,
but liblas.dll not.
Therefore i think osgeo need choose a path in windows for all DLLs.
With nsis would be really easy add this. GTK people choose the c:\path\bin.
If you install some of the releases of GTK for windows you can see it:
http://gladewin32.sourceforge.net/
GTK installer use NSIS like emule, ruby, etc...

___

In my case by now  i copy the liblas.DLL to all folders by hand. Perhaps we
have some option in visual studio for that, but i don´t find it by now.


The unit test need be used for NUNIT tools:
http://www.nunit.org/index.php?p=nunit-console&r=2.4.7
http://www.nunit.org/index.php?p=nunit-gui&r=2.4.7
NUNIT have a nice installer for windows.


Now the GAC.

In my job i use several references installed in the GAC. every widget in the
windows forms for example is a dll installed in the gac.
If you go to the add reference window you have a .NET, COM and local option.
In the .NET tab you can find the .NET dll installed in the GAC. Esri for
example install all .NET stuff there. In the COM tab you have the COM
references used in vb6,... In local you can find a .NET DLL from the disk.
By now this is the method i have.

If you go to the references properties added in a project you can see you
can tell visual studio make a copy to the system. By default
basic .NET components not be copied to the system. All people have have .NET
have windows forms in the GAC..., but in bentley, esri, autodesk references
you need copied to the projects, because yoour clientes don´t have that .NET
dlls or not what you want.
For example:
If you need create a Autocad .NET app you need do this:
Create a project for autocad 2004,2005 and 2006 need you add the 2006
component.
Create a project for autocad 2007 and 2008 need you add the 2008 component.
In the last case for example if a user only have autocad 2007 in the
computer only have the 2007 component...

To add assemblies to the GAC you have the console gacutils.



>
> To summarize, I have Windows XP + Visual Studio 2005 Pro (both VC++ and VC#
> compilers installed). What should I do to build the .NET bindings?

The solution is for the  Visual Studio 2005 xpress and therefore i hope
works for you.

>
>
> Could you help me?


I hope had help you a little. My spanglish really sucks.

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/liblas-devel/attachments/20081008/d1337e74/attachment.html


More information about the Liblas-devel mailing list