为 HTML/JavaScript 使用构建更精简的 XulRunner?

发布于 2024-12-28 11:12:20 字数 644 浏览 4 评论 0原文

有没有办法制作一个更精简的面向 HTML/Javascript 的 Mozilla XulRunner 组件构建/包,排除一些较重的 XUL 平台功能?

背景:

我们正在构建一个跨平台应用程序HTML/JavaScript GUI。主机应用程序在 .NET/Mono 上运行,GUI 通过 GeckoFx 包装器使用 Mozilla XulRunner 呈现。一切都运转良好。

我们遇到一个问题:重达 28MB 的 XulRunner (9.0.x) 组件使应用程序安装程序比我们想要的要大一些。如果用户已经安装了 Firefox,则不需要单独部署 XulRunner,但我们希望减少未安装的用户的占用空间。

我们已经从官方发布版本中排除了所有 XulRunner 可执行文件,以使包减小到当前的大小。

我发现我们只使用 XulRunner 平台的一小部分。我们不需要任何 XUL 功能,只需要 HTML、JavaScript 和 CSS。这让我认为我们也许能够进行自定义构建,排除一些我们不需要的部分,但我不太熟悉 Mozilla 构建奥秘

任何帮助将不胜感激!

Is there a way to make a leaner HTML/Javascript -oriented build/package of the Mozilla XulRunner components, excluding some of the heavier XUL-platform features?

Background:

We are building a cross-platform application with a HTML/JavaScript GUI. The host app is running on .NET/Mono, and the GUI is rendered using Mozilla XulRunner via the GeckoFx wrapper. Everything is working great.

We have one issue: the XulRunner (9.0.x) components weighing at 28MB make the application installer a bit larger than we'd like. The XulRunner does not need to be deployed separately if the user already has Firefox installed, but we would want to reduce the footprint for the users who don't.

We've already excluded all XulRunner executables from the official release build to get the package down to its current size.

It occurs to me that we are only using a small subset of the XulRunner platform. We do not require any of the XUL features, only HTML, JavaScript and CSS. This leads me to think that we might be able to make a custom build which excludes some of the parts we don't need, but I'm not well-versed in the Mozilla build arcana.

Any help would be greatly appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

陌伤浅笑 2025-01-04 11:12:20

您通常会使用诸如 --disable-tests (不构建那些测试可执行文件)和 --enable-optimize/--disable-debug 之类的构建选项。另外,您应该能够使用 --disable-xul 选项。但是,您需要注意像 --disable-xul 这样的选项创建的构建不如官方 XULRunner 那样经过充分测试。在简单应用程序中应该没问题的其他选项:

--disable-jsd           Disable JavaScript debug library
--disable-plugins       Disable plugins support
--disable-view-source   Disable view source support
--disable-accessibility Disable accessibility support
--disable-printing      Disable printing support
--disable-crashreporter Disable breakpad crash reporting
--disable-mathml        Disable MathML support
--disable-installer     Disable building of installer
--disable-updater       Disable building of updater
--disable-activex       Disable building of ActiveX control
--disable-activex-scripting  Disable building of ActiveX scripting support (win32)
--disable-feeds         Disable feed handling and processing components

您可以通过在 配置.in

You will typically use build options like --disable-tests (don't build those test executables) and --enable-optimize/--disable-debug. Also, you should be able to use --disable-xul option. However, you need to be aware that options like --disable-xul create builds that aren't quite as well tested as the official XULRunner. Other options that should be ok in a simple application:

--disable-jsd           Disable JavaScript debug library
--disable-plugins       Disable plugins support
--disable-view-source   Disable view source support
--disable-accessibility Disable accessibility support
--disable-printing      Disable printing support
--disable-crashreporter Disable breakpad crash reporting
--disable-mathml        Disable MathML support
--disable-installer     Disable building of installer
--disable-updater       Disable building of updater
--disable-activex       Disable building of ActiveX control
--disable-activex-scripting  Disable building of ActiveX scripting support (win32)
--disable-feeds         Disable feed handling and processing components

You can find other options by searching for MOZ_ARG_DISABLE_BOOL in configure.in.

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