Create an msi package which installs both 32-bit and 64-bit resources on a machine

☆樱花仙子☆ 提交于 2019-12-12 16:25:03

问题


I need to create an MSI package which installs both 32-bit and 64-bit .dll files of a firebreath based plugin on a machine.

What I want to achieve is have both resources installed and use the one suitable depending on the Browser (32-bit or 64-bit). For instance, if I have a 64-bit machine with Windows, Chrome 64-bit and Firefox 32-bit; I want to be able to use my plugin from both browsers.

To do so, I am using Visual Studio 2008 and Wix. Up to now I was able to create a 32-bit .dll which is converted in a 32-bit .msi and a 64-bit .dll which fails to be converted to a 64-bit .msi, due to a heat.exe bug. I get something similar to this: https://groups.google.com/forum/#!msg/firebreath-dev/HmGYEgZamUQ/35WJWfB4zegJ

The implementation mentioned before would create 2 different .msi installers (if the 64-bit msi didn't fail). What I would like to do is generate both .dll files (32-bit .dll and 64-bit .dll) and then package them in one single .msi installer which registers both.

Is this possible and if so what would be the best way to do it?


回答1:


Windows Installer doesn't support this. Strictly speaking an .MSI package is platform specific. There are some hacks and tricks to create a "hybrid" installer. This entails creating a 32bit MSI that subverts MSI checks to install files to 64 bit locations and custom actions to create 64bit registry keys.

The book answer is to create a 32bit and 64bit MSI and then encapsulate them in a bootstrapper that registeres itself with Programs and Features and installs the 2 MSI's under the covers. In WiX this would be accomplished using Burn to chain the 2 installers together.




回答2:


what I will do in such scenario is to focus mostly on 64 bit installer rather than creating different installer and bootstrapping it.
Below is my approach for the same, Please point me out if i am taking it wrong.

As Koka wants installer which will setup things for browser plugin and to make browser use according to platform. In such case consider
1> OS is 32 bit so there is no chance of 64 bit broswer, so keep installer simple with things setting up for 32 bit broswer.
2> Now os is 64 bit. chances are 32/64 bit browser, so create installer with different components for 32 bit and 64 bit, 32 bit component will setup things for 32 bit broswer and same with 64 bit component.And leave rest of the things to OS as 32 bit browser will always use 32 bit firebreath plugin.

I believe Regsvr will install plugin for all available browsers but it is considered bad practice in an installer.
this is not a full proof as there are many things while installing browser plugin that need to be taken care by developer while creating installer.



来源:https://stackoverflow.com/questions/27480764/create-an-msi-package-which-installs-both-32-bit-and-64-bit-resources-on-a-machi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!