mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-11 09:24:58 +00:00
Update app.js and relative files
This commit is contained in:
parent
908a49f7ee
commit
02c56bec32
2
app.js
2
app.js
|
@ -90,7 +90,7 @@ function require(FN) {
|
|||
|
||||
// make global function
|
||||
FSO = null;
|
||||
T = "(function(global){\n" + '"use strict";' + "var module={exports:{}};var exports={};\n" + T + "\nmodule.exports=exports;return module.exports;})(this);\n\n////@ sourceURL=" + FN;
|
||||
T = "(function(global,module,exports){\n" + '"use strict";' + T + "\nmodule.exports=exports;return module.exports;})(this,{exports:{}},{});\n\n////@ sourceURL=" + FN;
|
||||
try {
|
||||
cache[FN] = eval(T);
|
||||
} catch (e) {
|
||||
|
|
25
bootstrap.js
vendored
Normal file
25
bootstrap.js
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// bootstrap.js
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var PS = require("lib/powershell");
|
||||
var REG = require("lib/registry");
|
||||
|
||||
return {
|
||||
main: function() {
|
||||
// unlock file
|
||||
console.log("Starting unlock files...");
|
||||
PS.execCommand("dir | Unblock-File");
|
||||
|
||||
// import necessary registry
|
||||
REG.importFromFile("app/assets/reg/Allow_ADO_CORS.reg");
|
||||
//REG.importFromFile("app/assets/reg/Add_URI_Scheme.reg");
|
||||
|
||||
// register URI scheme
|
||||
// todo
|
||||
|
||||
console.log("done");
|
||||
}
|
||||
};
|
|
@ -2,6 +2,8 @@
|
|||
// Registry API
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var SHELL = require("lib/shell");
|
||||
|
||||
exports.VERSIONINFO = "Registry Module (registry.js) version 0.1";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
@ -71,6 +73,7 @@ exports.destroy = function(hKey, path, key, computer) {
|
|||
return reg.DeleteKey(hKey, loc);
|
||||
}
|
||||
|
||||
/*
|
||||
// DEPRECATED
|
||||
exports.create = function(hiveKey, path, key, computer) {
|
||||
console.log("Warning! Registry.create method is DEPRECATED.");
|
||||
|
@ -110,13 +113,14 @@ exports.create = function(hiveKey, path, key, computer) {
|
|||
var createRet = reg.ExecMethod_(createKey.Name, createArgs);
|
||||
return createRet.returnValue == 0;
|
||||
}
|
||||
*/
|
||||
|
||||
exports.import = function(scriptName) {
|
||||
exports.importFromFile = function(fileName) {
|
||||
var arguments = [];
|
||||
|
||||
arguments.push("reg");
|
||||
arguments.push("import");
|
||||
arguments.push(scriptName + ".reg");
|
||||
arguments.push(fileName);
|
||||
|
||||
return SHELL.exec(arguments.join(' '));
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
|
||||
cscript app.js unlockfile
|
||||
cscript app.js bootstrap
|
||||
|
||||
start app.hta &
|
||||
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
var PS = require("lib/powershell");
|
||||
//var REGISTRY = require("lib/registry");
|
||||
|
||||
return {
|
||||
main: function() {
|
||||
console.log("Starting unlock files...");
|
||||
PS.execCommand("dir | Unblock-File");
|
||||
//REGISTRY.import("app\\assets\\reg\\Add_URI_Scheme");
|
||||
//REGISTRY.import("app\\assets\\reg\\Allow_ADO_CORS");
|
||||
console.log("done");
|
||||
}
|
||||
};
|
10
uriloader.js
10
uriloader.js
|
@ -1,7 +1,9 @@
|
|||
/*
|
||||
* uriloader.js
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// uriloader.js
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var SHELL = require("lib/shell");
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue
Block a user