Fixes some Windows issues.

This commit is contained in:
Dominik Picheta 2013-06-22 03:17:24 +01:00
commit c5d8bca8ec
2 changed files with 4 additions and 3 deletions

View file

@ -182,7 +182,7 @@ proc buildFromDir(dir: string, paths: seq[string]) =
for path in paths: args.add("--path:" & path & " ") for path in paths: args.add("--path:" & path & " ")
for bin in pkgInfo.bin: for bin in pkgInfo.bin:
echo("Building ", pkginfo.name, "/", 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 = proc installFromDir(dir: string, latest: bool): string =
## Returns where package has been installed to. If package is a binary, ## 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): when defined(unix):
doCmd("ln -s \"" & pkgDestDir / bin & "\" " & binDir / bin) doCmd("ln -s \"" & pkgDestDir / bin & "\" " & binDir / bin)
elif defined(windows): elif defined(windows):
{.error: "TODO WINDOWS".} writeFile(binDir / bin, pkgDestDir / bin & "\n")
else: else:
{.error: "Sorry, your platform is not supported.".} {.error: "Sorry, your platform is not supported.".}
result = "" result = ""

View file

@ -94,7 +94,8 @@ proc readPackageInfo*(path: string): TPackageInfo =
of "skipext": of "skipext":
result.skipExt.add(ev.value.split(',')) result.skipExt.add(ev.value.split(','))
of "bin": of "bin":
result.bin = ev.value.split(',') for i in ev.value.split(','):
result.bin.add(i.addFileExt(ExeExt))
else: else:
quit("Invalid field: " & ev.key, QuitFailure) quit("Invalid field: " & ev.key, QuitFailure)
of "deps", "dependencies": of "deps", "dependencies":