Merge pull request #31 from jyapayne/fix_another_issue
Fix windows not processing headers
This commit is contained in:
commit
dc9943a22c
3 changed files with 8 additions and 8 deletions
|
|
@ -118,7 +118,7 @@ proc runPreprocess*(file, ppflags, flags: string, inline: bool): string =
|
||||||
var
|
var
|
||||||
rdata: Rope
|
rdata: Rope
|
||||||
start = false
|
start = false
|
||||||
sfile = file.replace("\\", "/")
|
sfile = file.sanitizePath
|
||||||
|
|
||||||
if inline:
|
if inline:
|
||||||
sfile = sfile.parentDir()
|
sfile = sfile.parentDir()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import os, ospaths, pegs, regex, strutils, tables
|
import os, ospaths, pegs, regex, strutils, tables
|
||||||
|
|
||||||
import globals
|
import globals, external
|
||||||
|
|
||||||
# ###
|
# ###
|
||||||
# File loction
|
# File loction
|
||||||
|
|
@ -44,7 +44,7 @@ proc search*(file: string): string =
|
||||||
quit(1)
|
quit(1)
|
||||||
|
|
||||||
# Only keep relative directory
|
# Only keep relative directory
|
||||||
return result.multiReplace([("\\", $DirSep), ("//", $DirSep), (gProjectDir & $DirSep, "")])
|
return result.sanitizePath.replace(gProjectDir & "/", "")
|
||||||
|
|
||||||
proc rename*(file: string, renfile: string) =
|
proc rename*(file: string, renfile: string) =
|
||||||
if file.splitFile().ext == ".nim":
|
if file.splitFile().ext == ".nim":
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ proc getKey(ukey: string): tuple[key: string, val: bool] =
|
||||||
proc runFile*(file: string, cfgin: OrderedTableRef = newOrderedTable[string, string]()) =
|
proc runFile*(file: string, cfgin: OrderedTableRef = newOrderedTable[string, string]()) =
|
||||||
var
|
var
|
||||||
cfg = cfgin
|
cfg = cfgin
|
||||||
sfile = search(file).sanitizePath
|
sfile = search(file)
|
||||||
|
|
||||||
if sfile in gDoneRecursive:
|
if sfile in gDoneRecursive:
|
||||||
return
|
return
|
||||||
|
|
@ -161,13 +161,13 @@ proc runCfg*(cfg: string) =
|
||||||
echo "Config doesn't exist: " & cfg
|
echo "Config doesn't exist: " & cfg
|
||||||
quit(1)
|
quit(1)
|
||||||
|
|
||||||
gProjectDir = parentDir(cfg.expandFilename())
|
gProjectDir = parentDir(cfg.expandFilename()).sanitizePath
|
||||||
|
|
||||||
gConfig = loadConfig(cfg)
|
gConfig = loadConfig(cfg)
|
||||||
|
|
||||||
if gConfig.hasKey("n.global"):
|
if gConfig.hasKey("n.global"):
|
||||||
if gConfig["n.global"].hasKey("output"):
|
if gConfig["n.global"].hasKey("output"):
|
||||||
gOutput = gConfig["n.global"]["output"]
|
gOutput = gConfig["n.global"]["output"].sanitizePath
|
||||||
if dirExists(gOutput):
|
if dirExists(gOutput):
|
||||||
if "-f" in commandLineParams():
|
if "-f" in commandLineParams():
|
||||||
try:
|
try:
|
||||||
|
|
@ -207,11 +207,11 @@ proc runCfg*(cfg: string) =
|
||||||
|
|
||||||
if gConfig.hasKey("n.include"):
|
if gConfig.hasKey("n.include"):
|
||||||
for inc in gConfig["n.include"].keys():
|
for inc in gConfig["n.include"].keys():
|
||||||
gIncludes.add(inc.addEnv())
|
gIncludes.add(inc.addEnv().sanitizePath)
|
||||||
|
|
||||||
if gConfig.hasKey("n.exclude"):
|
if gConfig.hasKey("n.exclude"):
|
||||||
for excl in gConfig["n.exclude"].keys():
|
for excl in gConfig["n.exclude"].keys():
|
||||||
gExcludes.add(excl.addEnv())
|
gExcludes.add(excl.addEnv().sanitizePath)
|
||||||
|
|
||||||
if gConfig.hasKey("n.prepare"):
|
if gConfig.hasKey("n.prepare"):
|
||||||
for prep in gConfig["n.prepare"].keys():
|
for prep in gConfig["n.prepare"].keys():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue