根据目标平台部署32位或64位DLL [英] Deploy 32-bit or 64-bit DLL depending on target platform
问题描述
我在32位系统上开发,生成的安装程序可执行文件通常适用于32位和64位平台。但是,我有一个第三方dll我在应用程序中使用(对于sqlite访问),它对32位和64位系统有不同的DLL,
在项目中引用了32位DLL。 64位系统上的用户使用标准安装时遇到问题,因为使用的DLL版本错误,但是从system.data.sqlite插件网站手动复制64位DLL( http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki )
到应用程序bin文件夹将它们排序。
I develop on a 32-bit system, and the setup executable generated generally works on both 32-bit and 64-bit platforms. However, I have this one 3rd party dll I use in the application (for sqlite access) which has different DLLs for 32-bit and 64-bit systems, the 32-bit DLL is referenced within the project. Users on 64-bit systems are having problems using the standard installation since the DLL used is the wrong version, however manually copying the 64-bit DLL from the system.data.sqlite plugin website (http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki) to the application bin folder sorts them out.
我的问题是,如何修改我的解决方案和我的安装项目,以便在安装时自动执行此操作?它应该能够检查应用程序是否安装在32位或64位平台上,并将相应的DLL部署到
bin文件夹中。
My question is, how do I modify my solution and my setup project so that this happens automatically on install? It should be able to check whether the application is being installed on a 32-bit or 64-bit platform, and deploy the appropriate DLL into the bin folder.
推荐答案
这是我必须分开制作两个单独的安装项目的点,一个针对32位平台而另一个针对64位?或者因为它只是一个DLL我可以有一个安装项目并使用自定义操作处理64位DLL覆盖,
或者我可以将两个DLL放入目标文件系统中,并使用"Windows安装程序条件",并且如果是这样,我如何检查目标平台?
Is this the point where I have to diverge to make two separate setup projects, one targeted for 32-bit platforms and onother for 64-bit? Or as it's just one DLL could I have a single setup project and handle the 64-bit DLL overwrite with a custom action, or can I put both DLLs into the target file system with "windows installer conditions", and if so how can I check the target platform?
这篇关于根据目标平台部署32位或64位DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!