为 Visual C++ 设置 1 步构建应用
有什么建议吗?代码和艺术品/资产都在 SVN 中,我们不想在有人建议之前将其移植到 GCC 或其他编译器! 简单性和最小化第三方工具是首选,因为我们没有构建服务器,它可能仍会在开发人员的 PC 上运行,但我们不希望他们只是手动进行构建并将其打包。
它基本上只是一个包含多个项目的 C++ 解决方案,此外我们还需要构建一个 Inno Setup 安装程序。
现在,这是一个 3 步过程(如果您包括将版本上传到 FTP,则为 4 步):
- 从 SVN 获取
- 从 VC++ 构建解决方案
- 运行 Inno 以创建打包的包 安装人员
Any suggestions? Code and artwork/assets are all in SVN, and we don't want to port it to GCC or another compiler before anyone suggests it!
Simplicity and minimising 3rd-party tools is preferred, since we don't have a build-server it'll probably still be run on a developer's PC but we don't want them just doing a build manually and packaging it up.
It's basically just a C++ solution with several projects, plus we have an Inno Setup installer to build.
Right now it's a 3-step process (or 4 if you include uploading the release to FTP):
- Get from SVN
- Build solution from VC++
- Run Inno to create the packaged
installer
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 MSVC 前、后和自定义构建步骤 为此,他们通过 Windows 命令行运行程序。另请参阅: http://blogs.msdn.com/b/visualstudio/archive/2010/04/26/custom-build-steps-tools-and-events.aspx
You can use MSVC pre, post & custom build steps to do this, they run programs through the windows command line. also see this: http://blogs.msdn.com/b/visualstudio/archive/2010/04/26/custom-build-steps-tools-and-events.aspx
如果您无法使用 VS 构建步骤来完成此操作(请参阅 Necrolis 的答案),那么过去我使用过使用 nmake 运行的 makefile,它包含在 VS 中(您需要使用正确的环境设置启动命令提示符)对于 VS - 开始菜单上有一个快捷方式。)
现在我使用 FinalBuilder ( http://www.finalbuilder. com/home.aspx )用于所有此类内容,这很昂贵并且不能满足您“非第三方”的愿望,但它是一个出色的工具。一旦你进入它,你会意识到你可能想要做的步骤远多于仅仅编译/打包 - 你可能想要增加版本号、移动文件、创建目录等。FB 很好诸如此类的事情。
If you can't do it with the VS build steps (see Necrolis' answer), then in the past I've used makefiles run with nmake, which is included with VS (you need to start a command prompt with the right environment settings for VS - there's a shortcut on the start menu.)
Nowadays I use FinalBuilder ( http://www.finalbuilder.com/home.aspx ) for all this sort of stuff, which is expensive and doesn't meet your 'not 3rd party' desire, but is an excellent tool. Once you get into it, you'll realise that there are probably far more steps you'd like to do than merely compiling/packaging - you probably want to be incrementing version numbers, moving files around, creating directories, etc. FB is good at that sort of stuff.
我正在为其他用户添加最新答案:
目前有可用的第 3 方扩展,它将 Inno Setup 集成到 Visual Studio 中,并允许您直接从 IDE(或使用 MSBuild 从命令行)构建安装程序。
可以使用前、后和自定义构建步骤、批处理文件、代码签名、通过 Windows 命令行运行程序等。
有关 Visual Studio Marketplace 的更多信息,请查看 Visual Studio Marketplace。安装程序:https://marketplace.visualstudio.com/items?itemName= unSignedsro.VisualInstaller
I am adding up to date answer for other users:
Currently there is 3rd party extension available which integrates Inno Setup into Visual Studio and allows you to build installers directly from IDE (or from command line using MSBuild).
It is possible to use pre, post & custom build steps, batch files, code signing, running programs through the windows command line etc.
Check Visual Studio Marketplace for more info about Visual & Installer: https://marketplace.visualstudio.com/items?itemName=unSignedsro.VisualInstaller