开发者

Is there a tool that will combine a 32 bit + 64 bit application and pack them together in one 32+64 bit application

开发者 https://www.devze.com 2023-04-11 07:25 出处:网络
In Windows 2008 R2 server (server core installation) wow64 is no longer a required component. I can compile a 32 bit application using the same source code as a 64 bit application (with a few ifdefs

In Windows 2008 R2 server (server core installation) wow64 is no longer a required component.

I can compile a 32 bit application using the same source code as a 64 bit application (with a few ifdefs here and there).

Is there a tool that puts both versions of my app in one executable so that my 32+64 bit applicati开发者_如何学Pythonon will run on a pure 32-bit Windows and a 64-bit only Windows?

Note that I am not talking about a packer because the packer itself will be either 32 or 64 bit.


No. An EXE's header is marked with the processor architecture supported by the code contained in the EXE. Use DUMPBIN.EXE -HEADERS to explore.

EXE's report the "machine" type as: x86: 0x14C x64: 0x8664 ARM: 0x1C4

If you want to deploy your app, build a version for x86, a version for x64 (ARM comes later with Win8) and author a setup package (MSI) that can dynamically examine the architecture of the machine onto which you're installing the app, and lay down one or both of the apps. This is how, for example, Adobe are now distributing Flash x86 and Flash x64 in the latest Flash player download.

If you want to build a truly universal binary, build it in .NET and mark it as targetting "Any" CPU. Your app will then be JITted to the architecture of your machine (or the hosting process in the case of an add-in component).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号