# HG changeset patch # User Aziz K?ksal # Date 1191259330 -7200 # Node ID 3751db2636799d0d048b9c908314555e51dd69e5 # Parent e2bbc6406a14364e713aae92432650d3ed37be4c Looking for config.d and language file in executables folder now. diff -r e2bbc6406a14 -r 3751db263679 trunk/src/dil/Settings.d --- 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(); diff -r e2bbc6406a14 -r 3751db263679 trunk/src/main.d --- a/trunk/src/main.d Mon Oct 01 18:49:26 2007 +0200 +++ b/trunk/src/main.d Mon Oct 01 19:22:10 2007 +0200 @@ -19,7 +19,7 @@ void main(char[][] args) { - GlobalSettings.load(); + GlobalSettings.load(args[0]); if (args.length <= 1) return Stdout(helpMain()).newline;