added untested winrelease target
This commit is contained in:
parent
1d8ee0f876
commit
8b93e4132c
1 changed files with 29 additions and 0 deletions
29
koch.nim
29
koch.nim
|
|
@ -48,6 +48,7 @@ Possible Commands:
|
||||||
update updates nim to the latest version from github
|
update updates nim to the latest version from github
|
||||||
(compile koch with -d:withUpdate to enable)
|
(compile koch with -d:withUpdate to enable)
|
||||||
temp options creates a temporary compiler for testing
|
temp options creates a temporary compiler for testing
|
||||||
|
winrelease creates a release (for coredevs only)
|
||||||
Boot options:
|
Boot options:
|
||||||
-d:release produce a release version of the compiler
|
-d:release produce a release version of the compiler
|
||||||
-d:tinyc include the Tiny C backend (not supported on Windows)
|
-d:tinyc include the Tiny C backend (not supported on Windows)
|
||||||
|
|
@ -278,6 +279,33 @@ when defined(withUpdate):
|
||||||
boot(args)
|
boot(args)
|
||||||
echo("Update complete!")
|
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 --------------------------------------------------------
|
# -------------- tests --------------------------------------------------------
|
||||||
|
|
||||||
template `|`(a, b): expr = (if a.len > 0: a else: b)
|
template `|`(a, b): expr = (if a.len > 0: a else: b)
|
||||||
|
|
@ -321,5 +349,6 @@ of cmdArgument:
|
||||||
else:
|
else:
|
||||||
quit "this Koch has not been compiled with -d:withUpdate"
|
quit "this Koch has not been compiled with -d:withUpdate"
|
||||||
of "temp": temp(op.cmdLineRest)
|
of "temp": temp(op.cmdLineRest)
|
||||||
|
of "winrelease": winRelease()
|
||||||
else: showHelp()
|
else: showHelp()
|
||||||
of cmdEnd: showHelp()
|
of cmdEnd: showHelp()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue