Re: [osg-users] OSG deployment on Windows

2014-09-25 Thread Émeric MASCHINO
OK, this is now clear with what Farshid also explained me in the other post.

Thanks,

 Émeric


2014-09-24 22:29 GMT+02:00 Chris Hanson xe...@alphapixel.com:
 I just move the osgPlugins folder into the folder where the executable and
 top-level OSG DLLs are found. All seems to work without any fuss.

 On Wed, Sep 24, 2014 at 1:04 PM, Émeric MASCHINO emeric.masch...@gmail.com
 wrote:

 Hi Chris,

 Are you then also putting the required plug-ins in the same folder and
 no more in a separate osgPlugins-X.Y.Z folder?

 Cheers,

  Émeric


 2014-09-24 19:59 GMT+02:00 Chris Hanson xe...@alphapixel.com:
  I deploy my applications with their own local copy of OSG in the same
  folder
  as the main application executable. I typically have a dozen different
  versions and flavors of OSG on my computer at once so OSG_ROOT becomes
  irrelevant.
 
  On Wed, Sep 24, 2014 at 11:39 AM, Émeric MASCHINO
  emeric.masch...@gmail.com wrote:
 
  Hi Farshid,
 
  Correct, but what about the plug-ins and examples? They aren't
  installed in OSG_ROOT\bin. So if you only copy the DLLs in
  OSG_ROOT\bin, when trying to load a plug-in (installed in
  OSG_ROOT\bin\osgPlugins-X.Y.Z) or running an example (installed in
  OSG_ROOT\shared\OpenSceneGraph\bin) that requires an external DLL,
  this last one will thus be searched in the PATH, with the risk of
  finding a similarly named DLL elsewhere in the filesystem before
  reaching the expected on in OSG_ROOT\bin. How do you manage this
  situation on your own?
 
  Cheers,
 
   Émeric
 
 
  2014-09-24 19:12 GMT+02:00 Farshid Lashkari fla...@gmail.com:
   Hi Émeric,
  
   Placing the external libraries in OSG_ROOT\bin should work as long as
   the
   main executable is also in OSG_ROOT\bin. Windows should first search
   for
   DLLs in the same folder as the executable before searching in PATH.
   So
   there
   is no need to add your application to PATH, or worry about
   conflicting
   DLLs
   in PATH. I've deployed my application like this for years and never
   had
   any
   issues.
  
   Cheers,
   Farshid
  
  
   On Wed, Sep 24, 2014 at 10:03 AM, Émeric MASCHINO
   emeric.masch...@gmail.com wrote:
  
   Hi,
  
   What's the best practice regarding OSG deployment on Windows?
   Indeed,
   several plug-ins depend on external libraries. Is it best to put the
   required DLLs in OSG_ROOT\bin\osgPlugins-X.Y.Z or rather in
   OSG_ROOT\bin, thus ensuring that OSG_ROOT\bin is in the PATH so that
   the plug-ins can find them?
  
   With this last approach, there's only one copy of each DLL shared by
   the OSG applications, plug-ins and examples. The drawback is that if
   a
   similarly named DLL is found in the PATH before reaching
   OSG_ROOT\bin,
   an incorrect DLL may be loaded.
  
   By contrast, copying the required DLLs in
   OSG_ROOT\bin\osgPlugins-X.Y.Z may also require copying them in
   OSG_ROOT\bin as well as in OSG_ROOT\share\OpenSceneGraph\bin.
  
   Any advice on what's better?
  
Émeric
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
  
  
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
  
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
  
  
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
 
  --
  Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
  http://www.alphapixel.com/
  Training • Consulting • Contracting
  3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL
  4 •
  GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
  Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
  Cryptography
  • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
  Android
  @alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




 --
 Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
 http://www.alphapixel.com/
 Training • Consulting • Contracting
 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
 GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
 Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
 • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
 Android
 @alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

 ___
 osg-users 

Re: [osg-users] OSG deployment on Windows

2014-09-25 Thread Judson Weissert

Hi Émeric

On 9/24/2014 1:03 PM, Émeric MASCHINO wrote:

Hi,

What's the best practice regarding OSG deployment on Windows? Indeed,
several plug-ins depend on external libraries. Is it best to put the
required DLLs in OSG_ROOT\bin\osgPlugins-X.Y.Z or rather in
OSG_ROOT\bin, thus ensuring that OSG_ROOT\bin is in the PATH so that
the plug-ins can find them?


