fixes #11770
This commit is contained in:
parent
7023241aaf
commit
b9dd972c32
1 changed files with 16 additions and 8 deletions
|
|
@ -17,6 +17,12 @@ type
|
|||
Manual,
|
||||
Success
|
||||
|
||||
proc expand(s: string): string =
|
||||
try:
|
||||
result = expandFilename(s)
|
||||
except OSError, IOError:
|
||||
result = s
|
||||
|
||||
proc unzip(): bool =
|
||||
if not fileExists("dist" / mingw):
|
||||
echo "Could not find ", "dist" / mingw
|
||||
|
|
@ -192,19 +198,21 @@ when defined(windows):
|
|||
let bits = $(sizeof(pointer)*8)
|
||||
for d in dirs:
|
||||
if dirExists d:
|
||||
let x = expandFilename(d / "bin")
|
||||
if checkGccArch(x): return x
|
||||
else: incompat.add x
|
||||
let x = expand(d / "bin")
|
||||
if x.len != 0:
|
||||
if checkGccArch(x): return x
|
||||
else: incompat.add x
|
||||
elif dirExists(d & bits):
|
||||
let x = expandFilename((d & bits) / "bin")
|
||||
if checkGccArch(x): return x
|
||||
else: incompat.add x
|
||||
let x = expand((d & bits) / "bin")
|
||||
if x.len != 0:
|
||||
if checkGccArch(x): return x
|
||||
else: incompat.add x
|
||||
|
||||
proc main() =
|
||||
when defined(windows):
|
||||
let nimDesiredPath = expandFilename(getCurrentDir() / "bin")
|
||||
let nimDesiredPath = expand(getCurrentDir() / "bin")
|
||||
let nimbleBin = getEnv("USERPROFILE") / ".nimble" / "bin"
|
||||
let nimbleDesiredPath = try: expandFilename(nimbleBin) except: nimbleBin
|
||||
let nimbleDesiredPath = expand(nimbleBin)
|
||||
let p = tryGetUnicodeValue(r"Environment", "Path",
|
||||
HKEY_CURRENT_USER) & ";" & tryGetUnicodeValue(
|
||||
r"System\CurrentControlSet\Control\Session Manager\Environment", "Path",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue