I am trying to create a XUL "Hello World" application in Mac OS X. I
download the XULRunner from here [1], followed this tutorial [2] and
then this tutorial [3] and then this tutorial [4]... None worked. So,
I looked at it better and found this section [5], 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!
The content of the `application.ini` file is:
[App]
Vendor=Me
Name=Zull
Version=1.0
BuildID=31052011
ID=zull...@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");
[2]: https://developer.mozilla.org/en/Getting_started_with_XULRunner
[3]: https://developer.mozilla.org/en/XUL_Tutorial
[4]: http://www.xul.fr/tutorial/
[5]: https://developer.mozilla.org/en/Getting_started_with_XULRunner#Mac
--
Adam Victor Nazareth Brandizzi
http://brandizzi.googlepages.com/
>
> The content of `chrome/chrome.manifest` is:
>
> content zull file:content/
>
Hi,
did you notice that the default location for the chrome.manifest changed
for XULRunner 2.0 ?
as mentionned here :
https://developer.mozilla.org/en/Getting_started_with_XULRunner#Step_5.3a_Set_up_the_chrome_manifest
------------
As mentioned in Step 3, the default location of the chrome.manifest has
changed in XULRunner 2.0, so we also need a simple chrome.manifest in
the application root which will include the the manifest in our chrome
root. Here is the root chrome.manifest:
manifest chrome/chrome.manifest
------------
hope this helps
--
Christian
Hi, Pernot!
I missed it. Then I followed the steps presented in the link. Now,
when I run xulrunner with -jsconsole I got the folloiwing message:
"No chrome package registered for
chrome:///Users/brandizzi/sandbox/zull/content/main.xul"
Do you have any idea about what is the problem?
Anyway, thanks for your helpful response! And thanks in advance!
If you kept the chrome.manifest in the chrome directory like you
mentioned it before, you should remove the file: before the "content/"
directory.
Thanks! However, I did it and the problem persists. Do you have any other idea?
Thanks again!
There they are:
zull/chrome/chrome.manifest:
content zull content/
zull/chrome.manifest:
manifest chrome/chrome.manifest
Also, there is no whitespaces in the beginning of lines - it is here
just for make them clearer.
pref("toolkit.defaultChromeURI", "chrome://zull/content/main.xul");
?
the error is at startup and nothing shows up ?
No, it is not. It was the full filesystem path to the XUL file:
pref("toolkit.defaultChromeURI",
"chrome:///Users/brandizzi/sandbox/zull/content/main.xul");
I changed it to the correct configuration you've presented and it worked!
It was a silly error. I just messed it up because in Mac OS one should
pass the full path of the application.ini file to XULRunner and I
thought the XUL file should be defined by a full path as well. What a
lame error :)
> the error is at startup and nothing shows up ?
Yes, that was what occurred, but it works now.
Thank you so much!
- Hide quoted text -