Fix installation (default output dir changed).
This commit is contained in:
parent
e42b04b329
commit
4ffcdf141e
2 changed files with 7 additions and 7 deletions
|
|
@ -464,7 +464,7 @@ proc buildFromDir(pkgInfo: PackageInfo, paths: seq[string], forRelease: bool) =
|
||||||
var args = ""
|
var args = ""
|
||||||
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:
|
||||||
let outputOpt = pkgInfo.getOutputOption(bin)
|
let outputOpt = "-o:\"" & pkgInfo.getOutputDir(bin) & "\""
|
||||||
echo("Building ", pkginfo.name, "/", bin, " using ", pkgInfo.backend,
|
echo("Building ", pkginfo.name, "/", bin, " using ", pkgInfo.backend,
|
||||||
" backend...")
|
" backend...")
|
||||||
doCmd(getNimBin() & " $# $# --noBabelPath $# $# \"$#\"" %
|
doCmd(getNimBin() & " $# $# --noBabelPath $# $# \"$#\"" %
|
||||||
|
|
@ -553,7 +553,8 @@ proc installFromDir(dir: string, latest: bool, options: Options,
|
||||||
# and symlink them on *nix OS' to $nimbleDir/bin/
|
# and symlink them on *nix OS' to $nimbleDir/bin/
|
||||||
for bin in pkgInfo.bin:
|
for bin in pkgInfo.bin:
|
||||||
if not existsFile(pkgDestDir / bin):
|
if not existsFile(pkgDestDir / bin):
|
||||||
filesInstalled.incl copyFileD(realDir / bin, pkgDestDir / bin)
|
filesInstalled.incl copyFileD(pkgInfo.getOutputDir(bin),
|
||||||
|
pkgDestDir / bin)
|
||||||
|
|
||||||
let currentPerms = getFilePermissions(pkgDestDir / bin)
|
let currentPerms = getFilePermissions(pkgDestDir / bin)
|
||||||
setFilePermissions(pkgDestDir / bin, currentPerms + {fpUserExec})
|
setFilePermissions(pkgDestDir / bin, currentPerms + {fpUserExec})
|
||||||
|
|
|
||||||
|
|
@ -329,13 +329,12 @@ proc getRealDir*(pkgInfo: PackageInfo): string =
|
||||||
else:
|
else:
|
||||||
result = pkgInfo.mypath.splitFile.dir
|
result = pkgInfo.mypath.splitFile.dir
|
||||||
|
|
||||||
proc getOutputOption*(pkgInfo: PackageInfo, bin: string): string =
|
proc getOutputDir*(pkgInfo: PackageInfo, bin: string): string =
|
||||||
## Returns an output option for the nim compiler if a build directory
|
## Returns a binary output dir for the package.
|
||||||
## has been set.
|
|
||||||
if pkgInfo.binDir != "":
|
if pkgInfo.binDir != "":
|
||||||
result = " -o:\"" & pkgInfo.mypath.splitFile.dir / pkgInfo.binDir / bin & "\""
|
result = pkgInfo.mypath.splitFile.dir / pkgInfo.binDir / bin
|
||||||
else:
|
else:
|
||||||
result = " -o:\"" & pkgInfo.mypath.splitFile.dir / bin & "\""
|
result = pkgInfo.mypath.splitFile.dir / bin
|
||||||
|
|
||||||
proc getNameVersion*(pkgpath: string): tuple[name, version: string] =
|
proc getNameVersion*(pkgpath: string): tuple[name, version: string] =
|
||||||
## Splits ``pkgpath`` in the format ``/home/user/.nimble/pkgs/package-0.1``
|
## Splits ``pkgpath`` in the format ``/home/user/.nimble/pkgs/package-0.1``
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue