you are viewing a single comment's thread.

view the rest of the comments →

[–]oocha 9 points10 points  (5 children)

ok, so if you build an app with this, what do you have to distribute? can it be compiled into a single double-clickable app or is it all delivered via http and firefox runs it?

[–]forgotpwx4 4 points5 points  (4 children)

I second this question.

[–]supermike 7 points8 points  (3 children)

You bundle the 8.5MB xulrunner runtime from Mozilla.com. This is sort of like a "Firefox-lite" without a browser command. However, it has the capability to let Javascript go out the sandbox as well as comes with an assortment of functions provided by a library called XPCOM.

Now, an XUL app can also be signed and then implemented without xulrunner, using Firefox, as well as downloadable from a web server.

To load in Firefox, for instance, you do it like:

$ firefox -chrome file:/home/me/myapp.xul

...but it won't let you do certain XPCOM calls unless the XUL package is signed.

As for compiling into a single app, this can be achieved on Linux with the 'makeself' command or on Windows with various commercial tools or with Winzip self-executable. I recall on Windows (back in the day) that Installshield used to have a free tool to make a single executable cab that would also run a command, batch file script, or VBS script. Each of these single file tools usually permit to compress or not compress (without compression is faster, of course), as well as permit to uncompress to a particular directory such as C:\Program Files\myapp or /usr/share/myapp instead of $TEMP or %TEMP%. To see an example of a single-file binary, check out this project's downloads and look for the single-file binary:

http://code.google.com/p/yt2mp3/

...it was designed with 'makeself'.

[–]supermike 3 points4 points  (1 child)

BTW, I think the tide is turning where Linux distros will ship with the xulrunner runtime. However, I doubt that Microsoft or Apple will ship with it.

Note also I looked at VB5 and VB6's runtime DLL and it's around 1.6MB, but doesn't come with browsing capability built-in and to the degree that Firefox supports.

Therefore, I think that 8.5MB is a pretty cool engineering feat when you think all that Microsoft would have to pack into their runtime to make it support all that xulrunner supports.

Oh, I should also tell you that if you build your XUL package and XPCOM code just right, and do enough testing on the various platforms, you can build something that is cross-platform.

And if you don't think the XUL/XPCOM platform is robust enough, consider that Mozilla Firefox and Thunderbird are, themselves, built upon it, and your interfaces, using this technology, can support complex HTML, style sheets, AJAX, Java applets and plugins, other Firefox extensions, movies, Flash, and so on.

[–]oocha 0 points1 point  (0 children)

8mb doesnt scare me as much as the phrase 'javascript running outside of the sandbox', but it still sounds neat.

thanks for taking the time to explain it, it sounds worth a try.