I am trying to create a XUL “Hello World” application in Mac OS X. I download the XULRunner from here, followed this tutorial and then this tutorial and then this tutorial… None worked. So, I looked at it better and found this section, whose instructions I followed. Unfortunately, it does not work yet. I even can run the application with the command
/Library/Frameworks/XUL.framework/xulrunner-bin $PWD/application.ini
However, no window is presented and no error is printed. It happens when I try to run the application with firefox -app too.
What can be wrong? Also, does someone know some tutorial which would work? It would be an acceptable answer, too 🙂
Thanks in advance!
File contents
The content of the application.ini file is:
[App]
Vendor=Me
Name=Zull
Version=1.0
BuildID=31052011
ID=zull-xul@zull.com
[Gecko]
MinVersion=2.0
MaxVersion=2.*
The content of chrome/chrome.manifest is:
content zull file:content/
The content of chrome/content/main.xul is:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="main" title="My App" width="300" height="300"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<caption label="Hello World"/>
</window>
Finally, the content of defaults/preferences/prefs.js is:
pref("toolkit.defaultChromeURI", "chrome://zull/content/main.xul");
Following the recommendations of Wladimir Palant, I changed the content of
chrome/chrome.manifestfromto
Then, following these instructions, I created a
chrome.manifestfile in the root app dir whose content isIt is required because the default place for
chrome.manifestin XULRunner 2.0 is the root app directory.However, the error
No chrome package registered for chrome:///User/brandizzi/sandbox/zull/main.xulpersisted. Then, I got it: trying to solve the problem, I experienced using the full path to themain.xulfile indefaults/preferences/prefs.js:I just changed it to the chrome path…
…and it worked.
It was a bunch of silly errors nonetheless but it is solved now. This thread was very helpful to me. Also, Wladimir recommendation about using the
-jsconsoleoption of XULRunner (such as in/Library/Frameworks/XUL.framework/xulrunner-bin ~/sandbox/zull/application.ini -jsconsole) was very useful.