Compiling without SDK installation

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
mchristen
Posts: 3
Joined: Mon Apr 02, 2007 11:59 am

Compiling without SDK installation

Post by mchristen »

We are a small development team and not everyone has a space mouse or the SDK installed. Our philosophy is check out the code and compile and it works, we don't want to depend on 3rd party INSTALLATIONS.

My problem is that the line
#import "progid:TDxInput.Device.1" no_namespace
seems to require a 3d connexion SDK installation. Other developers in my team who don't have a space navigator can't compile anymore!

Is there a way to make this import available to all developers without installing the SDK (in the way of simply copying something to our trunk).


--Martin
jwick
Moderator
Moderator
Posts: 3341
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

Hi Martin,

You can try copying TDxInput.dll from a machine that has 3DxSoftware installed, to the other machines and run regsvr32 on it.

Jim
3Dx Software Development
mchristen
Posts: 3
Joined: Mon Apr 02, 2007 11:59 am

Post by mchristen »

Thanks for the info. I'm not very happy with this solution, but it is worth trying.

So basically I would have to check in TDxInput.dll and create a custom build step registering it with regsvr32, but how about Open Source projects with public access, wouldn't it be a problem distributing TDxInput.dll ?

I would prefer to use the old (non COM) API again, but I guess it is no longer officially supported.
mchristen
Posts: 3
Joined: Mon Apr 02, 2007 11:59 am

Solved

Post by mchristen »

Thanks to gjaegy for the idea:

the #import generates two files TDxInput.tlh and TDxInput.tli

Once those files are created simply replace the #import with #include "TDxInput.tlh". Make sure to modify the last time because there is an #include with an absolute path to TDxInput.tli

Now I can simply check in both TDxInput.tlh and TDxInput.tli and it compiles on all machines.

Martin
ngomes
Moderator
Moderator
Posts: 3344
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Hi mchristen,
In these situations, my approach has been to use the #import directive to point to a file (the TDxInput.dll) rather that use the progid qualifier (which requires the DLL to be registered). You can keep the DLL on your source code management software.
Nuno Gomes
maqcs
Posts: 1
Joined: Wed Jul 18, 2007 12:30 am

Create a wrapper

Post by maqcs »

Hi,

We had the same problem, and the way we got around this was to develop a simple DLL that communicated with COM objects, and exported several "C" functions.

This way we could dynamicly load the dll (GetProcAddress not using the import library) if it was available, and setup a callback for movement and button clicks. The rest of the developers did not have the SDK installed, and just used/copied the wrapper dll to their machines if they wanted to use a SpaceMouse. Also the wrapper dll can be used in any of our other applications quite easily, and they only have to implement callback functions to decide how to process movement and buttons.

Mike.
Post Reply