Hi Vincent,
The "problem" is about the dependency package our application needs. We
just understand the VS dll are needed, and we know it exist package to
install it with the application... but it is more dependencies... and
the pack become bigger and bigger so I am looking at a way to avoid
installing so much dependencies.
The /MT option only applies to the VC++ runtime. This is a very
well-defined and small set of dependencies (see below). Other
dependencies (libpng, freetype, etc.) are not controlled by the /MT option.
If you want to avoid adding the dependencies' DLLs to your packages,
that's another issue. You can link them statically, but this increases
your executable's size.
There are other tradeoffs you need to evaluate when making this decision.
a) If you have multiple projects which use the same set of dependencies,
you could just put the dependencies in a common directory and use the
PATH so that all projects find the same set of DLLs, thus reducing your
executable size for each project and eliminating the need to duplicate
files all over the place.
b) However, you need to make sure the directory your DLLs are in is
first in the PATH, otherwise you run the chance that your app will pick
up another version of the DLL which was installed with another app,
leading to possible crashes. This problem is eliminated if you link the
dependencies statically, at the cost of bigger executables.
So I guess you need to decide what exactly you are trying to do:
a) eliminate the need to distribute the VC++ runtime (4 files or 1
installer)
b) eliminate the need to distribute the other dependencies' DLLs (which
are specific to your version of OpenSceneGraph, and depend on which
plugins you have compiled)
c) or both?
For a) my argument is that it's not really necessary, see below.
For b) you need to recompile the dependencies as static libraries (which
we do here, so it's not impossible, just time consuming).
And for c) both (duh ;-) ).
Same thing if you get a link where I can find the "pack" of VS
dependencies.
Search for "Visual C++ runtime" (for the version you're using, say
Visual C++ 2005 SP1 or Visual C++ 2008 SP1) and you'll get a pretty
small installer which will install what you need. You only need to
install that once and all programs that use the runtime (which were
compiled with that version of Visual C++) will be able to use it.
The other option is including those DLLs locally to your program. As I
said, search the archives for Sukender's post about this, his
instructions are accurate. The specific DLLs (3 DLLs and a manifest
file) are normally located here:
<Visual_Studio_install_path>\VC\redist\x86\Microsoft.VC80.CRT
<Visual_Studio_install_path>\VC\redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT
and they're just about 1.5MB combined... Just be aware of the licensing
terms, especially for the debug version which you're not supposed to
ship (you shouldn't ship a debug executable anyways, but you knew that).
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org