I load all of the DLLs I need related to OSG at application startup 
(using a specific path and LoadLibrary()), and then call 
osgDB::Registry::instance ()-setLibraryFilePathList (std::string ());


See osgDB::appendPlatformSpecificLibraryFilePaths() for the list of 
paths that would otherwise be searched without the function call 
mentioned above.


Obviously, this comes at a cost since you have to know which DLLs to 
preload ahead of time.


Regards,

Judson
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG deployment on Windows

2014-09-24 Thread Émeric MASCHINO
Hi,

What's the best practice regarding OSG deployment on Windows? Indeed,
several plug-ins depend on external libraries. Is it best to put the
required DLLs in OSG_ROOT\bin\osgPlugins-X.Y.Z or rather in
OSG_ROOT\bin, thus ensuring that OSG_ROOT\bin is in the PATH so that
the plug-ins can find them?

With this last approach, there's only one copy of each DLL shared by
the OSG applications, plug-ins and examples. The drawback is that if a
similarly named DLL is found in the PATH before reaching OSG_ROOT\bin,
an incorrect DLL may be loaded.

By contrast, copying the required DLLs in
OSG_ROOT\bin\osgPlugins-X.Y.Z may also require copying them in
OSG_ROOT\bin as well as in OSG_ROOT\share\OpenSceneGraph\bin.

Any advice on what's better?

 Émeric
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG deployment on Windows

2014-09-24 Thread Farshid Lashkari
Hi Émeric,

Placing the external libraries in OSG_ROOT\bin should work as long as the
main executable is also in OSG_ROOT\bin. Windows should first search for
DLLs in the same folder as the executable before searching in PATH. So
there is no need to add your application to PATH, or worry about
conflicting DLLs in PATH. I've deployed my application like this for years
and never had any issues.

Cheers,
Farshid


On Wed, Sep 24, 2014 at 10:03 AM, Émeric MASCHINO emeric.masch...@gmail.com
 wrote:

 Hi,

 What's the best practice regarding OSG deployment on Windows? Indeed,
 several plug-ins depend on external libraries. Is it best to put the
 required DLLs in OSG_ROOT\bin\osgPlugins-X.Y.Z or rather in
 OSG_ROOT\bin, thus ensuring that OSG_ROOT\bin is in the PATH so that
 the plug-ins can find them?

 With this last approach, there's only one copy of each DLL shared by
 the OSG applications, plug-ins and examples. The drawback is that if a
 similarly named DLL is found in the PATH before reaching OSG_ROOT\bin,
 an incorrect DLL may be loaded.

 By contrast, copying the required DLLs in
 OSG_ROOT\bin\osgPlugins-X.Y.Z may also require copying them in
 OSG_ROOT\bin as well as in OSG_ROOT\share\OpenSceneGraph\bin.

 Any advice on what's better?

  Émeric
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG deployment on Windows

2014-09-24 Thread Émeric MASCHINO
Hi Farshid,

Correct, but what about the plug-ins and examples? They aren't
installed in OSG_ROOT\bin. So if you only copy the DLLs in
OSG_ROOT\bin, when trying to load a plug-in (installed in
OSG_ROOT\bin\osgPlugins-X.Y.Z) or running an example (installed in
OSG_ROOT\shared\OpenSceneGraph\bin) that requires an external DLL,
this last one will thus be searched in the PATH, with the risk of
finding a similarly named DLL elsewhere in the filesystem before
reaching the expected on in OSG_ROOT\bin. How do you manage this
situation on your own?

Cheers,

 Émeric


2014-09-24 19:12 GMT+02:00 Farshid Lashkari fla...@gmail.com:
 Hi Émeric,

 Placing the external libraries in OSG_ROOT\bin should work as long as the
 main executable is also in OSG_ROOT\bin. Windows should first search for
 DLLs in the same folder as the executable before searching in PATH. So there
 is no need to add your application to PATH, or worry about conflicting DLLs
 in PATH. I've deployed my application like this for years and never had any
 issues.

 Cheers,
 Farshid


 On Wed, Sep 24, 2014 at 10:03 AM, Émeric MASCHINO
 emeric.masch...@gmail.com wrote:

 Hi,

 What's the best practice regarding OSG deployment on Windows? Indeed,
 several plug-ins depend on external libraries. Is it best to put the
 required DLLs in OSG_ROOT\bin\osgPlugins-X.Y.Z or rather in
 OSG_ROOT\bin, thus ensuring that OSG_ROOT\bin is in the PATH so that
 the plug-ins can find them?

 With this last approach, there's only one copy of each DLL shared by
 the OSG applications, plug-ins and examples. The drawback is that if a
 similarly named DLL is found in the PATH before reaching OSG_ROOT\bin,
 an incorrect DLL may be loaded.

 By contrast, copying the required DLLs in
 OSG_ROOT\bin\osgPlugins-X.Y.Z may also require copying them in
 OSG_ROOT\bin as well as in OSG_ROOT\share\OpenSceneGraph\bin.

 Any advice on what's better?

  Émeric
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG deployment on Windows

