Mercurial > projects > mde
comparison mde/setup/Init.d @ 135:bc697a218716
Somewhat unified path lookup between linux and windows and added font paths.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 30 Jan 2009 15:51:42 +0000 |
parents | 7ababdf97748 |
children | 4084f07f2c7a |
comparison
equal
deleted
inserted
replaced
134:7ababdf97748 | 135:bc697a218716 |
---|---|
101 try { | 101 try { |
102 args = new Arguments(); | 102 args = new Arguments(); |
103 args.define("base-path").parameters(1); | 103 args.define("base-path").parameters(1); |
104 args.define("data-path").parameters(1,-1); | 104 args.define("data-path").parameters(1,-1); |
105 args.define("conf-path").parameters(1,-1); | 105 args.define("conf-path").parameters(1,-1); |
106 args.define("font-path").parameters(1,-1); | |
106 args.define("paths"); | 107 args.define("paths"); |
107 args.define("q").aliases(["quick-exit"]); | 108 args.define("q").aliases(["quick-exit"]); |
108 args.define("help").aliases(["h"]); | 109 args.define("help").aliases(["h"]); |
109 args.parse(cmdArgs); | 110 args.parse(cmdArgs); |
110 if (args.contains("help")) // lazy way to print help | 111 if (args.contains("help")) // lazy way to print help |
118 try { | 119 try { |
119 if (args.contains("data-path")) | 120 if (args.contains("data-path")) |
120 paths.extraDataPath = args["data-path"]; | 121 paths.extraDataPath = args["data-path"]; |
121 if (args.contains("conf-path")) | 122 if (args.contains("conf-path")) |
122 paths.extraConfPath = args["conf-path"]; | 123 paths.extraConfPath = args["conf-path"]; |
123 | 124 if (args.contains("font-path")) |
125 paths.addFontPath (args["font-path"]); | |
126 | |
124 if (args.contains("base-path")) | 127 if (args.contains("base-path")) |
125 paths.resolvePaths (args["base-path"]); | 128 paths.resolvePaths (args["base-path"]); |
126 else | 129 else |
127 paths.resolvePaths(); | 130 paths.resolvePaths(); |
128 } catch (Exception e) { | 131 } catch (Exception e) { |