-app 命令行选项在 Firefox 4 中是否正常工作?
我编写了一些软件,它利用 Firefox 中的 -app
命令行选项在 Firefox 的 XULRunner 嵌入副本中启动 XUL 应用程序。这一切在 Firefox 3.x 中运行良好,但是当我尝试使用 Firefox 4 时,Firefox 要么崩溃,要么什么也不做(取决于它是在 Mac 还是 Windows 上)。
我尝试了许多其他命令行选项,其中许多选项似乎都不同程度地损坏了。 (例如 -v
打印版本信息,这在 OSX 上会崩溃)
有谁知道是否已经有关于此的已注册错误?删除 -app
是有意为之还是疏忽?有什么办法可以解决这个问题吗?
I have written some software that makes use of the -app
command line option in Firefox to launch XUL applications in Firefox's embedded copy of XULRunner. This all worked fine in Firefox 3.x, however when I try with Firefox 4, Firefox either crashes or does nothing (depending on if it is on Mac or Windows).
I have tried a number of other command line options and many of them seem to be variously broken. (such as -v
to print the version information, which crashes on OSX)
Does anyone know if there are already registered bugs about this? Was the removal of -app
intentional or was it an oversight? Is there any way to work around this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
-app
在 Firefox 4 中维护并且应该可以工作。我不知道 Windows 和 Mac 操作系统是否存在错误,但我在 Linux 上使用它来运行多个应用程序,并且运行良好(我的 Firefox 版本是
Mozilla Firefox 4.0.1
)The
-app
is maintained in firefox 4 and should work.I do not know if there is a bug for windows and mac os, but I'm using it on linux for several apps, and it works well (my firefox version is
Mozilla Firefox 4.0.1
)只是想解决这个问题 - 就像在 Firefox 7 上一样,
-app
似乎不存在:我也很想知道它何时以及为何被删除,但我只是无法在线找到任何信息(另请参阅 使用 xulrunner 的单文件应用程序 -可能吗?) ...
PS:刚刚在这里提交了一个错误: Bug #880596 in firefox (Ubuntu) : “版本 3 以上的 Firefox 缺少选项‘-app’” -
我以为它会自动复制到 mozilla 的 bugzilla(看到 bug)就像Bug #207454),但不幸的是,它不是'不是这样...- bugzilla bug 需要复制并手动添加,它现在就在那里...Just wanted to bump this - as on Firefox 7,
-app
does not seem to be there:I too would love to know when and why it was removed, but I simply cannot find any info online (see also Single-file app with xulrunner - possible?) ...
PS: Just filed a bug here: Bug #880596 in firefox (Ubuntu): “Option '-app' missing from Firefox above version 3” -
I thought it would be automatically copied to mozilla's bugzilla (seeing bugs like Bug #207454), but unfortunately, it wasn't so...- bugzilla bug needs to be copied and added manually, it's there now...我在使用
-app
开关时也遇到了问题。我使用的是 Firefox 10,但我知道这个问题可以追溯到 FF 4。当使用
-help
选项运行时,firefox 二进制文件不会显示-app 列表
选项,这给我带来了很多困惑,但我相信它仍然存在。相反,对我来说,问题在于 Firefox 4 中的此更改,需要应用程序根目录中的 chrome 清单文件。从 FF 4 开始,仅读取一个(根)chrome 清单,因此您必须使用以下行(或者如果您想要多个清单,则需要多行)创建一个清单。
然后以通常的方式启动应用程序
(要进行调试,请使用
-jsconsole
选项)。另请注意,(您没有提到尝试过此操作,但我尝试了,但这是错误的)——不要使用
-no-remote
选项。我尝试此操作的目的是为我的 XUL 应用程序启动一个与已运行的 Firefox 实例分开的新进程。但是,即使 Firefox 实例已经在运行,-app
选项也会为您的应用程序创建一个新进程,因此没有必要。另请参阅此问题有关 chrome 清单问题的更多信息。
I also experienced problems using the
-app
switch. I'm using Firefox 10, but I have an idea this problem goes right back to FF 4.The firefox binary, when run with the
-help
option, does not show list the-app
option, which caused me much confusion, but I believe its still there.The problem for me, instead, was to do with this change in Firefox 4, requiring a chrome manifest file in the application root. Since FF 4, only a single (root) chrome manifest is read, so you must create one with the following line, (or lines, if you want to have multiple manifests).
Then launch the application the usual way
(For debugging use the
-jsconsole
option).Another note, (you didn't mention having tried this, but I did and it was wrong) -- don't use the
-no-remote
option. I tried this with the intent of starting a new process for my XUL application separate from already running firefox instances. However, the-app
option will create a new process for your application even if firefox instances are already running, so there is no need.See also this question for more info about the chrome manifest issue.