2014-09-24 Thread Chris Hanson
I deploy my applications with their own local copy of OSG in the same
folder as the main application executable. I typically have a dozen
different versions and flavors of OSG on my computer at once so OSG_ROOT
becomes irrelevant.

On Wed, Sep 24, 2014 at 11:39 AM, Émeric MASCHINO emeric.masch...@gmail.com
 wrote:

 Hi Farshid,

 Correct, but what about the plug-ins and examples? They aren't
 installed in OSG_ROOT\bin. So if you only copy the DLLs in
 OSG_ROOT\bin, when trying to load a plug-in (installed in
 OSG_ROOT\bin\osgPlugins-X.Y.Z) or running an example (installed in
 OSG_ROOT\shared\OpenSceneGraph\bin) that requires an external DLL,
 this last one will thus be searched in the PATH, with the risk of
 finding a similarly named DLL elsewhere in the filesystem before
 reaching the expected on in OSG_ROOT\bin. How do you manage this
 situation on your own?

 Cheers,

  Émeric


 2014-09-24 19:12 GMT+02:00 Farshid Lashkari fla...@gmail.com:
  Hi Émeric,
 
  Placing the external libraries in OSG_ROOT\bin should work as long as the
  main executable is also in OSG_ROOT\bin. Windows should first search for
  DLLs in the same folder as the executable before searching in PATH. So
 there
  is no need to add your application to PATH, or worry about conflicting
 DLLs
  in PATH. I've deployed my application like this for years and never had
 any
  issues.
 
  Cheers,
  Farshid
 
 
  On Wed, Sep 24, 2014 at 10:03 AM, Émeric MASCHINO
  emeric.masch...@gmail.com wrote:
 
  Hi,
 
  What's the best practice regarding OSG deployment on Windows? Indeed,
  several plug-ins depend on external libraries. Is it best to put the
  required DLLs in OSG_ROOT\bin\osgPlugins-X.Y.Z or rather in
  OSG_ROOT\bin, thus ensuring that OSG_ROOT\bin is in the PATH so that
  the plug-ins can find them?
 
  With this last approach, there's only one copy of each DLL shared by
  the OSG applications, plug-ins and examples. The drawback is that if a
  similarly named DLL is found in the PATH before reaching OSG_ROOT\bin,
  an incorrect DLL may be loaded.
 
  By contrast, copying the required DLLs in
  OSG_ROOT\bin\osgPlugins-X.Y.Z may also require copying them in
  OSG_ROOT\bin as well as in OSG_ROOT\share\OpenSceneGraph\bin.
 
  Any advice on what's better?
 
   Émeric
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG deployment on Windows

2014-09-24 Thread Farshid Lashkari
Hi Émeric,

I'm assuming OSG_ROOT refers to the install folder of your OSG based
application. The plug-ins should go into OSG_ROOT\bin\osgPlugins-X.Y.Z. OSG
will automatically prepend the osgPlugins-X.Y.Z\ path when attempting to
load osgdb_*.dll plugins.

For example, let's say I install my application into the C:\MyApp\
folder. Here is how I organize the files:

C:\MyApp\bin\ contains:
 - Executables (.exe)
 - OSG library files (osg.dll, osgDB.dll, osgUtil.dll, ...)
 - External dependencies (zlib1.dll, libxml2.dll, ...)

C:\MyApp\bin\osgPlugins-X.Y.Z\ contains:
 - All OSG reader/writer plugins (osgdb_*.dll)

Any executable launched from the C:\MyApp\bin\ folder, will automatically
load dependencies from that folder before searching PATH. When attempting
to load a reader/writer plugin, OSG will automatically look in 
C:\MyApp\bin\osgPlugins-X.Y.Z\. If any of those plugins have external
dependencies, they will be loaded from C:\MyApp\bin\, before searching in
PATH.

