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
 
11
dojo.hostenv.name_ = "wsh";
12
if (typeof WScript == "undefined") {
13
	dojo.raise("attempt to use WSH host environment when no WScript global");
14
}
15
dojo.hostenv.println = WScript.Echo;
16
dojo.hostenv.getCurrentScriptUri = function () {
17
	return WScript.ScriptFullName();
18
};
19
dojo.hostenv.getText = function (fpath) {
20
	var fso = new ActiveXObject("Scripting.FileSystemObject");
21
	var istream = fso.OpenTextFile(fpath, 1);
22
	if (!istream) {
23
		return null;
24
	}
25
	var contents = istream.ReadAll();
26
	istream.Close();
27
	return contents;
28
};
29
dojo.hostenv.exit = function (exitcode) {
30
	WScript.Quit(exitcode);
31
};
32
dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug");
33