tags:

views:

357

answers:

4

Hi, I have an IDE named VxWorks 653 2.2.3 Development shell which needed to be invoked all the time when i notice any change in my source files.So i had invoked this shell through a VB scripts which invokes two more .bat(Batch files) to get this shell popped up for execution.Now i feel that since my IDE can be invoked by command line,it can also be invoked through nant scripts using the statement like

D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 But what i see is that its not at all invoking.I had tried all different ways but all turned out to be in vain. Can anyone pls suggest me any way either in nant scripts or in cruise control by which my IDE can be invoked.Now at present i am using VB scripts which is a very long proceess.

Thanks and regards Maddy

A: 

Have you tried the exec task in nant?

If so paste what you tried.

AaronLS
yes,i had tried exec task in nant.I had tried all the possible ways,but turned out to be in vain.
This below is the one i had tried.If i am wrong can u plz suggest me the correct one??? <exec failonerror="false" basedir="D:\WindRiver" program="wrenv.exe -p vxworks653-2.2.3"> </exec>
The "program" part is wrong, you have to put the arguments into a separate attribute "commandline". http://nant.sourceforge.net/release/latest/help/tasks/exec.html
Igor Brejc
My understanding is that using the commandline attribute of exec is deprecated - recommended practice is to use nested arg elements instead.
Bevan
Nothing in the docs that says it's deprecated. It's just another form for specifying cmd line args. Sometimes you have the args specified in a custom property in your script or you build the line in the script using string concatenation.
Igor Brejc
A: 

Questions:

  • Are you sure you want to invoke an IDE as part of CC.NET build? What happens if the IDE pops up a modal dialog for some reason? You whole build run will then stall and will have to be killed by CC.NET after the timeout.
  • What exactly happens when you try to invoke it? For example, if you use nant's exec task and you have set the debug mode in nant, what do you see in logs?
Igor Brejc
I am actually doing for a demo purpose by which if my ccnet finds any modification in the source files,it invokes my IDE and starts the build.I am invoking my IDE through nant scripts.When i invoke my nant i see erreors which says that Error loading buildfile.
I suggest you first try to fix the issue without CC.NET - by running the nant script from a command line. Only once you've solved it, should you do it with CC.NET.
Igor Brejc
I had tried that a lot of times,infact i had tried invoking this IDE through .bat files which are getting invoked thrtough nant,errors dont come but it hangs there and IDE also is not at all invoked..
A: 

It's really hard to help you with no information about what you've tried or what error messages you've received. At the very least, could you post the VB scripts and batch files that work, so we can have a go at turning them into NAnt scripts?

For what it's worth, assuming your example commandline works, here's what it would look like as a NAnt script:

<?xml version="1.0" encoding="utf-8" ?>
<project xmlns="http://nant.sf.net/release/0.85/nant.xsd"&gt;

  <target name="vxworks">

    <exec program="D:\WindRiver\wrenv.exe">
      <arg value="-p"/>
      <arg path="vxworks653-2.2.3"/>
    </exec>

  </target>

</project>

Update: Note that you'll need to amend the second argument to reflect the full path to vxworks. See the online documentation for more information.

Bevan
I had just tried the above code in mine and just invoked my nant scripts in my command line,jst got some fatal errors like build: [exec] D:\WindRiver\wrenv.exe: package "D:\WindRiver\vxworks653-2.2.3" notfound build:BUILD FAILED - 0 non-fatal error(s), 1 warning(s)
A: 

hi my nant is now invoking the VB which is shown below

<target name="build" description="compiles the source code">
    <exec program="WScript.exe" failonerror="false" >
        <arg value="C:\ThreePartition\RunExe.vbs"/>
    </exec>
</target>

RunExe.vbs is shown below

Set WshShell = WScript.CreateObject("WScript.Shell") 
WshShell.Run "test.bat"

test.bat is shown below

CALL C:\ThreePartition\exe.bat
PAUSE

exe.bat is shown below

D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 run 
PAUSE

I had called exe.bat through test.bat since when i had called the exe.bat directly in my VB it is invoking the IDE but after execution my IDE jst dissappears.I want my IDE to stay so that i could have a look at my results.

Thanks Maddy

My nant script is shown below <target name="build" description="compiles the source code"> <exec program="WScript.exe" failonerror="false" > <arg value="C:\ThreePartition\RunExe.vbs"/> </exec>