根据 FireFox 的请求 MSI 安装 dll

发布于 2024-12-03 13:58:09 字数 424 浏览 4 评论 0 原文

在新的 Firefox 中,随着我们与之交互的 XPom 界面的变化,我们正在发布越来越多的库。我们有 10 个 dll,并且还在不断增加,每个 dll 的大小接近 2M。

这个尺寸是一些用户关心的问题。

当我们考虑重组库以分离我们可以在它们之间共用的部分时,我们正在考虑如何在支持版本升级的同时减少磁盘空间。

例如,用户安装了 FireFox 3.6 和 4.0,当安装我们的产品时,我们为每个版本安装一个 dll。当 Firefox 升级到 4.0(例如升级到 6.0)时,我们现在如何从 msi 安装缺少的 dll 以支持 6.0。

关于我们如何实现这一目标有什么想法吗? 我们的担心是无缘无故的吗?

我的第一个想法是我们“AllowAdvertise”,当 FF 尝试按照 chrome 的指示加载 dll 时,它会导致安装,但它似乎不起作用。

With the new firefox we are shipping more and more libraries as the XPom interfaces we interact with are changing. We are at 10 dlls and increasing, each with a size of almost 2M.

This size is a concern for some users.

While we look at restructuring the library to seperate the parts we can make common between them, we are thinking about how we might reduce space on the disk while supporting version upgrades.

For instance, user has FireFox 3.6 and 4.0 installed and when our product is installed we install a dll for each version. When Firefox is 4.0 upgraded (say to 6.0) how might we now install from the msi the missing dll for 6.0 support.

Any ideas on how we could achieve this?
Are we worrying for no reason?

My first thought was we 'AllowAdvertise' and when FF tries to load the dll as directed by chrome it will cause the install, it doesn't seem to work.

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

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

发布评论

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

评论(2

九歌凝 2024-12-10 13:58:10

我猜您的扩展仅适用于 Windows,因此支持多个平台不是问题。可能的短期解决方案:

  • 为每个 Firefox 版本提供单独的扩展包,将其标记为仅与该 Firefox 版本兼容(例如 minVersion 4.0 和 maxVersion 4.*) 。
  • 安装扩展程序时,请安装与用户安装的 Firefox 版本兼容的版本。
  • 确保您的扩展程序有一个指向您的服务器的 updateURL 条目。 URL 中包含 %APP_VERSION% 非常重要。
  • 确保测试 Firefox 测试版并及时为下一个 Firefox 版本准备新的扩展版本(版本安排在周二每 6 周,下一次发布将于 9 月 27 日发布)。
  • 配置您的服务器以根据所使用的 Firefox 版本将不同的软件包指示为更新。因此,%APP_VERSION% 4.0.1 的更新检查将被发送到 extension-ff4.xpi,而 %APP_VERSION% 6.0 将收到 扩展-ff6.xpi

当应用程序更新时,Firefox 将始终检查扩展程序更新。如果您能给它一个兼容的更新,它就会安装它。但是每六周准备一次新的包需要大量的努力,我猜你想尽快重构你的代码/移动到 js-ctypes。哦,我认为您需要忽略某些用户安装了多个 Firefox 版本的不太可能的情况。

I guess that your extension is Windows-only so supporting multiple platforms is not an issue. A possible short-term solution:

  • Have a separate extension package for each Firefox version, mark it as compatible with this Firefox version only (e.g. minVersion 4.0 and maxVersion 4.*).
  • When your extension is installed, install the version that is compatible with user's installed Firefox version.
  • Make sure that your extensions have an updateURL entry that is pointing to your server. It is important to have %APP_VERSION% in the URL.
  • Make sure to test Firefox betas and prepare a new extension version in time for the next Firefox release (releases are scheduled on Tuesdays every 6 weeks, next release being on September 27th).
  • Configure your server to indicate different packages as updates depending on the Firefox version used. So an update check with %APP_VERSION% 4.0.1 would be sent to extension-ff4.xpi while %APP_VERSION% 6.0 would get extension-ff6.xpi.

Firefox will always check for extension updates when the application is updated. If you can give it a compatible update it will install it. But preparing new packages every six weeks requires tons of effort and I guess that you want to refactor your code/move to js-ctypes ASAP. Oh, and I think that you need to ignore the unlikely scenario that some user has more than one Firefox version installed.

素罗衫 2024-12-10 13:58:09

我的第一反应是建议您放弃 XPCOM 并转向 js-ctypes。毕竟,这是 Mozilla 正在推动扩展开发人员的方向(请参阅 Wladimir Palant 的评论 例如)。如果您的二进制代码中没有任何内容绝对需要使用 XPCOM,那么您会更乐意提供一个在需要时通过 js-ctypes 与 JS 交互的 DLL。

My first reaction is to suggest that you move away from XPCOM and towards js-ctypes. After all, this is the direction that Mozilla is pushing extension developers (see Wladimir Palant's comments for example). If there isn't anything in your binary code that absolutely positively requires use of XPCOM, you'll be much happier to ship a DLL that interfaces with JS when needed via js-ctypes.

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