From f699337c59e8846aad6e1f5ae89e6133fc6f94da Mon Sep 17 00:00:00 2001 From: ArthurZheng <869705086@qq.com> Date: Wed, 30 Nov 2022 15:18:23 +0800 Subject: [PATCH] Load the gui interface after the resource copy is complete. close #69 --- src/main/index.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index ce81038..1099ab4 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -527,26 +527,6 @@ app.on('ready', () => { }); } - _windows.main = createMainWindow(); - _windows.main.on('closed', () => { - delete _windows.main; - }); - _windows.about = createAboutWindow(); - _windows.about.on('close', event => { - event.preventDefault(); - _windows.about.hide(); - }); - _windows.license = createLicenseWindow(); - _windows.license.on('close', event => { - event.preventDefault(); - _windows.license.hide(); - }); - _windows.privacy = createPrivacyWindow(); - _windows.privacy.on('close', event => { - event.preventDefault(); - _windows.privacy.hide(); - }); - ipcMain.on('clearCache', () => { desktopLink.clearCache(); }); @@ -570,6 +550,26 @@ app.on('ready', () => { desktopLink.updateCahce(); desktopLink.start() .then(() => { + _windows.main = createMainWindow(); + _windows.main.on('closed', () => { + delete _windows.main; + }); + _windows.about = createAboutWindow(); + _windows.about.on('close', event => { + event.preventDefault(); + _windows.about.hide(); + }); + _windows.license = createLicenseWindow(); + _windows.license.on('close', event => { + event.preventDefault(); + _windows.license.hide(); + }); + _windows.privacy = createPrivacyWindow(); + _windows.privacy.on('close', event => { + event.preventDefault(); + _windows.privacy.hide(); + }); + // after finsh load progress show main window and close loading window _windows.main.show(); _windows.loading.close();