diff options
author | Araq <rumpf_a@web.de> | 2019-02-06 14:39:23 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-02-06 14:39:32 +0100 |
commit | e33544ad13fdea4ed1b0236b9eb0dc79c7788fd7 (patch) | |
tree | beebce653d272836f7cc3405c6d07912e9738343 /koch.nim | |
parent | 864c3e874c8095a95cc8c3fa99888927b49e3a68 (diff) | |
download | Nim-e33544ad13fdea4ed1b0236b9eb0dc79c7788fd7.tar.gz |
koch winrelease: also bundle c2nim for Windows [backport]
Diffstat (limited to 'koch.nim')
-rw-r--r-- | koch.nim | 9 |
1 files changed, 8 insertions, 1 deletions
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 |