为各种窗口环境创建单个安装程序 [英] creating single installer for various window environments

查看:83
本文介绍了为各种窗口环境创建单个安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有多个环境,如下所示.

具有32位Office 2010,Visio 2010(32位)的32位操作系统
具有64位Office 2010,Visio 2010(64位)的64位OS
具有32位Office 2010,Visio 2010(32位)的64位OS
带有32位Office 2003,Visio 2003(32位)的64位操作系统
具有32位Office 2007,Visio 2007(32位)的64位操作系统

我的应用程序中只有很少的visio功能无法在所有环境中正常工作.我不想为我的应用程序创建单独的安装程序.我想创建一个在所有环境中都能正常工作的安装程序.
我的方法是为每个冲突的功能编写代码并创建单独的dll,以便我的应用程序能够检测到计算机配置并使用所需的dll.

请提出更多建议..

问候,
奇塔
9011040820

we have multiple environments as shown below.

32-bit OS with 32-bit Office 2010, Visio 2010 (32-bit)
64-bit OS with 64-bit Office 2010, Visio 2010(64-bit)
64-bit OS with 32-bit Office 2010, Visio 2010(32-bit)
64-bit OS with 32-bit Office 2003, Visio 2003 (32-bit)
64-bit OS with 32-bit Office 2007, Visio 2007 (32-bit)

There are few functionality of visio in my application that do not work properly in all environments. I don''t want to create separate installer for my application. I want to create one installer which should work fine in all environments .
My approach is write code for each conflicting functionality and create separate dll ,so that my application will detect the machine configuration and use the required dll.

please suggest anything more..

Regards,
Chitta
9011040820

推荐答案

成员7946537397,

您是否考虑过使用工厂模式 [
Member 7946537397,

Have you considered using the factory pattern[^] to make the change you''re looking for?

A factory abstracts the details of which implementation as long as they all have the same interface. I linked above, but there are many other great resources for how to do this on the web.

You can create factory/class that returns an interface to the correct DLL you''re looking for.

I would solve this problem by having all of the DLLs installed on the machine and having the factory link the the correct one for each operating system. The interface will be the same so you''re code won''t have to change too much.

Good luck!

Hogan


这篇关于为各种窗口环境创建单个安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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