improvements for NimScript support
This commit is contained in:
parent
e90c155260
commit
a373bdd0c9
3 changed files with 62 additions and 59 deletions
|
|
@ -191,6 +191,17 @@ proc getPrefixDir*(): string =
|
|||
else:
|
||||
result = splitPath(getAppDir()).head
|
||||
|
||||
proc setDefaultLibpath*() =
|
||||
# set default value (can be overwritten):
|
||||
if libpath == "":
|
||||
# choose default libpath:
|
||||
var prefix = getPrefixDir()
|
||||
when defined(posix):
|
||||
if prefix == "/usr": libpath = "/usr/lib/nim"
|
||||
elif prefix == "/usr/local": libpath = "/usr/local/lib/nim"
|
||||
else: libpath = joinPath(prefix, "lib")
|
||||
else: libpath = joinPath(prefix, "lib")
|
||||
|
||||
proc canonicalizePath*(path: string): string =
|
||||
when not FileSystemCaseSensitive: result = path.expandFilename.toLower
|
||||
else: result = path.expandFilename
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue