parent
ae36dfb747
commit
6e003eeecb
2 changed files with 9 additions and 13 deletions
21
koch.nim
21
koch.nim
|
|
@ -149,11 +149,9 @@ proc buildNimble(latest: bool) =
|
||||||
nimexec("c --noNimblePath --nilseqs:on -d:release " & installDir / "src/nimble.nim")
|
nimexec("c --noNimblePath --nilseqs:on -d:release " & installDir / "src/nimble.nim")
|
||||||
copyExe(installDir / "src/nimble".exe, "bin/nimble".exe)
|
copyExe(installDir / "src/nimble".exe, "bin/nimble".exe)
|
||||||
|
|
||||||
proc bundleNimsuggest(buildExe: bool) =
|
proc bundleNimsuggest() =
|
||||||
if buildExe:
|
nimexec "c -d:release -o:" & ("bin/nimsuggest".exe) &
|
||||||
nimexec("c --noNimblePath -d:release nimsuggest/nimsuggest.nim")
|
" nimsuggest/nimsuggest.nim"
|
||||||
copyExe("nimsuggest/nimsuggest".exe, "bin/nimsuggest".exe)
|
|
||||||
removeFile("nimsuggest/nimsuggest".exe)
|
|
||||||
|
|
||||||
proc buildVccTool() =
|
proc buildVccTool() =
|
||||||
nimexec("c -o:bin/vccexe.exe tools/vccenv/vccexe")
|
nimexec("c -o:bin/vccexe.exe tools/vccenv/vccexe")
|
||||||
|
|
@ -172,7 +170,7 @@ proc bundleWinTools() =
|
||||||
|
|
||||||
proc zip(latest: bool; args: string) =
|
proc zip(latest: bool; args: string) =
|
||||||
bundleNimbleExe(latest)
|
bundleNimbleExe(latest)
|
||||||
bundleNimsuggest(true)
|
bundleNimsuggest()
|
||||||
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" %
|
||||||
[VersionAsString, compileNimInst])
|
[VersionAsString, compileNimInst])
|
||||||
|
|
@ -189,7 +187,8 @@ proc ensureCleanGit() =
|
||||||
proc xz(latest: bool; args: string) =
|
proc xz(latest: bool; args: string) =
|
||||||
ensureCleanGit()
|
ensureCleanGit()
|
||||||
bundleNimbleSrc(latest)
|
bundleNimbleSrc(latest)
|
||||||
bundleNimsuggest(false)
|
when false:
|
||||||
|
bundleNimsuggest()
|
||||||
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" %
|
||||||
[VersionAsString, compileNimInst])
|
[VersionAsString, compileNimInst])
|
||||||
exec("$# --var:version=$# --var:mingw=none --main:compiler/nim.nim xz compiler/installer.ini" %
|
exec("$# --var:version=$# --var:mingw=none --main:compiler/nim.nim xz compiler/installer.ini" %
|
||||||
|
|
@ -200,9 +199,7 @@ proc buildTool(toolname, args: string) =
|
||||||
copyFile(dest="bin" / splitFile(toolname).name.exe, source=toolname.exe)
|
copyFile(dest="bin" / splitFile(toolname).name.exe, source=toolname.exe)
|
||||||
|
|
||||||
proc buildTools(latest: bool) =
|
proc buildTools(latest: bool) =
|
||||||
nimexec "c --noNimblePath -d:release -o:" & ("bin/nimsuggest".exe) &
|
bundleNimsuggest()
|
||||||
" nimsuggest/nimsuggest.nim"
|
|
||||||
|
|
||||||
nimexec "c -d:release -o:" & ("bin/nimgrep".exe) & " tools/nimgrep.nim"
|
nimexec "c -d:release -o:" & ("bin/nimgrep".exe) & " tools/nimgrep.nim"
|
||||||
when defined(windows): buildVccTool()
|
when defined(windows): buildVccTool()
|
||||||
|
|
||||||
|
|
@ -212,7 +209,7 @@ proc buildTools(latest: bool) =
|
||||||
|
|
||||||
proc nsis(latest: bool; args: string) =
|
proc nsis(latest: bool; args: string) =
|
||||||
bundleNimbleExe(latest)
|
bundleNimbleExe(latest)
|
||||||
bundleNimsuggest(true)
|
bundleNimsuggest()
|
||||||
bundleWinTools()
|
bundleWinTools()
|
||||||
# make sure we have generated the niminst executables:
|
# make sure we have generated the niminst executables:
|
||||||
buildTool("tools/niminst/niminst", args)
|
buildTool("tools/niminst/niminst", args)
|
||||||
|
|
@ -550,7 +547,7 @@ when isMainModule:
|
||||||
of "nimble":
|
of "nimble":
|
||||||
if stable: buildNimble(false)
|
if stable: buildNimble(false)
|
||||||
else: buildNimble(existsDir(".git") or latest)
|
else: buildNimble(existsDir(".git") or latest)
|
||||||
of "nimsuggest": bundleNimsuggest(buildExe=true)
|
of "nimsuggest": bundleNimsuggest()
|
||||||
of "tools":
|
of "tools":
|
||||||
if stable: buildTools(false)
|
if stable: buildTools(false)
|
||||||
else: buildTools(existsDir(".git") or latest)
|
else: buildTools(existsDir(".git") or latest)
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,3 @@ define:nimcore
|
||||||
#define:noDocgen
|
#define:noDocgen
|
||||||
--path:"$nim"
|
--path:"$nim"
|
||||||
--threads:on
|
--threads:on
|
||||||
--noNimblePath
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue