Fix: update tool
This commit is contained in:
parent
62cb30cb5b
commit
35bfea2dbd
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user