moved winrelease to its own tool to fix #6147
This commit is contained in:
parent
9b2799bd64
commit
a5b19ba86c
2 changed files with 53 additions and 41 deletions
27
koch.nim
27
koch.nim
|
|
@ -233,7 +233,7 @@ proc bundleWinTools() =
|
||||||
r"--path:..\ui tools\downloader.nim")
|
r"--path:..\ui tools\downloader.nim")
|
||||||
|
|
||||||
proc zip(args: string) =
|
proc zip(args: string) =
|
||||||
bundleNimbleSrc()
|
bundleNimbleExe()
|
||||||
bundleNimsuggest(false)
|
bundleNimsuggest(false)
|
||||||
bundleWinTools()
|
bundleWinTools()
|
||||||
nimexec("cc -r $2 --var:version=$1 --var:mingw=none --main:compiler/nim.nim scripts compiler/installer.ini" %
|
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":
|
withMingw r"..\mingw" & arch & r"\bin":
|
||||||
# Rebuilding koch is necessary because it uses its pointer size to
|
# Rebuilding koch is necessary because it uses its pointer size to
|
||||||
# determine which mingw link to put in the NSIS installer.
|
# determine which mingw link to put in the NSIS installer.
|
||||||
nimexec "c --out:koch_temp --cpu:$# koch" % cpu
|
nimexec "c --cpu:$# koch" % cpu
|
||||||
exec "koch_temp boot -d:release --cpu:$#" % cpu
|
exec "koch boot -d:release --cpu:$#" % cpu
|
||||||
exec "koch_temp zip -d:release"
|
exec "koch zip -d:release"
|
||||||
overwriteFile r"build\nim-$#.zip" % VersionAsString,
|
overwriteFile r"build\nim-$#.zip" % VersionAsString,
|
||||||
r"web\upload\download\nim-$#_x$#.zip" % [VersionAsString, arch]
|
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:
|
# Build -docs file:
|
||||||
when true:
|
when true:
|
||||||
web(gaCode)
|
web(gaCode)
|
||||||
|
|
@ -530,11 +532,12 @@ proc showHelp() =
|
||||||
quit(HelpText % [VersionAsString & spaces(44-len(VersionAsString)),
|
quit(HelpText % [VersionAsString & spaces(44-len(VersionAsString)),
|
||||||
CompileDate, CompileTime], QuitSuccess)
|
CompileDate, CompileTime], QuitSuccess)
|
||||||
|
|
||||||
var op = initOptParser()
|
when isMainModule:
|
||||||
op.next()
|
var op = initOptParser()
|
||||||
case op.kind
|
op.next()
|
||||||
of cmdLongOption, cmdShortOption: showHelp()
|
case op.kind
|
||||||
of cmdArgument:
|
of cmdLongOption, cmdShortOption: showHelp()
|
||||||
|
of cmdArgument:
|
||||||
case normalize(op.key)
|
case normalize(op.key)
|
||||||
of "boot": boot(op.cmdLineRest)
|
of "boot": boot(op.cmdLineRest)
|
||||||
of "clean": clean(op.cmdLineRest)
|
of "clean": clean(op.cmdLineRest)
|
||||||
|
|
@ -557,7 +560,7 @@ of cmdArgument:
|
||||||
of "test", "tests": tests(op.cmdLineRest)
|
of "test", "tests": tests(op.cmdLineRest)
|
||||||
of "temp": temp(op.cmdLineRest)
|
of "temp": temp(op.cmdLineRest)
|
||||||
of "xtemp": xtemp(op.cmdLineRest)
|
of "xtemp": xtemp(op.cmdLineRest)
|
||||||
of "winrelease": winRelease()
|
#of "winrelease": winRelease()
|
||||||
of "wintools": bundleWinTools()
|
of "wintools": bundleWinTools()
|
||||||
of "nimble": buildNimble(existsDir(".git"))
|
of "nimble": buildNimble(existsDir(".git"))
|
||||||
of "nimsuggest": bundleNimsuggest(buildExe=true)
|
of "nimsuggest": bundleNimsuggest(buildExe=true)
|
||||||
|
|
@ -565,4 +568,4 @@ of cmdArgument:
|
||||||
of "pushcsource", "pushcsources": pushCsources()
|
of "pushcsource", "pushcsources": pushCsources()
|
||||||
of "valgrind": valgrind(op.cmdLineRest)
|
of "valgrind": valgrind(op.cmdLineRest)
|
||||||
else: showHelp()
|
else: showHelp()
|
||||||
of cmdEnd: showHelp()
|
of cmdEnd: showHelp()
|
||||||
|
|
|
||||||
9
tools/winrelease.nim
Normal file
9
tools/winrelease.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
## This is a small helper program to build the Win release.
|
||||||
|
## This used to be part of koch (and it still uses koch as a library)
|
||||||
|
## but since 'koch.exe' cannot overwrite itself is now its own program.
|
||||||
|
## The problem is that 'koch.exe' too is part of the zip bundle and
|
||||||
|
## needs to have the right 32/64 bit version. (Bug #6147)
|
||||||
|
|
||||||
|
import "../koch"
|
||||||
|
|
||||||
|
winRelease()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue