diff options
author | Araq <rumpf_a@web.de> | 2017-09-03 16:26:02 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-09-03 16:26:02 +0200 |
commit | a5b19ba86cd10c5e5de0d0a0f64fb0441f6f54be (patch) | |
tree | c36c40ab6e6a90252f274663f9b42d06dae9b141 /koch.nim | |
parent | 9b2799bd643fb49ec99c8f75bbb80cde27caaf20 (diff) | |
download | Nim-a5b19ba86cd10c5e5de0d0a0f64fb0441f6f54be.tar.gz |
moved winrelease to its own tool to fix #6147
Diffstat (limited to 'koch.nim')
-rw-r--r-- | koch.nim | 85 |
1 files changed, 44 insertions, 41 deletions
diff --git a/koch.nim b/koch.nim index aaa03d558..a07987eb9 100644 --- a/koch.nim +++ b/koch.nim @@ -233,7 +233,7 @@ proc bundleWinTools() = r"--path:..\ui tools\downloader.nim") proc zip(args: string) = - bundleNimbleSrc() + bundleNimbleExe() bundleNimsuggest(false) bundleWinTools() nimexec("cc -r $2 --var:version=$1 --var:mingw=none --main:compiler/nim.nim scripts compiler/installer.ini" % @@ -407,13 +407,15 @@ proc winReleaseArch(arch: string) = withMingw r"..\mingw" & arch & r"\bin": # Rebuilding koch is necessary because it uses its pointer size to # determine which mingw link to put in the NSIS installer. - nimexec "c --out:koch_temp --cpu:$# koch" % cpu - exec "koch_temp boot -d:release --cpu:$#" % cpu - exec "koch_temp zip -d:release" + nimexec "c --cpu:$# koch" % cpu + exec "koch boot -d:release --cpu:$#" % cpu + exec "koch zip -d:release" overwriteFile r"build\nim-$#.zip" % VersionAsString, r"web\upload\download\nim-$#_x$#.zip" % [VersionAsString, arch] -proc winRelease() = +proc winRelease*() = + # Now used from "tools/winrelease" and not directly supported by koch + # anymore! # Build -docs file: when true: web(gaCode) @@ -530,39 +532,40 @@ proc showHelp() = quit(HelpText % [VersionAsString & spaces(44-len(VersionAsString)), CompileDate, CompileTime], QuitSuccess) -var op = initOptParser() -op.next() -case op.kind -of cmdLongOption, cmdShortOption: showHelp() -of cmdArgument: - case normalize(op.key) - of "boot": boot(op.cmdLineRest) - of "clean": clean(op.cmdLineRest) - of "web": web(op.cmdLineRest) - of "doc", "docs": web("--onlyDocs " & op.cmdLineRest) - of "json2": web("--json2 " & op.cmdLineRest) - of "website": website(op.cmdLineRest & gaCode) - of "web0": - # undocumented command for Araq-the-merciful: - web(op.cmdLineRest & gaCode) - of "pdf": pdf() - of "csource", "csources": csource(op.cmdLineRest) - of "zip": zip(op.cmdLineRest) - of "xz": xz(op.cmdLineRest) - of "nsis": nsis(op.cmdLineRest) - of "geninstall": geninstall(op.cmdLineRest) - of "distrohelper": geninstall() - of "install": install(op.cmdLineRest) - of "testinstall": testUnixInstall() - of "test", "tests": tests(op.cmdLineRest) - of "temp": temp(op.cmdLineRest) - of "xtemp": xtemp(op.cmdLineRest) - of "winrelease": winRelease() - of "wintools": bundleWinTools() - of "nimble": buildNimble(existsDir(".git")) - of "nimsuggest": bundleNimsuggest(buildExe=true) - of "tools": buildTools(existsDir(".git")) - of "pushcsource", "pushcsources": pushCsources() - of "valgrind": valgrind(op.cmdLineRest) - else: showHelp() -of cmdEnd: showHelp() +when isMainModule: + var op = initOptParser() + op.next() + case op.kind + of cmdLongOption, cmdShortOption: showHelp() + of cmdArgument: + case normalize(op.key) + of "boot": boot(op.cmdLineRest) + of "clean": clean(op.cmdLineRest) + of "web": web(op.cmdLineRest) + of "doc", "docs": web("--onlyDocs " & op.cmdLineRest) + of "json2": web("--json2 " & op.cmdLineRest) + of "website": website(op.cmdLineRest & gaCode) + of "web0": + # undocumented command for Araq-the-merciful: + web(op.cmdLineRest & gaCode) + of "pdf": pdf() + of "csource", "csources": csource(op.cmdLineRest) + of "zip": zip(op.cmdLineRest) + of "xz": xz(op.cmdLineRest) + of "nsis": nsis(op.cmdLineRest) + of "geninstall": geninstall(op.cmdLineRest) + of "distrohelper": geninstall() + of "install": install(op.cmdLineRest) + of "testinstall": testUnixInstall() + of "test", "tests": tests(op.cmdLineRest) + of "temp": temp(op.cmdLineRest) + of "xtemp": xtemp(op.cmdLineRest) + #of "winrelease": winRelease() + of "wintools": bundleWinTools() + of "nimble": buildNimble(existsDir(".git")) + of "nimsuggest": bundleNimsuggest(buildExe=true) + of "tools": buildTools(existsDir(".git")) + of "pushcsource", "pushcsources": pushCsources() + of "valgrind": valgrind(op.cmdLineRest) + else: showHelp() + of cmdEnd: showHelp() |