From 35bfea2dbd93f282831fe2f79197b26565398ac5 Mon Sep 17 00:00:00 2001 From: Cutls Date: Fri, 21 Jun 2019 23:24:28 +0900 Subject: [PATCH] Fix: update tool --- app/js/platform/preload.js | 1 + app/main/dl.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/js/platform/preload.js b/app/js/platform/preload.js index eda3bfd7..a91adc0d 100644 --- a/app/js/platform/preload.js +++ b/app/js/platform/preload.js @@ -237,6 +237,7 @@ ipc.on('memory', function (event, arg) { }) //update.html ipc.on('prog', function (event, arg) { + console.log(arg) postMessage(["updateProg", arg], "*") }) ipc.on('mess', function (event, arg) { diff --git a/app/main/dl.js b/app/main/dl.js index 220d244f..2bc3cfee 100644 --- a/app/main/dl.js +++ b/app/main/dl.js @@ -27,6 +27,7 @@ function dl(mainWindow, lang_path, base, dirname) { "frame": false, // 枠の無いウィンドウ "resizable": false }); + //updatewin.openDevTools() var lang = fs.readFileSync(lang_path, 'utf8'); updatewin.loadURL(base + lang + '/update.html'); @@ -44,7 +45,7 @@ function dl(mainWindow, lang_path, base, dirname) { directory: dir, openFolderWhenDone: true, onProgress: function (event) { - e.sender.webContents.send('prog', e); + e.sender.webContents.send('prog', event); }, saveAs: false }; @@ -53,7 +54,6 @@ function dl(mainWindow, lang_path, base, dirname) { .then(dl => { e.sender.webContents.send('mess', "ダウンロードが完了しました。"); app.quit(); - }) .catch(console.error); }