Fix: update tool

This commit is contained in:
Cutls 2019-06-21 23:24:28 +09:00
parent 62cb30cb5b
commit 35bfea2dbd
2 changed files with 3 additions and 2 deletions

View File

@ -237,6 +237,7 @@ ipc.on('memory', function (event, arg) {
}) })
//update.html //update.html
ipc.on('prog', function (event, arg) { ipc.on('prog', function (event, arg) {
console.log(arg)
postMessage(["updateProg", arg], "*") postMessage(["updateProg", arg], "*")
}) })
ipc.on('mess', function (event, arg) { ipc.on('mess', function (event, arg) {

View File

@ -27,6 +27,7 @@ function dl(mainWindow, lang_path, base, dirname) {
"frame": false, // 枠の無いウィンドウ "frame": false, // 枠の無いウィンドウ
"resizable": false "resizable": false
}); });
//updatewin.openDevTools()
var lang = fs.readFileSync(lang_path, 'utf8'); var lang = fs.readFileSync(lang_path, 'utf8');
updatewin.loadURL(base + lang + '/update.html'); updatewin.loadURL(base + lang + '/update.html');
@ -44,7 +45,7 @@ function dl(mainWindow, lang_path, base, dirname) {
directory: dir, directory: dir,
openFolderWhenDone: true, openFolderWhenDone: true,
onProgress: function (event) { onProgress: function (event) {
e.sender.webContents.send('prog', e); e.sender.webContents.send('prog', event);
}, },
saveAs: false saveAs: false
}; };
@ -53,7 +54,6 @@ function dl(mainWindow, lang_path, base, dirname) {
.then(dl => { .then(dl => {
e.sender.webContents.send('mess', "ダウンロードが完了しました。"); e.sender.webContents.send('mess', "ダウンロードが完了しました。");
app.quit(); app.quit();
}) })
.catch(console.error); .catch(console.error);
} }