Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XULRunner 2.0 in Mac OS X does not show XUL window

131 views
Skip to first unread message

Adam Victor Nazareth Brandizzi

unread,
Jun 1, 2011, 2:13:42 PM6/1/11
to dev-te...@lists.mozilla.org
Hello, all!

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/

Pernot Christian

unread,
Jun 7, 2011, 4:53:20 AM6/7/11
to
Le 01/06/2011 20:13, Adam Victor Nazareth Brandizzi a écrit :

>
> 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

Adam Victor Nazareth Brandizzi

unread,
Jun 7, 2011, 9:15:19 AM6/7/11
to Pernot Christian, dev-te...@lists.mozilla.org
On Tue, Jun 7, 2011 at 5:53 AM, Pernot Christian <chri...@pingroom.net> wrote:
> 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

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!

Pernot Christian

unread,
Jun 7, 2011, 9:24:13 AM6/7/11
to
Le 07/06/2011 15:15, Adam Victor Nazareth Brandizzi a écrit :
>
> 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.

Adam Victor Nazareth Brandizzi

unread,
Jun 7, 2011, 9:32:17 AM6/7/11
to Pernot Christian, dev-te...@lists.mozilla.org
On Tue, Jun 7, 2011 at 10:24 AM, Pernot Christian
<chri...@pingroom.net> wrote:
> 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!

Pernot Christian

unread,
Jun 7, 2011, 9:35:04 AM6/7/11
to
Le 07/06/2011 15:32, Adam Victor Nazareth Brandizzi a écrit :
> On Tue, Jun 7, 2011 at 10:24 AM, Pernot Christian
> <chri...@pingroom.net> wrote:
>> 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!
>
please post the content of your "chrome.manifest" files

Adam Victor Nazareth Brandizzi

unread,
Jun 7, 2011, 9:43:53 AM6/7/11
to Pernot Christian, dev-te...@lists.mozilla.org
On Tue, Jun 7, 2011 at 10:35 AM, Pernot Christian
<chri...@pingroom.net> wrote:
> please post the content of your "chrome.manifest" files

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.

Pernot Christian

unread,
Jun 7, 2011, 10:01:27 AM6/7/11
to
Le 07/06/2011 15:43, Adam Victor Nazareth Brandizzi a écrit :
> On Tue, Jun 7, 2011 at 10:35 AM, Pernot Christian
> <chri...@pingroom.net> wrote:
>> please post the content of your "chrome.manifest" files
>
> 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.
>
is the prefs.js still the same, with

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

?

the error is at startup and nothing shows up ?


Adam Victor Nazareth Brandizzi

unread,
Jun 7, 2011, 11:24:25 AM6/7/11
to Pernot Christian, dev-te...@lists.mozilla.org
On Tue, Jun 7, 2011 at 11:01 AM, Pernot Christian
<chri...@pingroom.net> wrote:
> is the prefs.js still the same, with
>
> pref("toolkit.defaultChromeURI", "chrome://zull/content/main.xul");
>
> ?

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 -

0 new messages