Fix #124
This commit is contained in:
parent
7bee0392e7
commit
a17c654fac
2 changed files with 10 additions and 10 deletions
|
|
@ -211,12 +211,12 @@ proc getPreprocessor*(fullpath: string, mode = "cpp"): string =
|
||||||
sfile = fullpath.sanitizePath
|
sfile = fullpath.sanitizePath
|
||||||
|
|
||||||
for inc in gStateRT.includeDirs:
|
for inc in gStateRT.includeDirs:
|
||||||
cmd &= &"-I\"{inc}\" "
|
cmd &= &"-I{inc.quoteShell} "
|
||||||
|
|
||||||
for def in gStateRT.defines:
|
for def in gStateRT.defines:
|
||||||
cmd &= &"-D{def} "
|
cmd &= &"-D{def} "
|
||||||
|
|
||||||
cmd &= &"\"{fullpath}\""
|
cmd &= &"\"{fullpath.quoteShell}\""
|
||||||
|
|
||||||
# Include content only from file
|
# Include content only from file
|
||||||
for line in execAction(cmd).splitLines():
|
for line in execAction(cmd).splitLines():
|
||||||
|
|
@ -357,7 +357,7 @@ proc loadPlugin*(sourcePath: string) =
|
||||||
pdll = sourcePath.dll
|
pdll = sourcePath.dll
|
||||||
if not fileExists(pdll) or
|
if not fileExists(pdll) or
|
||||||
sourcePath.getLastModificationTime() > pdll.getLastModificationTime():
|
sourcePath.getLastModificationTime() > pdll.getLastModificationTime():
|
||||||
discard execAction("nim c --app:lib " & sourcePath)
|
discard execAction("nim c --app:lib " & sourcePath.quoteShell)
|
||||||
doAssert fileExists(pdll), "No plugin binary generated for " & sourcePath
|
doAssert fileExists(pdll), "No plugin binary generated for " & sourcePath
|
||||||
|
|
||||||
let lib = loadLib(pdll)
|
let lib = loadLib(pdll)
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ proc downloadUrl*(url, outdir: string) =
|
||||||
"powershell [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget $# -OutFile $#"
|
"powershell [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget $# -OutFile $#"
|
||||||
else:
|
else:
|
||||||
"curl $# -o $#"
|
"curl $# -o $#"
|
||||||
discard execAction(cmd % [url, outdir/file])
|
discard execAction(cmd % [url, (outdir/file).quoteShell])
|
||||||
|
|
||||||
if ext == ".zip":
|
if ext == ".zip":
|
||||||
extractZip(file, outdir)
|
extractZip(file, outdir)
|
||||||
|
|
@ -101,20 +101,20 @@ proc gitPull*(url: string, outdir = "", plist = "", checkout = "") =
|
||||||
mkDir(outdir2)
|
mkDir(outdir2)
|
||||||
|
|
||||||
echo "Setting up Git repo: " & url
|
echo "Setting up Git repo: " & url
|
||||||
discard execAction(&"cd {outdir2} && git init .")
|
discard execAction(&"cd {outdir2.quoteShell} && git init .")
|
||||||
discard execAction(&"cd {outdir2} && git remote add origin {url}")
|
discard execAction(&"cd {outdir2.quoteShell} && git remote add origin {url}")
|
||||||
|
|
||||||
if plist.len != 0:
|
if plist.len != 0:
|
||||||
# TODO: document this, it's not clear
|
# TODO: document this, it's not clear
|
||||||
let sparsefile = outdir / ".git/info/sparse-checkout"
|
let sparsefile = outdir / ".git/info/sparse-checkout"
|
||||||
|
|
||||||
discard execAction(&"cd {outdir2} && git config core.sparsecheckout true")
|
discard execAction(&"cd {outdir2.quoteShell} && git config core.sparsecheckout true")
|
||||||
writeFile(sparsefile, plist)
|
writeFile(sparsefile, plist)
|
||||||
|
|
||||||
if checkout.len != 0:
|
if checkout.len != 0:
|
||||||
echo "Checking out " & checkout
|
echo "Checking out " & checkout
|
||||||
discard execAction(&"cd {outdir2} && git pull --tags origin master")
|
discard execAction(&"cd {outdir2.quoteShell} && git pull --tags origin master")
|
||||||
discard execAction(&"cd {outdir2} && git checkout {checkout}")
|
discard execAction(&"cd {outdir2.quoteShell} && git checkout {checkout}")
|
||||||
else:
|
else:
|
||||||
echo "Pulling repository"
|
echo "Pulling repository"
|
||||||
discard execAction(&"cd {outdir2} && git pull --depth=1 origin master")
|
discard execAction(&"cd {outdir2.quoteShell} && git pull --depth=1 origin master")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue