How to run the XUL app on Mac OS X Snow Leopard?

I am trying to create a XUL "Hello World" application on Mac OS X. I download XULRunner from here , then this tutorial , then this tutorial , and then this tutorial ... Nothing worked. So, I looked at it better and found this section , the instructions of which I followed. Unfortunately, it does not work yet. I can even run the application with the command

/Library/Frameworks/XUL.framework/xulrunner-bin $PWD/application.ini 

However, the window does not appear and the error does not print. This happens when I try to launch the application using firefox -apptoo.

What could be wrong? Also, does anyone know which tutorial will work? That would be an acceptable answer :)

Thanks in advance!

File contents

File contents application.ini:

[App]
Vendor=Me
Name=Zull
Version=1.0
BuildID=31052011
ID=zull-xul@zull.com

[Gecko]
MinVersion=2.0
MaxVersion=2.*

Content chrome/chrome.manifest:

content zull file:content/

Content chrome/content/main.xul:

<?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 defaults/preferences/prefs.js:

pref("toolkit.defaultChromeURI", "chrome://zull/content/main.xul");
+3
source share
2 answers

Following the recommendations of Vladimir Palant, I changed the content chrome/chrome.manifestfrom

content zull file:content/

to

content zull content/

Then, following these instructions , I created a file chrome.manifestin the root directory of the applications whose contents

manifest chrome/chrome.manifest

This is necessary because the default location for chrome.manifestin XULRunner 2.0 is the root directory of the applications.

However, the error No chrome package registered for chrome:///User/brandizzi/sandbox/zull/main.xulpersists. Then I got this: trying to solve the problem, I tried using the full path to the file main.xulin defaults/preferences/prefs.js:

pref("toolkit.defaultChromeURI", "chrome:///User/brandizzi/sandbox/zull/main.xul");

I just changed it to the chrome path ...

pref("toolkit.defaultChromeURI", "chrome://zull/content/main.xul");

... and he worked.

, , . . , -jsconsole XULRunner (, /Library/Frameworks/XUL.framework/xulrunner-bin ~/sandbox/zull/application.ini -jsconsole) .
+1

. chrome.manifest :

content zull content/

, -jsconsole . , .

+2

All Articles