最低 DirectX 9.0c 版本以及如何检查它

发布于 2024-09-10 04:40:58 字数 434 浏览 5 评论 0原文

我们基于 Windows C++ Ogre 的游戏即将完成。在我们公开发布之前,我们必须解决这个问题:

如果没有更新到最新的 Dx9.0c 版本,Ogre 在许多测试计算机上会崩溃。所有这些计算机都已经安装了 9.0c,但这一定是旧操作系统预安装的子版本,因此崩溃了..?

第一个问题是:我如何确保用户拥有正确的 9.0c 版本,以便游戏不会在用户面前崩溃,而是显示类似“从 那里...."?

第二个问题是:是否有一种标准的、自动化的方法可以在游戏安装过程中将用户的计算机更新到最新的 9.0c 版本?那将是最好的解决方案。

提前非常感谢,

比尔

Our Windows C++ Ogre-based game is nearing completion. Before we publicly release it, we have to solve this matter :

Ogre crashes on many test-computers if they are not updated to the latest Dx9.0c version. All these computers already had 9.0c installed, but that must have been an older OS-pre-installed sub-version, hence the crash..?

The 1st questions is : how can I ensure that a user has the correct 9.0c version so that the game doesn't crash on the user's face, but instead show a message like "Go get the latest 9.0c version from there...."?

The 2nd question is : is there a standard, automated method to update the user's computer to the latest 9.0c version during the game's installation? That would be the best solution.

Many many thanks in advance,

Bill

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

娇妻 2024-09-17 04:40:58

第一个问题是:我如何确保用户拥有正确的 9.0c 版本,以便游戏不会在用户脸上崩溃,而是显示类似“从那里获取最新的 9.0c 版本”的消息....”?

最好的办法是从游戏安装程序中静默更新/安装 DirectX。以及其他必需的系统组件,如 PhysX、vcredist 等。静默,而不询问“是否要安装 DirectX”(用户可能不知道他是否需要 DirectX,如果已经安装,则什么也没有)将会发生)。
请参阅游戏开发人员的 DirectX 安装。另外,我建议您查看 "安装和维护游戏”

这是因为(我相信)当你制作游戏时,你应该假设计算机用户是完全白痴。也就是说,如果您给出指示,则预期用户会搞砸、损坏系统并因此责怪您。与静默安装 DirectX 相比,它几乎是万无一失的。而且,它更加方便 - 用户无需寻找 DirectX 下载,安装后即可立即播放。

第二个问题是:是否有一种标准的、自动化的方法可以在游戏安装过程中将用户的计算机更新到最新的 9.0c 版本?这将是最好的解决方案。

据我所知,DXSDK 包括 DirectX 可再发行组件,并且据我所知,您应该在您的产品中包含这些可再发行组件。

The 1st questions is : how can I ensure that a user has the correct 9.0c version so that the game doesn't crash on the user's face, but instead show a message like "Go get the latest 9.0c version from there...."?

The best idea is to update/install DirectX silently from Game Installer. Along with other required system components like PhysX, vcredist, etc. Silently, without asking "do you want to install DirectX" (user may not know if he needs DirectX, and if it is already installed, nothing will happen).
See DirectX Installation for Game Developers. Also, I'd recommend to see "Instalation and Maintenance of Games"

This is because (I believe that) when you're making games, you should assume that computer user is total idiot. I.e. if you give instructions, expect that user will screw up, damage the system and blame you for it. Compared to that silent DirectX install is almost fool-proof. Also, it is much more convenient - user won't have to hunt for DirectX download, and will be able to play immediately after installation.

The 2nd question is : is there a standard, automated method to update the user's computer to the latest 9.0c version during the game's installation? That would be the best solution.

AFAIK, DXSDK includes DirectX redistributable, and AFAIK you're supposed to include those redistributables with your product.

灯下孤影 2024-09-17 04:40:58

我也遇到了同样的问题,但由于 Ogre 开箱即用地支持 Direct3D 和 OpenGL,我只是尝试加载所需的 directx 库(d3dx9_42.dll)的库,如果失败,则跳过 directx 渲染系统的加载。 (我将渲染系统插件的加载从plugins.cfg 文件中移出,以在初始化时手动执行)。在这种情况下,我的应用程序继续在 OpenGL 上运行。

当然,如果您有特定于 directx 的代码(例如 hlsl 着色器或类似的代码),则这不起作用,在这种情况下,只需包含 redist。只要检查一下微软和 EULA,他们似乎反对默默地运行 redist,因为他们希望用户首先接受协议。因此,为了 100% 正确,您需要以非静默方式运行 redist,或者在安装程序中包含带有您自己的许可证的 MS EULa。

(人们似乎已经做过并侥幸逃脱的另一件事,这意味着他们的应用程序运行没有任何问题,只是在他们的项目中包含所需的 directx dll(例如 d3dx9_42.dll 或其他)。只需将它们复制到垃圾箱目录,这样渲染系统总能找到它们,这似乎不是一个好方法,但是嘿,如果它有效,为什么不呢?)

I had the same problem, but since Ogre supports both Direct3D and OpenGL out of the box, I just tried to LoadLibrary of the neededx directx lib (d3dx9_42.dll), and if it failed, skipped the loading of the directx rendersystem. (I moved out the loading of rendersystem plugins from the plugins.cfg file to manually doing it in the initialization). In that case, my application proceeded to run on OpenGL instead.

Of course, this doesn't work if you have directx-specific code like hlsl shaders or something like that, in that case, just include the redist. Just check with Microsoft and EULAs, it seems that they have something against running redist silently, because they want the user to accept an agreement first. So to be 100% correct you need to run the redist in a non-silent way, or include MS EULa with your own license in your installer.

(Another thing that people seem to have done and got away with it, meaning that their application ran without any problems, is just including the needed directx dlls with their project (like d3dx9_42.dll or whatever). Just simply copying them to the bin directory, that way the render system would always find them. This doesn't seem to be a nice way to do it, but hey, if it works, why not?)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文