This should allow multiple OSG based applications using different versions
to be installed on the system without conflicts.

Hope this clears it up.

Cheers,
Farshid

On Wed, Sep 24, 2014 at 10:39 AM, Émeric MASCHINO emeric.masch...@gmail.com
 wrote:

 Hi Farshid,

 Correct, but what about the plug-ins and examples? They aren't
 installed in OSG_ROOT\bin. So if you only copy the DLLs in
 OSG_ROOT\bin, when trying to load a plug-in (installed in
 OSG_ROOT\bin\osgPlugins-X.Y.Z) or running an example (installed in
 OSG_ROOT\shared\OpenSceneGraph\bin) that requires an external DLL,
 this last one will thus be searched in the PATH, with the risk of
 finding a similarly named DLL elsewhere in the filesystem before
 reaching the expected on in OSG_ROOT\bin. How do you manage this
 situation on your own?

 Cheers,

  Émeric


 2014-09-24 19:12 GMT+02:00 Farshid Lashkari fla...@gmail.com:
  Hi Émeric,
 
  Placing the external libraries in OSG_ROOT\bin should work as long as the
  main executable is also in OSG_ROOT\bin. Windows should first search for
  DLLs in the same folder as the executable before searching in PATH. So
 there
  is no need to add your application to PATH, or worry about conflicting
 DLLs
  in PATH. I've deployed my application like this for years and never had
 any
  issues.
 
  Cheers,
  Farshid
 
 
  On Wed, Sep 24, 2014 at 10:03 AM, Émeric MASCHINO
  emeric.masch...@gmail.com wrote:
 
  Hi,
 
  What's the best practice regarding OSG deployment on Windows? Indeed,
  several plug-ins depend on external libraries. Is it best to put the
  required DLLs in OSG_ROOT\bin\osgPlugins-X.Y.Z or rather in
  OSG_ROOT\bin, thus ensuring that OSG_ROOT\bin is in the PATH so that
  the plug-ins can find them?
 
  With this last approach, there's only one copy of each DLL shared by
  the OSG applications, plug-ins and examples. The drawback is that if a
  similarly named DLL is found in the PATH before reaching OSG_ROOT\bin,
  an incorrect DLL may be loaded.
 
  By contrast, copying the required DLLs in
  OSG_ROOT\bin\osgPlugins-X.Y.Z may also require copying them in
  OSG_ROOT\bin as well as in OSG_ROOT\share\OpenSceneGraph\bin.
 
  Any advice on what's better?
 
   Émeric
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG deployment on Windows

2014-09-24 Thread Émeric MASCHINO
Hi Chris,

Are you then also putting the required plug-ins in the same folder and
no more in a separate osgPlugins-X.Y.Z folder?

Cheers,

 Émeric


2014-09-24 19:59 GMT+02:00 Chris Hanson xe...@alphapixel.com:
 I deploy my applications with their own local copy of OSG in the same folder
 as the main application executable. I typically have a dozen different
 versions and flavors of OSG on my computer at once so OSG_ROOT becomes
 irrelevant.

 On Wed, Sep 24, 2014 at 11:39 AM, Émeric MASCHINO
 emeric.masch...@gmail.com wrote:

 Hi Farshid,

 Correct, but what about the plug-ins and examples? They aren't
 installed in OSG_ROOT\bin. So if you only copy the DLLs in
 OSG_ROOT\bin, when trying to load a plug-in (installed in
 OSG_ROOT\bin\osgPlugins-X.Y.Z) or running an example (installed in
 OSG_ROOT\shared\OpenSceneGraph\bin) that requires an external DLL,
 this last one will thus be searched in the PATH, with the risk of
 finding a similarly named DLL elsewhere in the filesystem before
 reaching the expected on in OSG_ROOT\bin. How do you manage this
 situation on your own?

 Cheers,

  Émeric


 2014-09-24 19:12 GMT+02:00 Farshid Lashkari fla...@gmail.com:
  Hi Émeric,
 
  Placing the external libraries in OSG_ROOT\bin should work as long as
  the
  main executable is also in OSG_ROOT\bin. Windows should first search for
  DLLs in the same folder as the executable before searching in PATH. So
  there
  is no need to add your application to PATH, or worry about conflicting
  DLLs
  in PATH. I've deployed my application like this for years and never had
  any
  issues.
 
  Cheers,
  Farshid
 
 
  On Wed, Sep 24, 2014 at 10:03 AM, Émeric MASCHINO
  emeric.masch...@gmail.com wrote:
 
  Hi,
 
  What's the best practice regarding OSG deployment on Windows? Indeed,
  several plug-ins depend on external libraries. Is it best to put the
  required DLLs in OSG_ROOT\bin\osgPlugins-X.Y.Z or rather in
  OSG_ROOT\bin, thus ensuring that OSG_ROOT\bin is in the PATH so that
  the plug-ins can find them?
 
  With this last approach, there's only one copy of each DLL shared by
  the OSG applications, plug-ins and examples. The drawback is that if a
  similarly named DLL is found in the PATH before reaching OSG_ROOT\bin,
  an incorrect DLL may be loaded.
 
  By contrast, copying the required DLLs in
  OSG_ROOT\bin\osgPlugins-X.Y.Z may also require copying them in
  OSG_ROOT\bin as well as in OSG_ROOT\share\OpenSceneGraph\bin.
 
  Any advice on what's better?
 
   Émeric
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




 --
 Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
 http://www.alphapixel.com/
 Training • Consulting • Contracting
 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
 GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
 Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
 • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
 Android
 @alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG deployment on Windows

