|
|
@@ -6,6 +6,7 @@ const path = require('path');
|
|
|
const url = require('url');//引入url处理模块
|
|
|
const autoUpdater = require('electron-updater').autoUpdater;
|
|
|
const {ipcMain} = require('electron');
|
|
|
+const dialog = require('electron').dialog;
|
|
|
const regedit = require('regedit'); //引入regedit
|
|
|
const Menu = electron.Menu;//引入菜单慕课
|
|
|
const debug = (process.argv.indexOf('--debug')>0);
|
|
|
@@ -19,7 +20,13 @@ let message={
|
|
|
};
|
|
|
let childProcess =require('child_process');
|
|
|
let CampusWindow,mainWindow,BrowserHistory,BrowserFeedback,AboutUsW;
|
|
|
-app.commandLine.appendSwitch('ppapi-flash-path',app.getPath('pepperFlashSystemPlugin'));
|
|
|
+try {
|
|
|
+ let flash=app.getPath('pepperFlashSystemPlugin1');
|
|
|
+ app.commandLine.appendSwitch('ppapi-flash-path',flash);
|
|
|
+}catch (e) {
|
|
|
+ dialog.showErrorBox('缺少flash插件', '请前往https://www.flash.cn/下载该插件,点击确定后将打开flash下载地址');
|
|
|
+ process.argv[1]='https://www.flash.cn/';
|
|
|
+}
|
|
|
var version=require(__dirname+"/package.json").version;
|
|
|
function createCampusWindow(flag) {
|
|
|
createIndexWindow(false);
|