我想在Mac OS X中创建一个XUL“Hello World”应用程序。我从here下载XULRunner,然后this tutorial,然后this tutorial,然后this tutorial ...没有工作。所以,我更好地看了看,发现this section,我遵循了他的指示。不幸的是,它还没有工作。我甚至可以用命令运行应用程序如何在Mac OS X Snow Leopard中运行XUL应用程序?
/Library/Frameworks/XUL.framework/xulrunner-bin $PWD/application.ini
但是,没有窗口显示,也没有打印错误。当我尝试运行firefox -app
的应用程序时也会发生这种情况。
什么可能是错的?另外,有人知道一些将起作用的教程吗?这也是一个可以接受的答案:)
在此先感谢!
文件内容
的application.ini
文件的内容是:
[App]
Vendor=Me
Name=Zull
Version=1.0
BuildID=31052011
[email protected]
[Gecko]
MinVersion=2.0
MaxVersion=2.*
的chrome/chrome.manifest
内容是:
content zull file: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>
最后,defaults/preferences/prefs.js
内容是:
pref("toolkit.defaultChromeURI", "chrome://zull/content/main.xul");
我更新了'chrome.manifest',并用'-jsconsole'运行了xulrunner。控制台显示消息“无法读取chrome清单文件.../zull/chrome.manifest”。我将'chrome.manifest'复制到应用程序根目录,然后得到消息'没有注册chrome:chrome:.../main.xul'。我认为这是另一个问题,所以我会将您的问题标记为答案并询问另一个问题,因为'-jsconsole'在某种程度上是我所寻找的。 – brandizzi 2011-06-06 21:35:50