mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
koch winrelease: also bundle c2nim for Windows [backport]
This commit is contained in:
9
koch.nim
9
koch.nim
@@ -89,7 +89,7 @@ template withDir(dir, body) =
|
||||
setCurrentDir(dir)
|
||||
body
|
||||
finally:
|
||||
setCurrentdir(old)
|
||||
setCurrentDir(old)
|
||||
|
||||
let origDir = getCurrentDir()
|
||||
setCurrentDir(getAppDir())
|
||||
@@ -128,6 +128,11 @@ proc bundleNimbleSrc(latest: bool) =
|
||||
exec("git checkout -f stable")
|
||||
exec("git pull")
|
||||
|
||||
proc bundleC2nim() =
|
||||
if not dirExists("dist/c2nim/.git"):
|
||||
exec("git clone https://github.com/nim-lang/c2nim.git dist/c2nim")
|
||||
nimCompile("dist/c2nim/c2nim", options = "--noNimblePath --path:.")
|
||||
|
||||
proc bundleNimbleExe(latest: bool) =
|
||||
bundleNimbleSrc(latest)
|
||||
# installer.ini expects it under $nim/bin
|
||||
@@ -172,6 +177,7 @@ proc bundleWinTools() =
|
||||
buildVccTool()
|
||||
nimCompile("tools/nimgrab.nim", options = "-d:ssl")
|
||||
nimCompile("tools/nimgrep.nim")
|
||||
bundleC2nim()
|
||||
when false:
|
||||
# not yet a tool worth including
|
||||
nimCompile(r"tools\downloader.nim", options = r"--cc:vcc --app:gui -d:ssl --noNimblePath --path:..\ui")
|
||||
@@ -621,6 +627,7 @@ when isMainModule:
|
||||
buildNimble(isLatest())
|
||||
of "pushcsource", "pushcsources": pushCsources()
|
||||
of "valgrind": valgrind(op.cmdLineRest)
|
||||
of "c2nim": bundleC2nim()
|
||||
else: showHelp()
|
||||
break
|
||||
of cmdEnd: break
|
||||
|
||||
Reference in New Issue
Block a user