windowswindows-xp64-bitcross-platformfat-binaries

Roll 64-bit and 32-bit versions of an app into the same binary?


We have an application we're trying to deploy on both 64 bit and 32 bit platforms. Is there a way to put both compiled versions of the code in the same binary, a la Apple and NeXT's fat binaries?

Ideally we could ship one .exe that decides upon execution which version of the code to execute. We're targeting Windows XP and later.


Solution

  • One approach is perhaps to supply a bootstrapping application that determines the architecture and chooses the appropriate executable to run. So basically the shortcut or what have you to your application simply starts the bootstrapper which in turn starts the appropriate application. This can be a little more tricky if your application is a Windows service.