Embedding other executables
-
I'm working on an app that need the services of some other executables. Rather than create an installer, I'd love for the app to just unpack them and put them in a convenient place when the app is launched. This is for OS X, Linux and probably Windows later on.
So, questions:1. Is this dumb, and I should just go make an installer? 2. on OSX, how would I get files into the app bundle's resource or MacOS folder? 3. For Linux, how on earth would I do something like #2?
These executables are large, 10-20 MBytes each. So building them in as resources in the Qt sense
lakes forever.thanks
-
And, why am a "lab rat"?
-
You can "embed" the required executables into your main executable file as resources and "extract" them at runtime, e.g. to the TEMP path. Look at the "Qt Resource System":http://qt-project.org/doc/qt-4.8/resources.html and the "QResource":http://qt-project.org/doc/qt-4.8/qresource.html class.
BTW: "Ranks":http://qt-project.org/ranks like "Lab Rat" are assigned automatically in this forum, based on the number of points you have earned ;-)
BTW 2.0: You may use a tool like "UPX":http://upx.sourceforge.net/ or "MPress":http://www.matcode.com/mpress.htm to reduce the size of the executables before embedding.