@@ -14,13 +14,10 @@ import './constant'
|
||||
import './log'
|
||||
|
||||
let {
|
||||
ToLog,
|
||||
TO_ERROR_LOG,
|
||||
SaveToFile,
|
||||
TimeStart,
|
||||
LOAD_CONST,
|
||||
LoadParams,
|
||||
GetDataPath,
|
||||
CONST_NAME_ARR,
|
||||
SaveParams,
|
||||
SAVE_CONST,
|
||||
@@ -41,26 +38,11 @@ String.prototype.right = function(count) {
|
||||
else
|
||||
return this.substr(0, this.length);
|
||||
};
|
||||
if (fs.existsSync("./lib/bintrees"))
|
||||
global.RBTree = require("../lib/bintrees").RBTree;
|
||||
else
|
||||
global.RBTree = require('bintrees').RBTree;
|
||||
if (fs.existsSync("./lib/ntp-client"))
|
||||
global.ntpClient = require('../lib/ntp-client');
|
||||
else
|
||||
global.ntpClient = require('ntp-client');
|
||||
global.RBTree = require('bintrees').RBTree;
|
||||
global.ntpClient = require('ntp-client');
|
||||
global.Stun = require('stun');
|
||||
global.ZIP = require("zip");
|
||||
var strOS = os.platform() + "_" + os.arch();
|
||||
if (global.NWMODE)
|
||||
strOS = strOS + "-nw" + global.NWVERSION;
|
||||
if (fs.existsSync("./lib/secp256k1/" + strOS + "/secp256k1.node")) {
|
||||
try {
|
||||
global.secp256k1 = require('../lib/secp256k1/' + strOS + '/secp256k1.node');
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
if (!global.secp256k1) {
|
||||
global.secp256k1 = require('secp256k1');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user