Mercurial > projects > doodle
diff builder.d @ 123:0d427170a805
Move to 64-bit
author | David Bryant <bagnose@gmail.com> |
---|---|
date | Wed, 04 May 2011 22:19:44 +0930 |
parents | 85589f7a3a28 |
children | 1da160a2c373 |
line wrap: on
line diff
--- a/builder.d Mon May 02 17:42:51 2011 +0930 +++ b/builder.d Wed May 04 22:19:44 2011 +0930 @@ -7,7 +7,9 @@ import std.process; import std.file; import std.path; - import std.date; + import std.datetime; + import std.array; + import core.vararg; } @@ -118,13 +120,13 @@ // // return the modification time of the file at path // -d_time modified_time(string path) { - d_time creation_time, access_time, modified_time; +long modified_time(string path) { + SysTime fileStatusChangeTime, fileAccessTime, fileModificationTime; if (!exists(path)) { return 0; } - getTimes(path, creation_time, access_time, modified_time); - return modified_time; + getTimesPosix(path, fileStatusChangeTime, fileAccessTime, fileModificationTime); + return fileStatusChangeTime.stdTime; } @@ -513,7 +515,7 @@ writefln("Object %s", mPath); scope cmd = new StringFormatter; - cmd.format("dmd -c"); + cmd.format("dmd -m64 -c"); foreach (path; Global.bundlePaths) { cmd.format(" -I%s", path); } @@ -599,7 +601,7 @@ writefln("Program %s", mPath); scope cmd = new StringFormatter(); - cmd.format("dmd -L-L%s", join(Global.buildPath, "lib")); + cmd.format("dmd -m64 -L-L%s", std.path.join(Global.buildPath, "lib")); cmd.format(" -of%s %s", mPath, mObject.mPath); // add the libraries we need @@ -743,7 +745,7 @@ this(string name, string path, Node parent, GroupItem group) { super(name, parent); - string obj_path = join(Global.buildPath, "obj", mSlashName ~ ".o"); + string obj_path = std.path.join(Global.buildPath, "obj", mSlashName ~ ".o"); mSource = new SourceItem(path, group); mObject = new ObjectItem(obj_path, mSource, group); mSource.set_object(mObject); @@ -810,11 +812,11 @@ this(string name, string path, Node parent, bool test, GroupItem group) { super(name, path, parent, group); if (test) { - mProgram = new ProgramItem(join(Global.buildPath, "test", mSlashName), mObject, group); - mResult = new ResultItem(join(Global.buildPath, "test", mSlashName ~ ".result"), mProgram, group); + mProgram = new ProgramItem(std.path.join(Global.buildPath, "test", mSlashName), mObject, group); + mResult = new ResultItem(std.path.join(Global.buildPath, "test", mSlashName ~ ".result"), mProgram, group); } else { - mProgram = new ProgramItem(join(Global.buildPath, "bin", mName), mObject, group); + mProgram = new ProgramItem(std.path.join(Global.buildPath, "bin", mName), mObject, group); } setClump(mProgram); //writefln("loaded Program %s", mProgram.mPath); @@ -838,7 +840,7 @@ // examine all the children of the package's directory foreach (string child; listdir(path)) { - string p = join(path, child); + string p = std.path.join(path, child); if (child[0] != '.') { if (isfile(p)) { @@ -846,7 +848,7 @@ if (child.length > 2 && child[$-2..$] == ".d") { // a library module if (!mLibrary) { - mLibrary = new LibraryItem(join(Global.buildPath, "lib", "lib" ~ lib_name ~ ".a"), + mLibrary = new LibraryItem(std.path.join(Global.buildPath, "lib", "lib" ~ lib_name ~ ".a"), lib_name, mGroup); } Module m = new Module(getName(child), p, this, mGroup); @@ -868,7 +870,7 @@ else if (child == "test") { // test programs foreach (string grandchild; listdir(p)) { - string p2 = join(p, grandchild); + string p2 = std.path.join(p, grandchild); if (grandchild[0] != '.' && isfile(p2) && grandchild.length > 2 && @@ -881,7 +883,7 @@ else if (child == "prog") { // deliverable programs foreach (string grandchild; listdir(p)) { - string p2 = join(p, grandchild); + string p2 = std.path.join(p, grandchild); if (child[0] != '.' && isfile(p2) && grandchild.length > 2 && @@ -948,17 +950,17 @@ // add path to Global for use when compiling Global.bundlePaths ~= path; - Global.optionsPath = path.join("options"); + Global.optionsPath = std.path.join(path, "options"); // // load bundles specified in the uses file - lines are bundle paths relative to path // - string uses_path = join(path, "uses"); + string uses_path = std.path.join(path, "uses"); if (exists(uses_path) && isfile(uses_path)) { //writefln("reading uses file: %s", uses_path); scope file = new BufferedFile(uses_path); foreach (char[] line; file) { - load(join(path, line.idup)); + load(std.path.join(path, line.idup)); } } @@ -967,7 +969,7 @@ // foreach (string name; listdir(path)) { if (name[0] != '.' && name != "nobuild") { - string p = join(path, name); + string p = std.path.join(path, name); if (isdir(p)) { foreach (node; mChildren) { Product existing = cast(Product)node;