使用最少的用户步骤部署NPAPI插件 [英] Deployment of NPAPI plugin with minimal user steps

查看:203
本文介绍了使用最少的用户步骤部署NPAPI插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

情况:我已经为我的IE用户编写了一个ActiveX控件,工作原理完美。我建立了.ocx,CAB它,签署它,并将其放在站点与EMBED标签。用户加载页面,黄色条显示询问他们是否要安装它们:他们所要做的就是点击它,我们已经关闭。



现在我需要为FF,Chrome和Safari(在Mac上)构建支持。从我的研究,NPAPI是这样做的方式,Firebreath应该使它更容易。但是从我所看到的,部署并不容易。 Windows用户必须在DLL上运行regsvr32(我的网络用户实际上不会这样做)。我不知道Mac上会发生什么我相信用户必须将其复制到像/ Library / Internet\ Plugins /这样的目录,这也是一个非启动的部署。 Firefox用户将下载/运行.xpi。 Chrome应该运行.crx。



有没有人有这方面的经验?您如何为其他大型3浏览器轻松实现部署NPAPI插件?

解决方案

这是FireBreath用户提出的一个问题,所以可能是在一个比google项目更容易找到的论坛上更详细地回复的时间。



首先,为了清除regsvr32的事情,FireBreath确实支持所有浏览器的自动注册;这意味着当您调用regsvr32时,它不仅会为IE安装注册表项,还可以使用DReJ链接的方法(对于该信息为+1,感谢,许多人不知道在哪里可以找到它) p>

然而,自动注册的DLL在安装程序世界和Microsoft中非常不鼓励。这有很多原因。您完成了一个很好的工作,总结您的帖子中的其他安装选项;您可以在IE上使用.cab,在Firefox上使用.XPI,但当然这些在其他浏览器上也不会帮助您。



FireBreath团队推荐的方法(我领导)是为所有浏览器使用MSI安装程序。就个人而言,我不喜欢在不同浏览器上进行安装,因此我使用javascript来检测插件的存在(或不存在),然后提示用户下载并运行MSI安装程序。



FireBreath支持使用WiX构建MSI安装程序。如果您在计算机上安装WiX 3.0或更高版本,并重新运行准备脚本,则会创建一个_WiXInstaller项目,该项目将构建一个基本的MSI,作为Visual Studio构建过程的一部分,为所有浏览器安装插件。您可以修改将留在您的主目录中的.wxs模板进行自定义。



更多信息可以在FireBreath wiki上找到:
http://www.firebreath.org/display/documentation/WiX+Installer+Help
http://www.firebreath.org/display/~me@iaincollins.com/Potential+Installer+Improvements



如果您真的爱上使用您的。用于IE的cab安装程序(我已经遇到了问题,但有些似乎与他们有好运),您可以将MSI文件分发到CAB中,并在安装CAB时运行。这样做的优点是,当您安装MSI时,它会安装IE,Firefox,Safari,Chrome和Opera(以及其他与这些浏览器使用的相同插件技术兼容的浏览器)的所有内容。



作为一个简单的说法,MSI是安装插件的理想解决方案(而不是使用调用DllRegisterServer,如regsvr32)的原因是MSI是基于事务的,所以当你卸载它总是反转放入的东西;这意味着您不用担心支持卸载10个不同的旧安装程序版本,将其放在不同的地方等等,因为MSI系统在升级时需要清理一切。



希望有帮助!


Situation: I've already written an ActiveX control for my IE users which works perfectly. I build the .ocx, CAB it up, sign it, and put it on the site with an EMBED tag. Users load the page, the yellow bar shows up asking if they want to install it: all they have to do is click it, and we're off.

Now I need to build support for FF, Chrome, and Safari (on Mac). From my research, NPAPI is the way to do this, and Firebreath is supposed to make it easier. But from what I have read, deployment is not so easy. Windows users would have to run "regsvr32" on a DLL (which none of my web users would actually do). I have no idea what would happen on a Mac. I believe the user has to copy it to a directory like /Library/Internet\ Plugins/, which is also a non-starter for deployment. Firefox users would download/run an .xpi. Chrome is supposed to run a .crx.

Does anyone out there have experience with this? How do you do a easy-for-users-to-run deployment of an NPAPI plugin for the other big 3 browsers?

解决方案

This is a question that is raised a lot by FireBreath users, so it's probably about time I responded in more detail on a forum that is easier to find than the project google group.

First of all, to clear up the regsvr32 thing, FireBreath does indeed support "self registering" for all browsers; that means when you call regsvr32 it installs registry keys not just for IE but also for NPAPI browsers using the methods linked to by DReJ (+1 for that info, btw, thanks. Many don't know where to find it).

However, self-registering DLLs is highly discouraged in the installer world and by Microsoft. There are a lot of reasons for this. You've done a pretty good job of summarizing the other install options in your post; You can use a .cab on IE and a .XPI on firefox, but of course those don't help you on other browsers.

The method recommended by the FireBreath team (which I lead) is to use an MSI installer for all browsers. Personally, I dislike having things work differently on different browsers for an install, so I use javascript to detect the presence (or absence) of the plugin and then prompt the user to download and run the MSI installer.

FireBreath has "built-in" support for building MSI installers with WiX. If you install WiX 3.0 or later on your machine and re-run the prep script it will create a _WiXInstaller project that will build a basic MSI to install your plugin for all browsers as part of the Visual Studio build process. You can modify the .wxs template that will be left in your home directory to customize it.

More info can be found on the FireBreath wiki: http://www.firebreath.org/display/documentation/WiX+Installer+Help http://www.firebreath.org/display/~me@iaincollins.com/Potential+Installer+Improvements

If you are really in love with using your .cab installer for IE (I've had problems with them, but some seem to have good luck with them) you can distribute the MSI file inside your CAB and have it run when the CAB is installed. The advantage to this is that when you install the MSI it installs everything for IE, Firefox, Safari, Chrome, and Opera (as well as other browsers which are compatible with the same plugin technologies that those browsers use).

As a quick note, the reason that an MSI is the ideal solution for installing plugins (as opposed to using something that calls DllRegisterServer like regsvr32) is that the MSI is transaction based, so when you uninstall it will always reverse what was put in; that means that you don't have to worry about supporting uninstalling 10 different old installer versions that put things in different places, etc, because the MSI system takes care of uninstalling everything cleanly when you upgrade.

Hope that helps!

这篇关于使用最少的用户步骤部署NPAPI插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