You can add new schemes to Qt, so you can add this to your own application. The biggest "problem" is that you need a new scheme for each existing scheme. In reality, you probably only need to support two:
ziphttp://host/dir/file.zip/dir/file.qml zipfile:///dir/file.zip/dir/file.qml Qt even has zip format support hidden somewhere in it. From: [email protected] [mailto:[email protected]] On Behalf Of ext Attila Csipa Sent: Thursday, November 25, 2010 9:25 PM To: Ville M. Vainio Cc: qt-qml Subject: Re: [Qt-qml] Jar-like zip archive of QML code On Thu, Nov 25, 2010 at 12:00 AM, Ville M. Vainio <[email protected]<mailto:[email protected]>> wrote: Every now and again (case in points - yesterday after Tampere MeeGo meetup) this pops up in conversations - people seem to miss a .jar like archive format for QML files. Basically, this would be a zipped bunch of qml files, and perhaps c++ modules. Such a thing could be used to easily distribute qml assets. While you can currently bundle files together in a program binary using Qt resource system, that doesn't make sense for libraries. Also, a compressed archive of qml files would be easier to modify without messing with full toolchains. The scheme (once specified) would probably not be that hard to implement, it'd most probably involve adding a new url scheme to the current "network transparent" import system. While you could argue that Python did just fine without zipimport for a long time, eventually they deemed it a valuable feature to have. Another motivation is that file/directory operations on mobile devices can be cumbersome if the project has many files (think send via bluetooth, download from the web, etc). The inclusion of C++ modules can be tricky, but there are plenty of precedents that can be learned from (JAR, zipimport/eggs). It's all the question of how simple or smart does one want to make it. The simplest way would probably be just to zip it according to some architecture/versioning scheme, but I would also consider mimicking/retrofitting the rcc (i.e. if I specify rcc -o qmlproject.qrz qmlproject.qrc I would get a zip file which has the files/namespace organized the same way it was in the qrc - this also makes potential development and qmake integration easier). Alternatively, that could be a ziprcc executable (again, we have precedent in the form of pyrcc). Best regards, Attila
_______________________________________________ Qt-qml mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-qml
