Resource packager in Qt?
-
Hello,
I am interested in packing several files, consider XML, txt, PNG, OGG, etc in archive-like file, unopenable, unreadable by humans( this I achieve by XOR on the write, XOR back on the read ). However user must not be able to open/read the data package. Is this a way to achieve it in Qt? Alternate is ZLIB, however I`d rather spend meself the deployment problems. -
Hi. I think this is what you need. "Qt Resource System ":http://qt-project.org/doc/qt-5/resources.html
-
Hi,
While Erick H points to a good suggestion I also see OGG in your file list. How much data are you intending to ship with your application ?
-
Well, it depends, quite a lot actually. Many PNGs and many OGGs. Also few XML.
-
Sounds like it goes in the hundreds of MB, right ?
-
Hardly. I
ve posted a similar deployment thread about the DLL
s I need to ship with my application. The VLC is a good example, but I am quite a newbie in QT so I can only guess, that they`ve packed all DLLs in a huge library file or they are actually using the enterprise edition... -
I guess SGaist is cautious, because compiling Qt Resource Files can consume vast amounts of RAM, unless you split the data into several different resources. Just be careful and watch RAM usage during compilation (this does not affect runtime RAM use!). QRC system is definitely convenient, as it is built into Qt and thus extremely easy to include in Qt applications.
-
That's one point but not the one I was aiming at. While I agree with sierdzio about the difference of RAM usage between compilation and runtime, creating a big application executable also means that just starting it will eat the RAM at runtime and increase its load time.
A good example of software with numerous assets are games, they generally keep the application size down and load what is needed on demand.