Commit 2c3afe95 authored by antoor's avatar antoor

Repair read file failed

parent 2ee1e9d5
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
'use strict'; 'use strict';
const fs = global.require('fs'); const fs = global.require('fs');
const path = global.require('path');
const electron = global.require('electron'); const electron = global.require('electron');
const remote = electron.remote; const remote = electron.remote;
const ipcRenderer = electron.ipcRenderer; const ipcRenderer = electron.ipcRenderer;
...@@ -58,7 +59,7 @@ ipcRenderer.send('aproxy', { ...@@ -58,7 +59,7 @@ ipcRenderer.send('aproxy', {
antSword['ipcRenderer'] = ipcRenderer; antSword['ipcRenderer'] = ipcRenderer;
antSword['CacheManager'] = CacheManager; antSword['CacheManager'] = CacheManager;
antSword['menubar'] = new Menubar(); antSword['menubar'] = new Menubar();
antSword['package'] = JSON.parse(fs.readFileSync('./package.json')); antSword['package'] = JSON.parse(fs.readFileSync(path.join(global.__dirname, '../package.json')));
// 加载模块列表 // 加载模块列表
// antSword['tabbar'] = new dhtmlXTabBar(document.getElementById('container')); // antSword['tabbar'] = new dhtmlXTabBar(document.getElementById('container'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment