Making a program that uses Physx/NxOgre, portable?

jonnys

28-09-2008 21:23:58

When using another physics library like ODE or Newton, all you need to make the program run on a computer without the redistributable files for the library installed are, their respective .dll files (e.g ODE or Newton.dll).

Is this possible for NxOgre, as I would like to show someone a program I made with NxOgre, on a computer without administrator privileges, so I cant install the Physx redistributable.

Is there away I can include the dlls with a program(in the executable's folder) that uses Physx to make it run on any computer?

betajaen

28-09-2008 22:23:27

NxOgre/Ogre can be compiled into one application via static linking; an example of this is flour. I believe you do need two visual studio dll's, which need a manifest or some sort of installer (again I used the Wix installer which handles this for me) - you may be able to get away with them being in the same folder as your executable.

As for PhysX; If you can write to the registry (under a standard user - I don't know if this is possible or not) - you may be able to fool NxOgre/PhysX into thinking that PhysX is installed. Basically copy the DLL's out of the PhysX Game installer from the nVidia website, backup your registry entries for PhysX, and copy everything over to the new computer and insert those registry entries with regedit.

I know this sounds patchy and probably won't work. But it's worth a shot, I think the biggest problem is fooling PhysX in thinking it is installed - as long as PhysXLoader.dll can PhysXCore.dll, PhysXCooking.dll and a few other things, you should be good to go.

syedhs

28-09-2008 22:42:03

I think that is possible. It involves tinkering with windows registry, for which you can use utility like RegMon to sniff out the registry values queried.

betajaen

28-09-2008 22:45:06

I think this is the important one:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\AGEIA Technologies\PhysX Core Path

I'd export the values around it too.