gpt4 book ai didi

c++ - 无需运行必备软件的 DirectX 游戏

转载 作者:塔克拉玛干 更新时间:2023-11-03 07:30:31 24 4
gpt4 key购买 nike

我是 DirectX 编程的新手,我想知道应该如何创建 DirectX 游戏。

是否有一种方法可以打包所有需要的文件供人们运行而不需要额外的软件?我将添加他们需要安装 DirectX 的异常(exception)情况。我的意思是,当我尝试在未设置为创建 DirectX 项目的计算机上运行 DirectX 程序的可执行版本时,我收到类似“d3dx10_43.dll is missing”的错误,并且我安装了 directX 版本 11那台机器。现在我知道我可以将 d3dx10_43.dll 放在人们将要下载的文件夹中,但是这样做会不会有任何法律问题?

基本上,我想用最少的必备软件制作游戏,或者至少能够在没有任何法律问题的情况下将其包含在他们的下载中。 (我之所以说法律问题,是因为我知道 XNA 需要它的框架才能用它运行游戏……而且我知道你不允许在下载时打包 XNA 框架。)

谢谢。

杰森

最佳答案

  1. 如果您使用原生DirectX,您可以分发运行时库,它是免费的,您可以在安装DirectX SDK时查看详细信息。
  2. 无论如何,最终用户需要安装 dll 才能运行您的程序,因此要么他们自己安装运行时库,要么您将其与程序一起提供。

这是来自 DirectX SDK 2010(6 月)的 ELUA

b. Distributable Code. The software contains code that you are permitted to distribute in programs you develop if you comply with the terms below.

i. Right to Use and Distribute. The code and text files listed below are “Distributable Code.”

• DIRECTX REDIST.TXT Files. You may copy and distribute the object code form of code listed in DIRECTX REDIST.TXT files

DIRECT REDIST.TXT 说了什么

Redistributable Code is identified as all of the files in the following "Redist" directory on the DirectX SDK CD/Download:

redist/

redist 文件夹包含运行程序所需的运行时 dll 文件。

关于c++ - 无需运行必备软件的 DirectX 游戏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12926493/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com