-app 命令行选项在 Firefox 4 中是否正常工作?

发布于 2024-11-05 14:26:00 字数 338 浏览 1 评论 0原文

我编写了一些软件,它利用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

山色无中 2024-11-12 14:26:00

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

如果没有 2024-11-12 14:26:00

只是想解决这个问题 - 就像在 Firefox 7 上一样,-app 似乎存在:

$ uname -s -r
Linux 2.6.38-11-generic
$ firefox --version
Mozilla Firefox 7.0.1
$ firefox --help
Usage: firefox [ options ... ] [URL]
       where options include:

X11 options
  --display=DISPLAY  X display to use
  --sync             Make X calls synchronous
  --g-fatal-warnings Make all warnings fatal

Firefox options
  -h or -help        Print this message.
  -v or -version     Print Firefox version.
  -P <profile>       Start with <profile>.
  -migration         Start with migration wizard.
  -ProfileManager    Start with ProfileManager.
  -no-remote         Open new instance, not a new window in running instance.
  -UILocale <locale> Start with <locale> resources as UI Locale.
  -safe-mode         Disables extensions and themes for this session.
  -jsconsole         Open the Error console.
  -browser           Open a browser window.
  -new-window  <url> Open <url> in a new window.
  -new-tab     <url> Open <url> in a new tab.
  -preferences       Open Preferences dialog.
  -search     <term> Search <term> with your default search engine.
  -private           Enable private browsing mode.
  -private-toggle    Toggle private browsing mode.
  -setDefaultBrowser Set this app as the default browser.

      -g or --debug          Start within debugger
      -d or --debugger       Specify debugger to start with (eg, gdb or valgrind)
      -a or --debugger-args  Specify arguments for debugger

我也很想知道它何时以及为何被删除,但我只是无法在线找到任何信息(另请参阅 使用 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:

$ uname -s -r
Linux 2.6.38-11-generic
$ firefox --version
Mozilla Firefox 7.0.1
$ firefox --help
Usage: firefox [ options ... ] [URL]
       where options include:

X11 options
  --display=DISPLAY  X display to use
  --sync             Make X calls synchronous
  --g-fatal-warnings Make all warnings fatal

Firefox options
  -h or -help        Print this message.
  -v or -version     Print Firefox version.
  -P <profile>       Start with <profile>.
  -migration         Start with migration wizard.
  -ProfileManager    Start with ProfileManager.
  -no-remote         Open new instance, not a new window in running instance.
  -UILocale <locale> Start with <locale> resources as UI Locale.
  -safe-mode         Disables extensions and themes for this session.
  -jsconsole         Open the Error console.
  -browser           Open a browser window.
  -new-window  <url> Open <url> in a new window.
  -new-tab     <url> Open <url> in a new tab.
  -preferences       Open Preferences dialog.
  -search     <term> Search <term> with your default search engine.
  -private           Enable private browsing mode.
  -private-toggle    Toggle private browsing mode.
  -setDefaultBrowser Set this app as the default browser.

      -g or --debug          Start within debugger
      -d or --debugger       Specify debugger to start with (eg, gdb or valgrind)
      -a or --debugger-args  Specify arguments for debugger

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

浪漫之都 2024-11-12 14:26:00

我在使用 -app 开关时也遇到了问题。我使用的是 Firefox 10,但我知道这个问题可以追溯到 FF 4。

当使用 -help 选项运行时,firefox 二进制文件不会显示 -app 列表 选项,这给我带来了很多困惑,但我相信它仍然存在。

相反,对我来说,问题在于 Firefox 4 中的此更改,需要应用程序根目录中的 chrome 清单文件。从 FF 4 开始,仅读取一个(根)chrome 清单,因此您必须使用以下行(或者如果您想要多个清单,则需要多行)创建一个清单。

manifest chrome/chrome.manifest

然后以通常的方式启动应用程序

firefox -app path/to/application.ini -jsconsole

(要进行调试,请使用 -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).

manifest chrome/chrome.manifest

Then launch the application the usual way

firefox -app path/to/application.ini -jsconsole

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文