John,
I'm having a problem with the vb6.make task (the new
one). This task complains if the dll that I'm
compiling exists in the first place. So, I deleted
the dll and used the task again. It now complains
when it tries to set the version compatibility:
Unable to set the version compatible component:
D:\MyProject\MyDll.dll
One or more of the properties in
'D:\MyProject\MyVbp.vbp' was bad. Some or all of the
properties might not be set correctly.
(filenames changed to stay on the security dude's good
side)
Any clue what I need to do here?
Thanks,
Eric
--- John Cole <[EMAIL PROTECTED]> wrote:
> 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.
> >
>
=== message truncated ===
__________________________________________________
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users