diff options
author | Araq <rumpf_a@web.de> | 2014-10-11 01:11:37 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-10-11 01:11:37 +0200 |
commit | 8b93e4132cd9f41182dc9fa46d5c79a71a2c09ef (patch) | |
tree | 82f7adf987e90c0d17f1623cc786b23a9c953020 /koch.nim | |
parent | 1d8ee0f876029b2a0501689d793353c878b2085c (diff) | |
download | Nim-8b93e4132cd9f41182dc9fa46d5c79a71a2c09ef.tar.gz |
added untested winrelease target
Diffstat (limited to 'koch.nim')
-rw-r--r-- | koch.nim | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/koch.nim b/koch.nim index a43701194..2cbfe01c5 100644 --- a/koch.nim +++ b/koch.nim @@ -48,6 +48,7 @@ Possible Commands: update updates nim to the latest version from github (compile koch with -d:withUpdate to enable) temp options creates a temporary compiler for testing + winrelease creates a release (for coredevs only) Boot options: -d:release produce a release version of the compiler -d:tinyc include the Tiny C backend (not supported on Windows) @@ -278,6 +279,33 @@ when defined(withUpdate): boot(args) echo("Update complete!") +# -------------- builds a release --------------------------------------------- + +proc run7z(platform: string, patterns: varargs[string]) = + const tmpDir = "nim-" & NimVersion + createDir tmpDir + try: + for pattern in patterns: + for f in walkFiles(pattern): + if "nimcache" notin f: + copyFile(f, tmpDir / f) + exec("7z a -tzip $1-$2.zip $1" % [tmpDir, platform]) + finally: + removeDir tmpDir + +proc winRelease() = + boot(" -d:release") + #buildTool("tools/niminst/niminst", " -d:release") + buildTool("tools/nimgrep", " -d:release") + buildTool("compiler/nimfix/nimfix", " -d:release") + + run7z("win32", "bin/nim.exe", "bin/c2nim.exe", "bin/nimgrep.exe", + "bin/nimfix.exe", + "bin/babel.exe", "bin/*.dll", + "config", "dist/*.dll", "examples", "lib", + "readme.txt", "contributors.txt", "copying.txt") + # second step: XXX build 64 bit version + # -------------- tests -------------------------------------------------------- template `|`(a, b): expr = (if a.len > 0: a else: b) @@ -321,5 +349,6 @@ of cmdArgument: else: quit "this Koch has not been compiled with -d:withUpdate" of "temp": temp(op.cmdLineRest) + of "winrelease": winRelease() else: showHelp() of cmdEnd: showHelp() |