2014-09-24 Thread Émeric MASCHINO
OK, thanks for the clarification Farshid.

Yes, I was using exactly the same structure. But I didn't knew that
the OSG plug-ins were first looking for their dependencies is
OSG_ROOT\bin before relying upon the PATH. I thought that, when not
found in the OSG_ROOT\bin\osgPlugins-X.Y.Z folder, the required DLLs
were searched for in the PATH.

 Émeric



2014-09-24 20:03 GMT+02:00 Farshid Lashkari fla...@gmail.com:
 Hi Émeric,

 I'm assuming OSG_ROOT refers to the install folder of your OSG based
 application. The plug-ins should go into OSG_ROOT\bin\osgPlugins-X.Y.Z. OSG
 will automatically prepend the osgPlugins-X.Y.Z\ path when attempting to
 load osgdb_*.dll plugins.

 For example, let's say I install my application into the C:\MyApp\ folder.
 Here is how I organize the files:

 C:\MyApp\bin\ contains:
  - Executables (.exe)
  - OSG library files (osg.dll, osgDB.dll, osgUtil.dll, ...)
  - External dependencies (zlib1.dll, libxml2.dll, ...)

 C:\MyApp\bin\osgPlugins-X.Y.Z\ contains:
  - All OSG reader/writer plugins (osgdb_*.dll)

 Any executable launched from the C:\MyApp\bin\ folder, will automatically
 load dependencies from that folder before searching PATH. When attempting to
 load a reader/writer plugin, OSG will automatically look in
 C:\MyApp\bin\osgPlugins-X.Y.Z\. If any of those plugins have external
 dependencies, they will be loaded from C:\MyApp\bin\, before searching in
 PATH.

 This should allow multiple OSG based applications using different versions
 to be installed on the system without conflicts.

 Hope this clears it up.

 Cheers,
 Farshid

 On Wed, Sep 24, 2014 at 10:39 AM, Émeric MASCHINO
 emeric.masch...@gmail.com wrote:

 Hi Farshid,

 Correct, but what about the plug-ins and examples? They aren't
 installed in OSG_ROOT\bin. So if you only copy the DLLs in
 OSG_ROOT\bin, when trying to load a plug-in (installed in
 OSG_ROOT\bin\osgPlugins-X.Y.Z) or running an example (installed in
 OSG_ROOT\shared\OpenSceneGraph\bin) that requires an external DLL,
 this last one will thus be searched in the PATH, with the risk of
 finding a similarly named DLL elsewhere in the filesystem before
 reaching the expected on in OSG_ROOT\bin. How do you manage this
 situation on your own?

 Cheers,

  Émeric


 2014-09-24 19:12 GMT+02:00 Farshid Lashkari fla...@gmail.com:
  Hi Émeric,
 
  Placing the external libraries in OSG_ROOT\bin should work as long as
  the
  main executable is also in OSG_ROOT\bin. Windows should first search for
  DLLs in the same folder as the executable before searching in PATH. So
  there
  is no need to add your application to PATH, or worry about conflicting
  DLLs
  in PATH. I've deployed my application like this for years and never had
  any
  issues.
 
  Cheers,
  Farshid
 
 
  On Wed, Sep 24, 2014 at 10:03 AM, Émeric MASCHINO
  emeric.masch...@gmail.com wrote:
 
  Hi,
 
  What's the best practice regarding OSG deployment on Windows? Indeed,
  several plug-ins depend on external libraries. Is it best to put the
  required DLLs in OSG_ROOT\bin\osgPlugins-X.Y.Z or rather in
  OSG_ROOT\bin, thus ensuring that OSG_ROOT\bin is in the PATH so that
  the plug-ins can find them?
 
  With this last approach, there's only one copy of each DLL shared by
  the OSG applications, plug-ins and examples. The drawback is that if a
  similarly named DLL is found in the PATH before reaching OSG_ROOT\bin,
  an incorrect DLL may be loaded.
 
  By contrast, copying the required DLLs in
  OSG_ROOT\bin\osgPlugins-X.Y.Z may also require copying them in
  OSG_ROOT\bin as well as in OSG_ROOT\share\OpenSceneGraph\bin.
 
  Any advice on what's better?
 
   Émeric
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG deployment on Windows

