From c5d8bca8ec7003ba86a6e084dae45917149c6c5b Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sat, 22 Jun 2013 03:17:24 +0100 Subject: [PATCH] Fixes some Windows issues. --- babel.nim | 4 ++-- packageinfo.nim | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/babel.nim b/babel.nim index 0edfe26..6364a1d 100644 --- a/babel.nim +++ b/babel.nim @@ -182,7 +182,7 @@ proc buildFromDir(dir: string, paths: seq[string]) = for path in paths: args.add("--path:" & path & " ") for bin in pkgInfo.bin: echo("Building ", pkginfo.name, "/", bin, "...") - doCmd("nimrod c -d:release " & args & dir / bin) + doCmd("nimrod c -d:release " & args & dir / bin.changeFileExt("nim")) proc installFromDir(dir: string, latest: bool): string = ## Returns where package has been installed to. If package is a binary, @@ -222,7 +222,7 @@ proc installFromDir(dir: string, latest: bool): string = when defined(unix): doCmd("ln -s \"" & pkgDestDir / bin & "\" " & binDir / bin) elif defined(windows): - {.error: "TODO WINDOWS".} + writeFile(binDir / bin, pkgDestDir / bin & "\n") else: {.error: "Sorry, your platform is not supported.".} result = "" diff --git a/packageinfo.nim b/packageinfo.nim index 5b9cc44..fcdd90c 100644 --- a/packageinfo.nim +++ b/packageinfo.nim @@ -94,7 +94,8 @@ proc readPackageInfo*(path: string): TPackageInfo = of "skipext": result.skipExt.add(ev.value.split(',')) of "bin": - result.bin = ev.value.split(',') + for i in ev.value.split(','): + result.bin.add(i.addFileExt(ExeExt)) else: quit("Invalid field: " & ev.key, QuitFailure) of "deps", "dependencies":