Mercurial > projects > dil
changeset 428:3751db263679
Looking for config.d and language file in executables folder now.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Mon, 01 Oct 2007 19:22:10 +0200 |
parents | e2bbc6406a14 |
children | 052cbacb1642 |
files | trunk/src/dil/Settings.d trunk/src/main.d |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/dil/Settings.d Mon Oct 01 18:49:26 2007 +0200 +++ b/trunk/src/dil/Settings.d Mon Oct 01 19:22:10 2007 +0200 @@ -6,6 +6,7 @@ import dil.Messages; import dil.Parser, dil.SyntaxTree, dil.Declarations, dil.Expressions; import dil.File; +import tango.io.FilePath; import std.metastrings : FormatT = Format, ToString; import common; @@ -49,9 +50,10 @@ string language; /// Language of loaded messages catalogue. string[] messages; /// Table of localized compiler messages. string[] importPaths; /// Array of import paths to look for modules. - void load() + void load(char[] execPath_) { - auto fileName = "config.d"[]; + scope execPath = new FilePath(execPath_); + auto fileName = execPath.file("config.d").toUtf8(); auto sourceText = loadFile(fileName); auto parser = new Parser(sourceText, fileName); auto root = parser.start(); @@ -94,7 +96,7 @@ } // Load messages - sourceText = loadFile(fileName); + sourceText = loadFile(execPath.file(fileName).toUtf8()); parser = new Parser(sourceText, fileName); root = parser.start();