diff options
-rw-r--r-- | compiler/installer.ini | 4 | ||||
-rw-r--r-- | koch.nim | 16 | ||||
-rw-r--r-- | lib/pure/osproc.nim | 6 |
3 files changed, 23 insertions, 3 deletions
diff --git a/compiler/installer.ini b/compiler/installer.ini index 74747cc9f..b10fa81ab 100644 --- a/compiler/installer.ini +++ b/compiler/installer.ini @@ -65,6 +65,7 @@ Files: "compiler/installer.ini" Files: "compiler/*.cfg" Files: "compiler/*.nim" Files: "doc/*.txt" +Files: "doc/*.rst" Files: "doc/manual/*.txt" Files: "doc/*.nim" Files: "doc/*.cfg" @@ -84,6 +85,7 @@ Files: "tools/niminst/*.nsh" Files: "web/website.ini" Files: "web/*.nim" Files: "web/*.txt" +Files: "web/*.rst" Files: "bin/nimblepkg/*.nim" Files: "bin/nimblepkg/*.cfg" @@ -131,6 +133,8 @@ Files: "examples/*.txt" Files: "examples/*.cfg" Files: "examples/*.tmpl" +Files: "dist/nimble" + Files: "tests/actiontable/*.nim" Files: "tests/alias/*.nim" Files: "tests/ambsym/*.nim" diff --git a/koch.nim b/koch.nim index 7ee86c64c..1807ca97a 100644 --- a/koch.nim +++ b/koch.nim @@ -110,13 +110,28 @@ proc csource(args: string) = exec("$4 cc $1 -r $3 --var:version=$2 --var:mingw=none csource --main:compiler/nim.nim compiler/installer.ini $1" % [args, VersionAsString, compileNimInst, findNim()]) +proc bundleNimble() = + if dirExists("dist/nimble/.git"): + exec("git --git-dir dist/nimble pull --rebase") + else: + exec("git clone https://github.com/nim-lang/nimble.git dist/nimble") + let tags = execProcess("git --git-dir dist/nimble/.git tag -l v*").splitLines + let tag = tags[^1] + exec("git --git-dir dist/nimble/.git checkout " & tag) + # now compile Nimble and copy it to $nim/bin for the installer.ini + # to pick it up: + exec(findNim() & " c dist/nimble/src/nimble.nim") + copyExe("dist/nimble/nimble".exe, "bin/nimble".exe) + proc zip(args: string) = + bundleNimble() exec("$3 cc -r $2 --var:version=$1 --var:mingw=none --main:compiler/nim.nim scripts compiler/installer.ini" % [VersionAsString, compileNimInst, findNim()]) exec("$# --var:version=$# --var:mingw=none --main:compiler/nim.nim zip compiler/installer.ini" % ["tools/niminst/niminst".exe, VersionAsString]) proc xz(args: string) = + bundleNimble() exec("$3 cc -r $2 --var:version=$1 --var:mingw=none --main:compiler/nim.nim scripts compiler/installer.ini" % [VersionAsString, compileNimInst, findNim()]) exec("$# --var:version=$# --var:mingw=none --main:compiler/nim.nim xz compiler/installer.ini" % @@ -127,6 +142,7 @@ proc buildTool(toolname, args: string) = copyFile(dest="bin"/ splitFile(toolname).name.exe, source=toolname.exe) proc nsis(args: string) = + bundleNimble() # make sure we have generated the niminst executables: buildTool("tools/niminst/niminst", args) #buildTool("tools/nimgrep", args) diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 6d528652a..1ec4d0d8d 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -89,7 +89,7 @@ proc quoteShellWindows*(s: string): string {.noSideEffect, rtl, extern: "nosp$1" result.add("\"") proc quoteShellPosix*(s: string): string {.noSideEffect, rtl, extern: "nosp$1".} = - ## Quote s, so it can be safely passed to POSIX shell. + ## Quote ``s``, so it can be safely passed to POSIX shell. ## Based on Python's pipes.quote const safeUnixChars = {'%', '+', '-', '.', '/', '_', ':', '=', '@', '0'..'9', 'A'..'Z', 'a'..'z'} @@ -104,7 +104,7 @@ proc quoteShellPosix*(s: string): string {.noSideEffect, rtl, extern: "nosp$1".} return "'" & s.replace("'", "'\"'\"'") & "'" proc quoteShell*(s: string): string {.noSideEffect, rtl, extern: "nosp$1".} = - ## Quote s, so it can be safely passed to shell. + ## Quote ``s``, so it can be safely passed to shell. when defined(Windows): return quoteShellWindows(s) elif defined(posix): @@ -967,7 +967,7 @@ elif not defined(useNimRtl): proc kill(p: Process) = if kill(p.id, SIGKILL) != 0'i32: raiseOsError(osLastError()) - + when defined(macosx) or defined(freebsd) or defined(netbsd) or defined(openbsd): import kqueue, times |