From fe0863e9be5049571b298f3caeee24238f162601 Mon Sep 17 00:00:00 2001 From: cupen Date: Sun, 15 Nov 2015 04:08:53 +0800 Subject: [PATCH 1/2] for mingw compatibility. --- readme.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.markdown b/readme.markdown index 3a1cf6f..653beb9 100644 --- a/readme.markdown +++ b/readme.markdown @@ -57,9 +57,9 @@ On Windows installing Nimble from source is slightly more complex: git clone https://github.com/nim-lang/nimble.git cd nimble - nim c src\nimble - cp src\nimble.exe src\nimble1.exe - src\nimble1.exe install + nim c src/nimble + cp src/nimble.exe src/nimble1.exe + src/nimble1.exe install This is required because Windows will lock the process which is being run and during installation Nimble will recompile itself. From 2ed09847f24f2a846bdfd4fe2ec6faa51024b89e Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Tue, 24 Nov 2015 11:48:09 +0000 Subject: [PATCH 2/2] Fixes #125 --- src/nimblepkg/tools.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nimblepkg/tools.nim b/src/nimblepkg/tools.nim index ac2f76f..0c992c2 100644 --- a/src/nimblepkg/tools.nim +++ b/src/nimblepkg/tools.nim @@ -9,7 +9,7 @@ proc doCmd*(cmd: string) = let bin = cmd.split(' ')[0] if findExe(bin) == "": raise newException(NimbleError, "'" & bin & "' not in PATH.") - + # To keep output in sequence stdout.flushFile() stderr.flushFile() @@ -36,8 +36,8 @@ template cd*(dir: string, body: stmt) = proc getNimBin*: string = result = "nim" - if findExe("nim") != "": result = "nim" - elif findExe("nimrod") != "": result = "nimrod" + if findExe("nim") != "": result = findExe("nim") + elif findExe("nimrod") != "": result = findExe("nimrod") proc getNimrodVersion*: Version = let nimBin = getNimBin() @@ -53,7 +53,7 @@ proc samePaths*(p1, p2: string): bool = var cp2 = if not p2.endsWith("/"): p2 & "/" else: p2 cp1 = cp1.replace('/', DirSep).replace('\\', DirSep) cp2 = cp2.replace('/', DirSep).replace('\\', DirSep) - + return cmpPaths(cp1, cp2) == 0 proc changeRoot*(origRoot, newRoot, path: string): string = @@ -96,7 +96,7 @@ proc getDownloadDirName*(uri: string, verRange: VersionRange): string = of strutils.Letters, strutils.Digits: result.add i else: discard - + let verSimple = getSimpleString(verRange) if verSimple != "": result.add "_"