Building XUL app a-la SongBird
I've started exploring XUL Runner as a potential tool for an upcoming app.
I can get some good examples running using the command line开发者_JAVA百科 xulrunner-bin myapp.
How can compile it all in a native looking application, like SongBird does.
I understand SongBird packages the entire xul runtime with it, and I'm happy with that. I'm just wondering is there are any tool I can use to compile my xul project as a standalone app?
Any Mac and/or PC hint much appreciated!
EDIT: I guess what I'm looking for is a way to generate a Mac and/or PC XUL stub application (but not an installer). Is there something like that?
Did some more research on the XULRunner subject and since I have some finding, I'll just answer my own question in case someone comes here hoping for an answer.
The answer is the Mozilla Build System
The most advanced tutorial on the subject that I could find is:
https://developer.mozilla.org/en/Creating_XULRunner_Apps_with_the_Mozilla_Build_System
Thank you very kindly to its author for attempting to make a tutorial on the subject.
A lot of questions can be answered in the Mozilla dev builds forum:
http://groups.google.com/group/mozilla.dev.builds/topics
I found those resources helpfull, hope these help someone too.
EDIT:
There is also a simpler way of doing it without have to use the MBS, as described here (works with 1.9 even if the doc is 1.8 centric)
Another approach is to look at XULExplorer, take it appart and build one from it as a base.
Cheers
I have created an application similar to Songbird at my previous job. It is used for lecture capturing. It builds upon GStreamer through an XPCOM component. The way how the view is displayed on top of a XUL window is very similar to Songbird's approach.
Now I must tell you that working with XULRunner can be painful at times. Especially if you are also making an XPCOM plugin.
Concerning deployment, on Mac you can create an application bundle using these commands (assuming your application folder is called "hello"):
xulrunner-bin --install-app hello .
mkdir hello.app/Contents/Frameworks
# Copy the XUL Framework in the application bundle:
svn export XUL.Framework hello.app/Contents/Frameworks/XUL.Framework
On Windows I used NSIS to create an installer that bundles the XULRunner runtime together with the application. It creates a shortcut to xulrunner.exe that has the application.ini file as command line parameter.
Edit You may also want to check out the Qt Declarative UI library. I haven't used it, but I would like to :)
精彩评论