fixed: 跳过崩溃问题
Change-Id: I23647786339d3b1f32211cb90186ea534ac20763
This commit is contained in:
parent
aa25abc11c
commit
4e6d8e509d
|
@ -1373,7 +1373,7 @@ export class CodeApplication extends Disposable {
|
||||||
private async openDeploylWindow(accessor: ServicesAccessor): Promise<void> {
|
private async openDeploylWindow(accessor: ServicesAccessor): Promise<void> {
|
||||||
const DeployMainService = accessor.get(IDeployMainService);
|
const DeployMainService = accessor.get(IDeployMainService);
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
DeployMainService.openDeployWindow().then(() => {
|
DeployMainService.openDeployWindow(true).then(() => {
|
||||||
resolve(void 0);
|
resolve(void 0);
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
|
@ -457,8 +457,8 @@ class deployWindow {
|
||||||
if (this.notNowRadio && this.notNowRadio instanceof HTMLInputElement && this.notNowRadio.checked) {
|
if (this.notNowRadio && this.notNowRadio instanceof HTMLInputElement && this.notNowRadio.checked) {
|
||||||
this.justDownLoadTabArrayIndex = 0;
|
this.justDownLoadTabArrayIndex = 0;
|
||||||
this.localInstallTabArrayIndex = 0;
|
this.localInstallTabArrayIndex = 0;
|
||||||
console.log('renderer send kylinide.installWizard.skipWizard');
|
// console.log('renderer send kylinide.installWizard.skipWizard');
|
||||||
ipcRenderer.send('kylinide.installWizard.skipWizard');
|
ipcRenderer.send('kylinide.installWizard.closeWizard', { type: "skip" });
|
||||||
} else if (this.onlineInstallRadio && this.onlineInstallRadio instanceof HTMLInputElement && this.onlineInstallRadio.checked) {
|
} else if (this.onlineInstallRadio && this.onlineInstallRadio instanceof HTMLInputElement && this.onlineInstallRadio.checked) {
|
||||||
this.justDownLoadTabArrayIndex = 0;
|
this.justDownLoadTabArrayIndex = 0;
|
||||||
this.localInstallTabArrayIndex = 0;
|
this.localInstallTabArrayIndex = 0;
|
||||||
|
@ -773,10 +773,10 @@ class deployWindow {
|
||||||
ipcRenderer.send('kylinide.installWizard.helpLink', { type: "helpLink" })
|
ipcRenderer.send('kylinide.installWizard.helpLink', { type: "helpLink" })
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('skipAll')?.addEventListener('click', () => {
|
// document.getElementById('skipAll')?.addEventListener('click', () => {
|
||||||
console.log("render send kylinide.installWizard.skipWizard");
|
// console.log("render send kylinide.installWizard.skipWizard");
|
||||||
ipcRenderer.send('kylinide.installWizard.skipWizard');
|
// ipcRenderer.send('kylinide.installWizard.skipWizard');
|
||||||
});
|
// });
|
||||||
|
|
||||||
this.prevBtn!.addEventListener('click', () => {
|
this.prevBtn!.addEventListener('click', () => {
|
||||||
console.log('click prevStep');
|
console.log('click prevStep');
|
||||||
|
|
|
@ -136,9 +136,6 @@ export class DeployMainService implements IDeployMainService {
|
||||||
this.loggerSoft = this.loggerMainService.createLogger(URI.file(this.installConfig + "/log/softdetail.log"));
|
this.loggerSoft = this.loggerMainService.createLogger(URI.file(this.installConfig + "/log/softdetail.log"));
|
||||||
this.removeListeners();
|
this.removeListeners();
|
||||||
this.registerListeners();
|
this.registerListeners();
|
||||||
this.deployWindowrParentWindow?.on('close', () => {
|
|
||||||
this.deployWindowrParentWindow = null;
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.localConfigObject = { depConfigInfo: "", res: 0, g_index_Object: {}, osinfo: "", localConfigMatch: 0, osrelease: "", supportList: [] };
|
this.localConfigObject = { depConfigInfo: "", res: 0, g_index_Object: {}, osinfo: "", localConfigMatch: 0, osrelease: "", supportList: [] };
|
||||||
|
@ -201,14 +198,18 @@ export class DeployMainService implements IDeployMainService {
|
||||||
this.logger.info("最小化窗口");
|
this.logger.info("最小化窗口");
|
||||||
this.minWindow();
|
this.minWindow();
|
||||||
};
|
};
|
||||||
listenerCloseWindow = (event: IpcMainEvent) => {
|
listenerCloseWindow = (event: IpcMainEvent, msg: any) => {
|
||||||
//删除新下载但是没被使用的配置文件
|
if (msg.type === 'skip') {
|
||||||
if (this.updateConfigDir) {
|
this.logger.info("跳过配置");
|
||||||
if (this.selectObject.updateFlag == false)
|
}
|
||||||
if (fs.existsSync(this.updateConfigDir))
|
if (msg.type === "close") {
|
||||||
fs.rmdirSync(this.updateConfigDir, { recursive: true });
|
//删除新下载但是没被使用的配置文件
|
||||||
|
if (this.updateConfigDir) {
|
||||||
|
if (this.selectObject.updateFlag == false)
|
||||||
|
if (fs.existsSync(this.updateConfigDir))
|
||||||
|
fs.rmdirSync(this.updateConfigDir, { recursive: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.closeWindow();
|
this.closeWindow();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1233,23 +1234,25 @@ export class DeployMainService implements IDeployMainService {
|
||||||
this.DeployWindow.on('close', () => {
|
this.DeployWindow.on('close', () => {
|
||||||
this.logger.info("关闭窗口");
|
this.logger.info("关闭窗口");
|
||||||
this.DeployWindow = null;
|
this.DeployWindow = null;
|
||||||
validatedIpcMain.removeListener('kylinide.installWizard.skipWizard', listenerSkipWizard
|
try {
|
||||||
);
|
DeployDisposables.dispose();
|
||||||
// validatedIpcMain.removeListener('kylinide.installWizard.init', listenerInit);
|
} catch {
|
||||||
DeployDisposables.dispose();
|
this.logger.error("deployDisposables.dispose() catch");
|
||||||
if (flag) {
|
|
||||||
// 第一次打开时,关闭窗口,继续
|
|
||||||
resolve(void 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resolve(void 0);
|
||||||
});
|
});
|
||||||
const listenerSkipWizard = async (event: IpcMainEvent) => {
|
this.deployWindowrParentWindow?.on('close', () => {
|
||||||
this.logger.info("跳过配置");
|
this.deployWindowrParentWindow = null;
|
||||||
if (this.DeployWindow && this.DeployWindow != undefined) {
|
})
|
||||||
this.DeployWindow.close();
|
// const listenerSkipWizard = async (event: IpcMainEvent) => {
|
||||||
}
|
// this.logger.info("跳过配置");
|
||||||
}
|
// if (this.DeployWindow && this.DeployWindow != undefined) {
|
||||||
validatedIpcMain.on('kylinide.installWizard.skipWizard', listenerSkipWizard
|
// this.DeployWindow.close();
|
||||||
);
|
// }
|
||||||
|
// }
|
||||||
|
// validatedIpcMain.on('kylinide.installWizard.skipWizard', listenerSkipWizard
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
if (this.DeployWindow) {
|
if (this.DeployWindow) {
|
||||||
this.focusWindow(this.DeployWindow);
|
this.focusWindow(this.DeployWindow);
|
||||||
|
|
Loading…
Reference in New Issue