2014-09-24 Thread Chris Hanson
I just move the osgPlugins folder into the folder where the executable and
top-level OSG DLLs are found. All seems to work without any fuss.

On Wed, Sep 24, 2014 at 1:04 PM, Émeric MASCHINO emeric.masch...@gmail.com
wrote:

 Hi Chris,

 Are you then also putting the required plug-ins in the same folder and
 no more in a separate osgPlugins-X.Y.Z folder?

 Cheers,

  Émeric


 2014-09-24 19:59 GMT+02:00 Chris Hanson xe...@alphapixel.com:
  I deploy my applications with their own local copy of OSG in the same
 folder
  as the main application executable. I typically have a dozen different
  versions and flavors of OSG on my computer at once so OSG_ROOT becomes
  irrelevant.
 
  On Wed, Sep 24, 2014 at 11:39 AM, Émeric MASCHINO
  emeric.masch...@gmail.com wrote:
 
  Hi Farshid,
 
  Correct, but what about the plug-ins and examples? They aren't
  installed in OSG_ROOT\bin. So if you only copy the DLLs in
  OSG_ROOT\bin, when trying to load a plug-in (installed in
  OSG_ROOT\bin\osgPlugins-X.Y.Z) or running an example (installed in
  OSG_ROOT\shared\OpenSceneGraph\bin) that requires an external DLL,
  this last one will thus be searched in the PATH, with the risk of
  finding a similarly named DLL elsewhere in the filesystem before
  reaching the expected on in OSG_ROOT\bin. How do you manage this
  situation on your own?
 
  Cheers,
 
   Émeric
 
 
  2014-09-24 19:12 GMT+02:00 Farshid Lashkari fla...@gmail.com:
   Hi Émeric,
  
   Placing the external libraries in OSG_ROOT\bin should work as long as
   the
   main executable is also in OSG_ROOT\bin. Windows should first search
 for
   DLLs in the same folder as the executable before searching in PATH. So
   there
   is no need to add your application to PATH, or worry about conflicting
   DLLs
   in PATH. I've deployed my application like this for years and never
 had
   any
   issues.
  
   Cheers,
   Farshid
  
  
   On Wed, Sep 24, 2014 at 10:03 AM, Émeric MASCHINO
   emeric.masch...@gmail.com wrote:
  
   Hi,
  
   What's the best practice regarding OSG deployment on Windows? Indeed,
   several plug-ins depend on external libraries. Is it best to put the
   required DLLs in OSG_ROOT\bin\osgPlugins-X.Y.Z or rather in
   OSG_ROOT\bin, thus ensuring that OSG_ROOT\bin is in the PATH so that
   the plug-ins can find them?
  
   With this last approach, there's only one copy of each DLL shared by
   the OSG applications, plug-ins and examples. The drawback is that if
 a
   similarly named DLL is found in the PATH before reaching
 OSG_ROOT\bin,
   an incorrect DLL may be loaded.
  
   By contrast, copying the required DLLs in
   OSG_ROOT\bin\osgPlugins-X.Y.Z may also require copying them in
   OSG_ROOT\bin as well as in OSG_ROOT\share\OpenSceneGraph\bin.
  
   Any advice on what's better?
  
Émeric
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
  
  
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
  
   ___
   osg-users mailing list
   osg-users@lists.openscenegraph.org
  
  
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
 
  --
  Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
  http://www.alphapixel.com/
  Training • Consulting • Contracting
  3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL
 4 •
  GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
  Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
 Cryptography
  • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
  Android
  @alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org