VC6 : compiles VC++ v.6
Download Files
Changes
- Initial Version
Installation
- copy jarrizza.jar into directory ant\lib
- add the following line to your build.xml
- <taskdef name="vc6" classname="com.arrizza.ant.taskdefs.VC6"/>
Notes
This taskdef compiles a VC6 C++ solution.
| Name | Required? | Default | Property | Notes |
| projectrootfolder | no | current dir | VC6_ROOT | the folder where the project folders are. |
| projectfolder | no | targetname | none | The project folder is assumed to have the same name as the ant target |
| project | no | targetname.dsp | none | The project file is assumed to have the same name as the ant target |
| buildmode | no | release | VC6BUILDMODE | typically release or debug; |
| compilerfolder | no | none | VC6COMPILERFOLDER | the folder where msdev.exe can be found |
| failonerror | no | true | none | if true, compilation stops on first failure. |
| logfile | no | null | VC6LOGFILE | all compilation output is redirected to this file |
| targets | no | targetname.dsp | none | a fileset indicating which .dsp to build |
| rebuild | no | true | none | true to rebuild, false to just build |
Logfile
All output from the compilation goes to standard output (Don't forget about ant's facility for
naming a listener task on the command line! See Listeners and Loggers at http://ant.apache.org/manual/index.html )
If you use a property
<property name='VC6LOGFILE' value='vc6out.txt' />
all vc6 task output will go to that file instead. Using a logfile attribute in a target override the property and direct all output
to the given file. This example shows that the output from testvc6_3 target will go to jaa3.txt and the output from
testvc6_4 will go to jaa4.txt:
<target name='testvc6_3' depends='init' >
<vc6 buildmode='${mode}' projectrootfolder='${srcdir}' logfile='jaa3.txt' rebuild='${rebuild}'>
<targets dir='${srcdir}' includes='**/atest3.dsp' />
</vc6>
</target>
<target name='testvc6_4' depends='init4' >
<vc6 buildmode='${mode}' projectrootfolder='${srcdir}' logfile='jaa4.txt' rebuild='${rebuild}'>
<targets dir='${srcdir}' includes='**/atest4.dsp' />
</vc6>
</target>
Targets
Here is an example of the Targets fileset. Given a directory structure like this:
D:\projects\test\ant_vc6\
\atest1\atest1.dsp
\atest2\atest2.dsp
\atest3\atest3.dsp
Then this build.xml will compile all the .dsp's
<project name='testvc'
default='testvc6'
basedir='.'>
<!-- Note: the classpath is unnecessary if you have jarrizza.jar already in your classpath -->
<taskdef name='vc6' classname='com.arrizza.ant.taskdefs.VC6' classpath='jarrizza.jar' />
<!-- ==================================== -->
<target name='init'>
<property name='srcdir' value='d:/projects/test/ant_vc6' />
<property name='mode' value='debug' />
</target>
<target name='testvc6' depends='init'>
<vc6 buildmode='${mode}' projectrootfolder='${srcdir}'>
<targets dir='${srcdir}' includes='**/*.dsp' />
</vc6>
</target>
</project>
The output will look like this:
D:\projects\test\ant_vc6>ant -v
Apache Ant version 1.5.1 compiled on October 2 2002
Buildfile: build.xml
Detected Java version: 1.4 in: E:\tools\jdk\jre
Detected OS: Windows 2000
parsing buildfile build.xml with URI = file:D:/projects/test/ant_vc6/build.xml
Project base dir set to: D:\projects\test\ant_vc6
Build sequence for target `testvc6' is [init, testvc6]
Complete build sequence is [init, testvc6]
init:
testvc6:
[vc6] Command= msdev.exe /out logfile.txt D:\projects\test\ant_vc6\atest1\atest1.dsp /make "all - debug"
/rebuild
[vc6] Command= msdev.exe /out logfile.txt D:\projects\test\ant_vc6\atest2\atest2.dsp /make "all - debug"
/rebuild
[vc6] Command= msdev.exe /out logfile.txt D:\projects\test\ant_vc6\atest3\atest3.dsp /make "all - debug"
/rebuild
BUILD SUCCESSFUL
Total time: 6 seconds
D:\projects\test\ant_vc6>
| Contact me about content on this page using john_web-at-arrizza-dot-com |
| For Web Master or site problems contact: webadmin-at-arrizza-dot-com |
| Copyright John Arrizza (c) 2001,2002,2003,2004,2005,2006,2007 |