[英]Batch Builds in Visual Studio 6 for VC++ project
In VS 2008 and VS 2010, one can easily create a solution and modify the "Solution Configuration". 在VS 2008和VS 2010中,可以轻松创建解决方案并修改“解决方案配置”。 We can choose what configuration each project gets built in when we trigger a build at the solution level.
当我们在解决方案级别触发构建时,我们可以选择构建每个项目的配置。
Is such a facility available in the Visual Studio 6.0? Visual Studio 6.0中是否提供此类工具?
In my experience: when a configuration is chosen (form the list available) in VS6 for a VC++ project, the dependencies (which themselves have multiple configurations defined) get built in some random order. 根据我的经验:当VS6中为VC ++项目选择配置(从可用列表中)时,依赖关系(它们自己定义了多个配置)以某种随机顺序构建。 There is no way to control the configurations of dependencies at build time.
在构建时无法控制依赖项的配置。
"Batch Build" does come close to this but is not as flexible for my purpose. “批量构建”确实接近这一点,但对我的目的来说并不灵活。
I have tried various options in the VS6. 我在VS6中尝试了各种选项。 Hope I am clear.
希望我很清楚。
Here is a link on the MSDEV command line. 这是MSDEV命令行上的链接。 https://msdn.microsoft.com/en-us/library/aa699274(v=vs.60).aspx
https://msdn.microsoft.com/en-us/library/aa699274(v=vs.60).aspx
There is a way to control the building of dependencies. 有一种方法来控制相关性的建筑。 Specify
/NORECURSE
and dependencies will not be built. 指定
/NORECURSE
和依赖项将不会构建。
I use /REBUILD
with /NORECURSE
to keep the dependencies from getting built. 我使用
/REBUILD
和/NORECURSE
来保持依赖关系的构建。
And I build each project one at a time inside the workspace in a bat file by doing a chdir to the subdirectory and calling MSDEV just for that subproject: 我通过对子目录执行chdir并仅为该子项目调用MSDEV,在bat文件中的工作区内一次构建一个项目:
msdev myproject.dsp /MAKE "myproject - Win32 Debug" /REBUILD /NORECURSE > Build.log
Then I cd
to the next project directory one at a time. 然后我一次
cd
到下一个项目目录。
On a side note, I had difficulties for several years where NMAKE
would not work for my specific tasks. 另一方面,几年来我遇到了困难,
NMAKE
无法完成我的具体任务。 Turns out that the PATH
environment variable inside MSDEV (Visual Studio 6.0) is different from the PATH
environment variable of a command shell you would run NMAKE
on. 原来,
PATH
内MSDEV(Visual Studio中6.0)环境变量是来自不同 PATH
的指令壳,你会运行的环境变量NMAKE
上。
The Path used by the MSDEV
shell is the %PATH%
at the time Visual Studio 6 was installed. MSDEV
shell使用的路径是Visual Studio 6安装时的%PATH%
。 We use this and poke the registry as needed for MSDEV
to get the correct path setup when switching revisions of our software; 我们使用它并根据
MSDEV
需要戳注册表,以便在切换软件版本时获得正确的路径设置; however this doesn't help update the %PATH%
. 但这无助于更新
%PATH%
。 The MSDEV
path can be queried with a query script. 可以使用查询脚本查询
MSDEV
路径。 I don't have my example handy. 我没有方便的例子。
That is why builds in MSDEV
sometimes work when builds using the command line don't, as the path to DLLs differ, and any custom build steps that run .exe will not work outside of the MSDEV environment unless the path is updated. 这就是为什么在使用命令行的构建时,
MSDEV
构建有时不起作用,因为DLL的路径不同,并且除非路径更新,否则任何运行.exe的自定义构建步骤都不能在MSDEV环境之外工作。
I have a script somewhere that reads the queries the registry to extract the MSDEV path and update PATH of a shell so that batch scripts doing nmake will work as they would inside the MSDEV shell environment. 我有一个脚本,它读取注册表中的查询以提取MSDEV路径并更新shell的PATH,以便执行nmake的批处理脚本可以像在MSDEV shell环境中一样工作。 The problem with the REGISTRY QUERY is that the return arguments differ with different flavors of Windows (XP/SERVER2003/...).
REGISTRY QUERY的问题在于返回参数因Windows的不同风格(XP / SERVER2003 / ...)而异。
One thing I just discovered is that Incredibuild works with the old VS6.0 MSDEV IDE. 我刚刚发现的一件事是Incredibuild可以与旧的VS6.0 MSDEV IDE一起使用。 This is a game changer.
这是一个改变游戏规则的游戏。 It distributes builds.
它分发构建。 I'm evaluating it now, but it might be useful to anyone waiting for long VS6.0 builds.
我现在正在评估它,但它可能对等待长VS6.0版本的人有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.