path canonicalization and proper project relative paths

This commit is contained in:
Zahary Karadjov 2011-12-09 04:40:59 +02:00
commit e4e74034c2
9 changed files with 61 additions and 47 deletions

View file

@ -70,14 +70,14 @@ proc HandleCmdLine() =
ProcessCmdLine(passCmd1)
if gProjectName != "":
try:
gProjectFull = expandFilename(gProjectName)
gProjectFull = canonicalizePath(gProjectName)
except EOS:
gProjectFull = gProjectName
var p = splitFile(gProjectFull)
gProjectPath = p.dir
gProjectName = p.name
else:
gProjectPath = getCurrentDir()
gProjectPath = getCurrentDir()
LoadConfigs(DefaultConfig) # load all config files
# now process command line arguments again, because some options in the
# command line can overwite the config file's settings