Merge pull request #767 from gradha/pr_fixes_run_with_out
Fixes run command with outFile
This commit is contained in:
commit
348ccffecd
2 changed files with 10 additions and 3 deletions
|
|
@ -616,7 +616,8 @@ proc CallCCompiler*(projectfile: string) =
|
||||||
if options.outFile.len > 0:
|
if options.outFile.len > 0:
|
||||||
exefile = options.outFile
|
exefile = options.outFile
|
||||||
if not noAbsolutePaths():
|
if not noAbsolutePaths():
|
||||||
exefile = joinPath(splitFile(projectFile).dir, exefile)
|
if not exeFile.isAbsolute():
|
||||||
|
exefile = joinPath(splitFile(projectFile).dir, exefile)
|
||||||
exefile = quoteShell(exefile)
|
exefile = quoteShell(exefile)
|
||||||
let linkOptions = getLinkOptions()
|
let linkOptions = getLinkOptions()
|
||||||
linkCmd = quoteShell(linkCmd % ["builddll", builddll,
|
linkCmd = quoteShell(linkCmd % ["builddll", builddll,
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,14 @@ proc HandleCmdLine() =
|
||||||
completeCFilePath(changeFileExt(gProjectFull, "js").prependCurDir))
|
completeCFilePath(changeFileExt(gProjectFull, "js").prependCurDir))
|
||||||
execExternalProgram("node " & ex & ' ' & service.arguments)
|
execExternalProgram("node " & ex & ' ' & service.arguments)
|
||||||
else:
|
else:
|
||||||
var ex = quoteShell(
|
var binPath: string
|
||||||
changeFileExt(gProjectFull, exeExt).prependCurDir)
|
if options.outFile.len > 0:
|
||||||
|
# If the user specified an outFile path, use that directly.
|
||||||
|
binPath = options.outFile.prependCurDir
|
||||||
|
else:
|
||||||
|
# Figure out ourselves a valid binary name.
|
||||||
|
binPath = changeFileExt(gProjectFull, exeExt).prependCurDir
|
||||||
|
var ex = quoteShell(binPath)
|
||||||
execExternalProgram(ex & ' ' & service.arguments)
|
execExternalProgram(ex & ' ' & service.arguments)
|
||||||
|
|
||||||
when defined(GC_setMaxPause):
|
when defined(GC_setMaxPause):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue