2017-09-23 09:42:16 +00:00
|
|
|
'use strict';
|
2017-09-14 12:41:34 +00:00
|
|
|
var boot;
|
2017-09-23 09:42:16 +00:00
|
|
|
var disable;
|
2017-09-14 12:41:34 +00:00
|
|
|
/**
|
|
|
|
* 初始化框架引擎
|
|
|
|
*/
|
|
|
|
(function () {
|
2017-09-23 09:42:16 +00:00
|
|
|
boot = function (plugin) {
|
|
|
|
// 开发环境下初始化
|
|
|
|
var root = "src/main/resources";
|
|
|
|
if (plugin !== null) {
|
|
|
|
// noinspection JSUnresolvedVariable
|
|
|
|
root = plugin.dataFolder.canonicalPath;
|
|
|
|
}
|
|
|
|
load(root + '/core/init.js');
|
2017-09-23 10:30:14 +00:00
|
|
|
try {
|
|
|
|
init(root, plugin);
|
|
|
|
} catch (ex) {
|
|
|
|
log.w("MiaoScript 初始化失败! %s", ex);
|
|
|
|
throw ex;
|
|
|
|
}
|
2017-09-23 09:42:16 +00:00
|
|
|
disable = disablePlugins
|
|
|
|
};
|
2017-09-14 12:41:34 +00:00
|
|
|
})();
|