DLL generation works again

This commit is contained in:
Araq 2014-04-23 00:29:11 +02:00
commit 3851ee209c

View file

@ -1614,14 +1614,17 @@ when defined(linux) or defined(solaris) or defined(bsd) or defined(aix):
when not (defined(windows) or defined(macosx)): when not (defined(windows) or defined(macosx)):
proc getApplHeuristic(): string = proc getApplHeuristic(): string =
result = string(paramStr(0)) when defined(paramStr):
# POSIX guaranties that this contains the executable result = string(paramStr(0))
# as it has been executed by the calling process # POSIX guaranties that this contains the executable
if len(result) > 0 and result[0] != DirSep: # not an absolute path? # as it has been executed by the calling process
# iterate over any path in the $PATH environment variable if len(result) > 0 and result[0] != DirSep: # not an absolute path?
for p in split(string(getEnv("PATH")), {PathSep}): # iterate over any path in the $PATH environment variable
var x = joinPath(p, result) for p in split(string(getEnv("PATH")), {PathSep}):
if existsFile(x): return x var x = joinPath(p, result)
if existsFile(x): return x
else:
result = ""
when defined(macosx): when defined(macosx):
type type