创建具有x64和x86依赖项的安装程序 [英] Create installer with dependencies for x64 and x86

查看:150
本文介绍了创建具有x64和x86依赖项的安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C#开发具有多个依赖项的应用程序,其中一个依赖项在32位或64位方面有所不同.

当我编译应用程序时:这是编译的结果

在x64和x86文件夹中,找到了相同的依赖项(SQLite.Interop.dll),但是找到了特定于体系结构的文件(x86:1223 KB,x64:1575 KB).

如标题中所述,我想使用Visual Studo Installer为此应用程序创建一个安装程序.

当我将程序输出添加到应用程序文件夹"时,所有依赖项都出现了,除了x64或x86文件夹中的依赖项.如何根据计算机的体系结构添加这个著名的依赖项?如果必须创建2个不同的安装程序,如何将这种依赖关系添加到每个安装程序中?

提前谢谢!

解决方案

位数 : 有一些众所周知的限制用于Visual Studio安装程序项目 .也许可以快速浏览 其他常用工具 (不同部署工具功能的简要摘要)

单源 :高级安装程序可以执行某些操作花哨的时候可以用一个来源同时针对这两种架构.我不太确定他们会做什么,说实话. 编译器变量/预处理器构造(底部)来实现相同的目的.


链接 :

I'm developing an application in C # that has several dependencies, one of which is different in 32 bits or 64 bits.

When I compile the application: here is the result of the compilation

In the x64 and x86 folders, the same dependency is found (SQLite.Interop.dll), but an architecture-specific file (x86: 1223 KB, x64: 1575 KB).

As said in the title, I want to create an installer for this application using Visual Studo Installer.

When I add the program output to "Application folder", all the dependencies come, except the one in the x64 or x86 folder. How can I add this famous dependency according to the architecture of the computer? If I have to create 2 different installers, how can I just add this dependency to each installer?

Thank you in advance !

解决方案

Bitness: Different Packages are Required for Different Processor Architectures. 64-Bit installers can install both 32-bit and 64-bit components, 32-bit setups can only install 32-bit components. 32-bit setups run on 64-bit systems, but 64-bit packages do not run on 32-bit systems. In other words you need two different installers, one for 32-bit and one for 64-bit.

File Inclusion: I don't use this project type (for reasons that will be clear below), but you should be able to add the file manually via Right Click Project => Add => File... and then compile two separate setups.

Custom Actions: Beware of bitness issues with custom actions when targeting different platforms. I usually build custom actions using 32-bit code.


Deployment Tools: There are some well-known limitations for Visual Studio Installer projects. Maybe have a quick look at other, common tools (terse summary of different deployment tools capabilities).

Single Source: Advanced Installer does something fancy to allow targeting both architectures with one source. I am not quite sure what they do to be honest. Installshield has similar constructs. WiX can use compiler variables / preprocessor constructs (bottom) to achieve the same.


Links:

这篇关于创建具有x64和x86依赖项的安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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