Changeset 92

Show
Ignore:
Timestamp:
09/11/06 19:25:43 (2 years ago)
Author:
Gregor
Message:

bcd/gen/bcdgen.d: Ye gads Windows paths are complicated ...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bcd.gen/bcd/gen/bcdgen.d

    r90 r92  
    119119        gccxmlExe = "gccxml"; 
    120120    } 
    121      
     121 
    122122    if (args.length < 3) { 
    123123        writefln("Use:"); 
     
    152152        return 1; 
    153153    } 
    154      
     154 
    155155    char[] forcedImport; 
    156156    char[] templates; 
     
    159159    dNamespaceBase = "bcd."; 
    160160    curFile = args[1]; 
    161     baseDir = getDirName(args[1]); 
    162     shortName = getBaseName(args[1]); 
     161    version (Windows) { 
     162        // get*Name only works with \, but gccxml only works with / 
     163        curFile = replace(curFile, "\\", "/"); 
     164        char[] backslashName = replace(args[1], "/", "\\"); 
     165        baseDir = getDirName(backslashName); 
     166        shortName = getBaseName(backslashName); 
     167    } else { 
     168        baseDir = getDirName(args[1]); 
     169        shortName = getBaseName(args[1]); 
     170    } 
    163171    if (find(shortName, '.') != -1) { 
    164172        shortName = getName(shortName);