Eric, We started using the newer try/catch tasks and removed that section. Here is our current vb6.make task:
--------------------------------------- <target name="vb6.make"> <call target="vb6.fixvbp" /> <delete file="build.error" if="${file::exists('build.error')}" /> <!-- write out ref file --> <property name="tempexe32" value="${vbp::getvalue(vbp, 'ExeName32')}" /> <if test="${string::get-length(tempexe32) == 0}"> <property name="tempexe32" value="${vbp::getvalue(vbp, 'Name')}" /> </if> <echo message="vbp: ${vbp}"/> <echo message="srcroot: ${srcroot}"/> <property name="exename32" value="${string::substring(tempexe32, 1, string::get-length(tempexe32) - 2)}" /> <echo file="${path::combine(path::combine(srcroot,project.module), path::get-file-name-without-extension(exename32) + '.ref')}" message="${vbp::get-references(path::combine(srcroot,vbp), 'projects.txt')}" /> <property name="conditional.compile" value="" /> <property name="conditional.compile" value="/D RELEASETYPE=1" if="${release.type == '1'}" /> <property name="conditional.compile" value="/D RELEASETYPE=2" if="${release.type == '2'}" /> <property name="conditional.compile" value="/D RELEASETYPE=3" if="${release.type == '3'}" /> <property name="conditional.compile" value="/D RELEASETYPE=4" if="${release.type == '4'}" /> <property name="conditional.compile" value="/D RELEASETYPE=5" if="${release.type == '5'}" /> <trycatch> <try> <exec program="vb6.exe" commandline="/m "${path::combine(srcroot,vbp)}" ${conditional.compile} /outdir "${path::combine(srcroot,project.module)}" /out build.error" resultproperty="vb6.result" /> </try> <catch> <!-- if this is not a library, then just fail --> <property name="vbp.type" value="${vbp::getvalue(vbp, '^Type=.*')}" /> <if test="${string::contains('.OleDll. .OleExe. .Control.', '.' + vbp.type + '.') == false}"> <fail message="vb6.exe failed. This is not a library, cannot switch compatiblity modes."/> </if> <trycatch> <try> <trycatch> <try> <!-- set compatiblity to project --> <echo message="${vbp::setvalue2(vbp, '^CompatibleMode=.*', '"1"', '^MajorVer=.*', 'CompatibleMode=')}"/> <exec program="vb6.exe" commandline="/m "${path::combine(srcroot,vbp)}" ${conditional.compile} /outdir "${path::combine(srcroot,project.module)}" /out build.error" /> </try> <catch> <!-- set compatiblity back to binary --> <echo message="${vbp::setvalue(vbp, '^CompatibleMode=.*', '"2"')}"/> <fail message="vb6.exe failed. Not a binary problem?"/> </catch> </trycatch> <!-- set compatiblity to binary --> <echo message="${vbp::setvalue(vbp, '^CompatibleMode=.*', '"2"')}"/> <exec program="vb6.exe" commandline="/m "${path::combine(srcroot,vbp)}" ${conditional.compile} /outdir "${path::combine(srcroot,project.module)}" /out build.error" /> </try> <catch> <fail message="vb6.exe failed. Not a binary problem?"/> </catch> </trycatch> </catch> </trycatch> <delete file="build.error" if="${file::exists('build.error')}" /> </target> --------------------------------------- You are correct in that custom function only loaded a file into a property (there was an issue with the built in version at one time, it stripped the last char, and I never went back to see if it got fixed). As I said, I need to update my scripts on the ccnet site, I have lots of really neat ones now :-) Including a set of tasks that create MSM files from VBPs (with the dependencies set correct). Lots of automagic stuff. John -----Original Message----- From: Eric Fetzer [mailto:[EMAIL PROTECTED] Sent: Friday, August 11, 2006 10:08 AM To: John Cole; Nant Users Subject: Re: [NAnt-users] Conditional Compile based on VB6 Return John, I ran into a function that you use in here that I can't find in NAnt or NAntContrib called: file::get-file Is this your own custom function, and if so, can I get a copy of it to put in the include file? Looks like it just extracts the text out of the file it targets. Thanks, Eric --- John Cole <[EMAIL PROTECTED]> wrote: > Eric, > We don't user DSR files too much (I think we have > an add-in that has them) > but nothing that we build with Nant. > > However, I did just write a little utility to > update a csproj with current > COM clsid's (similar to the fixvbp target in those > vb6 nant scripts). > > As far as instructions go, I haven't made any, but > we have modified the > scripts a lot, adding the ability to restart a > failed build where it left > off and merged our VB6 and .Net build scripts so we > can build everything in > a proper order. I'll see about documenting them and > posting the new > scripts. > > We basically have a projects.txt file that is a > comma separated file that > lists the VB6 projects in the proper build order. > All of our tasks are > geared to parsing that file to perform the builds. > > John > > -----Original Message----- > From: Eric Fetzer [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 10, 2006 5:03 PM > To: John Cole > Subject: RE: [NAnt-users] Conditional Compile based > on VB6 Return > > John, > > Googled you and cc.net and found your stuff. That's > GOOD stuff. Do you have any doc on how to use it > (an > example or anything). > > On perusal, I found a lot of stuff that you do that > I've already written C# console apps to do (I like > your way much better). Do you have any DSR > (designer > webclass) files you have to deal with? With these > guys, there's a problem in going from one machine to > the other. Each machine seems to have it's own > "typeinfocookie" stored on it for each dsr, and thus > you have to store them away before getting the code > from source control and then replace it again > afterward so that the app will still compile > (without > the GUI). I also wrote an app to fix the reference > dll guid's but am not too happy with it. I hack the > registry to find the GUID's, but it's really sketchy > where I'm getting the info from. I couldn't find > the > perfect place to search, but found one that works > for > our apps. If you want me to toss you a copy of all > the apps I've written to make up for VB's > lack-o-support, let me know and I'll bundle them > together. > > Thanks, > Eric > > > --- Eric Fetzer <[EMAIL PROTECTED]> wrote: > > > I'm not a cc.net dude, John, can you slip me a > link? > > > > --- John Cole <[EMAIL PROTECTED]> wrote: > > > > > Eric, > > > I posted some nant targets on the cc.net wiki > > that > > > will do what you want. > > > Take a look at those and see if those work for > > you. > > > We do the same thing > > > here. > > > > > > John > > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > > [mailto:[EMAIL PROTECTED] > > On > > > Behalf Of Eric Fetzer > > > Sent: Thursday, August 10, 2006 1:36 PM > > > To: Nant Users > > > Subject: [NAnt-users] Conditional Compile based > on > > > VB6 Return > > > > > > I'd like to do the following: > > > > > > Compile vb6 project > > > if(error) > > > { > > > Compile vb6 project with no compatibility > > > Compile vb6 project again with compatibility > > > if(error) break out of task and report error > > > } > > > Compile next vb6 project... > > > > > > Does anybody know how I would do this. I know I > > > could > > > put failonerror="false" on the vb6 task, but how > > > would > > > I know what the return code was from the vb6 > task > > > other than interrogating the output log? > > > > > > Thanks, > > > Eric > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam > > > protection around > > > http://mail.yahoo.com > > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to > support > > > web services, security? > > > Get stuff done quickly with pre-integrated > > > technology to make your job > > > easier > > > Download IBM WebSphere Application Server > v.1.0.1 > > > based on Apache Geronimo > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > _______________________________________________ > > > NAnt-users mailing list > > > NAnt-users@lists.sourceforge.net > > > > > > https://lists.sourceforge.net/lists/listinfo/nant-users > > > This email and any files transmitted with it are > > > confidential and intended solely for the use of > > the > > > individual or entity to whom they are addressed. > > If > > > you have received this email in error please > > notify > > > the sender. This message contains confidential > > > information and is intended only for the > > individual > > > named. If you are not the named addressee you > > should > > > not disseminate, distribute or copy this e-mail. > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > http://mail.yahoo.com > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > This email and any files transmitted with it are > confidential and intended solely for the use of the > individual or entity to whom they are addressed. If > you have received this email in error please notify > the sender. This message contains confidential > information and is intended only for the individual > named. If you are not the named addressee you should > not disseminate, distribute or copy this e-mail. > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support > web services, security? > Get stuff done quickly with pre-integrated > technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 > based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > NAnt-users mailing list > NAnt-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nant-users > === message truncated === __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users