Subversion Repositories Applications.papyrus

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1318 alexandre_ 1
/*
2
	Copyright (c) 2004-2006, The Dojo Foundation
3
	All Rights Reserved.
4
 
5
	Licensed under the Academic Free License version 2.1 or above OR the
6
	modified BSD license. For more information on Dojo licensing, see:
7
 
8
		http://dojotoolkit.org/community/licensing.shtml
9
*/
10
 
1422 alexandre_ 11
 
12
 
1318 alexandre_ 13
dojo.hostenv.name_ = "wsh";
14
if (typeof WScript == "undefined") {
15
	dojo.raise("attempt to use WSH host environment when no WScript global");
16
}
17
dojo.hostenv.println = WScript.Echo;
18
dojo.hostenv.getCurrentScriptUri = function () {
19
	return WScript.ScriptFullName();
20
};
21
dojo.hostenv.getText = function (fpath) {
22
	var fso = new ActiveXObject("Scripting.FileSystemObject");
23
	var istream = fso.OpenTextFile(fpath, 1);
24
	if (!istream) {
25
		return null;
26
	}
27
	var contents = istream.ReadAll();
28
	istream.Close();
29
	return contents;
30
};
31
dojo.hostenv.exit = function (exitcode) {
32
	WScript.Quit(exitcode);
33
};
34
dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug");
35