[Qt-qml] QML and Unix #!/path/to/interpreter

Pertti Kellomäki pertti.kellomaki at nokia.com
Wed Apr 21 09:40:55 CEST 2010


On 04/21/2010 03:55 AM, Allison Warwick (Nokia-D-Qt/Brisbane) wrote:
> #! is magic implemented by *exec* itself, and that's not what you really want, right? (i.e. you don't care if QProcess can't magically run QML files). It would also required that you chmod+x your QML files (yikes). But you just want your shell to know what to do with a *.qml file, right?
>    
The coffee room consensus this morning was that letting exec (i.e. the 
kernel) handle it is exactly what one would want if one were to use 
qml+js as a scripting language (or for writing small standalone 
applications for that matter). It is much better if an executable is an 
executable is an executable. Helps to avoid contraptions like the 
attached helloworld ;-)

Btw, at least the qml viewer in the tech preview refuses to open files 
that do not end in .qml, which seems somewhat overly cautious.

This is now drifting somewhat off topic, so I guess I better stop here.
-- 
Pertti

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: helloworld
Url: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100421/6ead7420/attachment.pl 


More information about the Qt-qml mailing list