为我的游戏创建一个安装程序(.exe)
Create an installer for my game(.exe)
我用Glut C++构建了一个保龄球游戏,并有我的.exe文件。
现在我想为这个游戏创建一个安装程序。
我想做的是:-
当我的安装程序运行时,glut32.dll被粘贴在system32文件夹中,我的游戏的.exe文件在桌面上或任何地方。
我该怎么做Iexpress可能无法做到这一点。
注意:-glut32.dll必须在system32文件夹中才能运行此游戏。
错误。glut32.dll
不必在system32
中。它只需要位于.exe
文件旁边。(或系统PATH
中的某个位置)。
您应该能够创建一个安装程序,使用InstallShield或IDE中的类似向导来解压缩您的文件。
我会研究NSIS(Nullsoft Scriptable Install System)
从简单教程开始:http://nsis.sourceforge.net/Simple_tutorials
它们将向您展示如何简单地将一些文件复制到用户的计算机上。类似这样的东西:
# define the name of the installer
outfile "game_installer.exe"
# define the directory to install to
installDir $DESKTOP
# default section
section install
# define the output path for this file
setOutPath C:WindowsSystem32
# define what to install and place it in the output path
File glut32.dll
# define the output path for this file
setOutPath $INSTDIR
# define what to install and place it in the output path
File bowling_game.exe
sectionEnd
注意:Bartek Banachewicz和其他人是正确的。你真的不应该把非system.dls和你所有重要的system.dls放在一个目录里。世界不会因此而结束,但这不是最好的做法。也许你可以与NSIS合作开发一个可以随心所欲的安装程序。然后,我建议您将OpenGL/GLUT库/标头安装在更合适的位置。
相关文章:
- 我试图制作一个程序,要求用户输入问题和答案,但程序循环不正确
- 我写了一个C++程序来模拟Enigma机器.我没有得到输出
- 如何使用C++读取另一个程序中的源代码输出
- 3-3. 编写一个程序来计算每个不同单词在其输入中出现的次数
- 我的目标是编写一个程序来计算和存储字符串在字符数组中出现的位置
- 使用另一个程序调用正在运行的 C++ 程序中的函数
- 我正在尝试制作一个程序,在添加 n 天(整数)后告诉一个人什么是一天(例如星期一等)
- 编写一个程序,帮助Tudio将MIDI音符转换为名称和八度音阶
- 有没有办法在一个C++程序中同时使用 FFTW 和 cuFFTW?
- 一个C++程序,用于在输入位数时输出具有特定位数的 .txt 文件中的所有数字
- C++将结构复制到另一个程序的资源
- 我编写了一个程序来显示数组的内容,但它显示的是它的地址
- 我已经做了一个程序来使用队列链C++表显示学生姓名和身高,现在我想以我不知道如何显示的顺序显示它
- 我需要编写一个程序来读取一个文件,该文件将输出所有唯一的整数,如果已经看到整数,它将被关闭
- 仅在 boost::hash_combine 中运行一个程序期间保证确定性
- 如何制作一个程序,它使用特定单词加密和解密消息?
- 尝试创建一个程序来查找非二叉树的高度.最终得到一个很长的循环,没有答案
- 编写一个程序,提示用户输入一个整数,然后输出数字的单个数字和数字的总和
- 如何编写一个程序来打印特定基数的前N个数字
- 如何创建一个C++程序来读取字符串数组中的信息,然后将其排序到类中?