From e33544ad13fdea4ed1b0236b9eb0dc79c7788fd7 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 6 Feb 2019 14:39:23 +0100 Subject: koch winrelease: also bundle c2nim for Windows [backport] --- koch.nim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'koch.nim') diff --git a/koch.nim b/koch.nim index 6b799449e..9c73afe2b 100644 --- a/koch.nim +++ b/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 -- cgit 1.4.1-2-gfad0