diff options
author | Araq <rumpf_a@web.de> | 2010-10-21 00:12:14 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2010-10-21 00:12:14 +0200 |
commit | 765366c1f377fbd9507e942385170b546d9d34d0 (patch) | |
tree | bffec904c5b980aa7b9c0961cda18d5dd30638ae /koch.nim | |
parent | 53cd61546dc798fc0f08baf0813f579a90d7e766 (diff) | |
download | Nim-765366c1f377fbd9507e942385170b546d9d34d0.tar.gz |
version 0.8.10
Diffstat (limited to 'koch.nim')
-rw-r--r--[-rwxr-xr-x] | koch.nim | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/koch.nim b/koch.nim index a926de479..498ff20f9 100755..100644 --- a/koch.nim +++ b/koch.nim @@ -7,6 +7,9 @@ # distribution, for details about the copyright. # +when defined(gcc) and defined(windows): + {.link: "icons/koch.res".} + import os, strutils, parseopt @@ -29,11 +32,13 @@ Possible Commands: web generates the website csource [options] builds the C sources for installation zip builds the installation ZIP package - inno builds the Inno Setup installer + inno [options] builds the Inno Setup installer Boot options: -d:release produce a release version of the compiler -d:tinyc include the Tiny C backend (not supported on Windows) """ + +proc exe(f: string): string = return addFileExt(f, ExeExt) proc exec(cmd: string) = echo(cmd) @@ -51,9 +56,15 @@ proc zip(args: string) = exec("nimrod cc -r tools/niminst --var:version=$# zip rod/nimrod" % NimrodVersion) -proc inno(args: string) = - exec("nimrod cc -r tools/niminst --var:version=$# inno rod/nimrod" % - NimrodVersion) +proc buildTool(toolname, args: string) = + exec("nimrod cc $# $#" % [args, toolname]) + copyFile(dest="bin"/ splitFile(toolname).name.exe, source=toolname.exe) + +proc inno(args: string) = + # make sure we have generated the c2nim and niminst executables: + buildTool("tools/niminst", args) + buildTool("rod/c2nim/c2nim", args) + exec("tools/niminst --var:version=$# inno rod/nimrod" % NimrodVersion) proc install(args: string) = exec("sh ./build.sh") @@ -61,8 +72,6 @@ proc install(args: string) = proc web(args: string) = exec("nimrod cc -r tools/nimweb.nim web/nimrod --putenv:nimrodversion=$#" % NimrodVersion) - -proc exe(f: string): string = return addFileExt(f, ExeExt) # -------------- nim ---------------------------------------------------------- |