Here is the code I have:
var commandsBuffer = List[String]()
commandsBuffer ::= "cmd.exe"
commandsBuffer ::= "/c"
commandsBuffer ::= '"'+vcVarsAll.getAbsolutePath+'"'
commandsBuffer ::= "&&"
otherCommands.foreach(c => commandsBuffer ::= c)
val asArray = commandsBuffer.reverse.toArray
val processOutput = processutils.Proc.executeCommand(asArray,true)
return processOutput
otherCommandsis Array[String]containing the following elements:
vcbuild
/rebuild
path to the .sln file
vcVarsAll contains the path to Visual Studio vcvarsall.bat. This is the way C:\tools\microsoft visual studio 2005\vc\vcvarsall.bat. The error that I get:
'c:\Tools\Microsoft' is not recognized as an internal or external command,
operable program or batch file..
processutils.Proc.executeCommand has the following implementation:
def executeCommand(params:Array[String],display:Boolean):(String,String) = {
val process = java.lang.Runtime.getRuntime.exec(params)
val outStream = process.getInputStream
val errStream = process.getErrorStream
...
}
The same code that runs from Java / Groovy is executed. What am I doing wrong?
source
share