[Qt-qml] Tool to pack / minify content of QML files ?
Kai Koehne
kai.koehne at nokia.com
Mon Jan 3 09:24:43 CET 2011
On 12/29/2010 9:20 AM, ext Gregory Schlomoff wrote:
> Yes, I was checking those tools, they are great, but we need something
> that integrates nicely into the build workflow.
>
> For example, the best tool to pack QML probably is Douglas Crockford's
> JSMIN (http://javascript.crockford.com/jsmin.html)
>
> JSMIN is very conservative, it really just strips comments and
> unnecessary whitespace, unlike other tools that attempt more
> aggressive optimizations that may not be compatible with QML. The
> source code is one single .c file, available under a permissive
> license, so if nobody did this before, we are going to use that in our
> build workflow.
>
> But I'd like to suggest to make this feature part of RCC.
>
> What do you think ?
>
> On Wed, Dec 29, 2010 at 2:54 PM, Abhishek<abhishekworld at gmail.com> wrote:
>> Hi,
>>
>> On Wed, Dec 29, 2010 at 1:07 PM, Gregory Schlomoff
>> <gregory.schlomoff at gmail.com> wrote:
>>>
>>> Hi everybody,
>>>
>>> I was wondering, has anyone developed a nice tool to pack (a.k.a.
>>> minify) qml files before they are embedded in the executable?
>>>
>>> My concern isn't so much about size, since I'm telling rcc to compress
>>> them anyway, but just that I don't really want all our comments / doc
>>> to be embedded in the final executable. So what I'm really looking for
>>> is a tool that strips comments and un-necessary whitespace out of .qml
>>> and .js files.
>>>
>>>
>>> Maybe this could be built-in in the rcc tool, or it could be a
>>> third-party tool that would integrate the build workflow.
>>>
>> I dont know about QML is there any tool to do all this but but you have
>> tool for
>> Javascript http://developer.yahoo.com/yui/compressor/ or http://jscompress.com/ (I
>> haven't checked it with QML js files but yes it works on web )
>>>
>>> What do you think?
I don't think such a tool belongs into rcc. You might want to obfuscate
your files even when not embedding it into the executable. Also,
debugging won't work with the 'compressed' files, so you want to be able
to switch it off while developing/debugging.
Why not do the compression once when you do the final build of your app?
Regards
Kai
>>> Greg
>>> _______________________________________________
>>> Qt-qml mailing list
>>> Qt-qml at qt.nokia.com
>>> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
>>
>>
>>
>> --
>> Abhishek Patil
>> URL: http://thezeroth.net
>> "Imagination is more important than knowledge..." -Albert Einstein
>>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
--
Kai Koehne
Software Engineer
Nokia, Qt Development Frameworks
Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori
More information about the Qt-qml
mailing list