将应用程序的 64 位和 32 位版本滚动到同一个二进制文件中? [英] Roll 64-bit and 32-bit versions of an app into the same binary?

查看:30
本文介绍了将应用程序的 64 位和 32 位版本滚动到同一个二进制文件中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们尝试在 64 位和 32 位平台上部署一个应用程序.有没有办法将代码的两个编译版本放在同一个二进制文件中,就像 Apple 和 NeXT 的 fat 二进制文件?

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?

理想情况下,我们可以发布一个 .exe 来决定执行哪个版本的代码.我们的目标是 Windows XP 及更高版本.

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

推荐答案

一种方法可能是提供一个引导应用程序来确定体系结构并选择合适的可执行文件来运行.所以基本上快捷方式或你的应用程序只需启动引导程序,然后启动适当的应用程序.如果您的应用程序是 Windows 服务,这可能会有点棘手.

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.

这篇关于将应用程序的 64 位和 32 位版本滚动到同一个二进制文件中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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