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); }