diff --git a/app/js/common/version.js b/app/js/common/version.js index b4e76be5..c93af0aa 100644 --- a/app/js/common/version.js +++ b/app/js/common/version.js @@ -46,11 +46,9 @@ function verck(ver) { }); } } - var electron = require("electron"); - var remote = electron.remote; var dialog = remote.dialog; - var platform = remote.process.platform; - console.log("Your platform:" + remote.process.platform) + var platform = localStorage.getItem("platform"); + console.log("Your platform:" + platform) if (platform == "win32") { const options = { type: 'info', diff --git a/app/js/platform/preload.js b/app/js/platform/preload.js index 0d41a915..765d114d 100644 --- a/app/js/platform/preload.js +++ b/app/js/platform/preload.js @@ -8,6 +8,10 @@ onmessage = function (e) { } } +ipc.send("getPlatform", "") +ipc.on('platform', function (event, arg) { + localStorage.setItem("platform",arg) +}) ipc.on('reload', function (event, arg) { location.reload(); }) diff --git a/app/main/system.js b/app/main/system.js index edd8e97c..a1aa5f59 100644 --- a/app/main/system.js +++ b/app/main/system.js @@ -40,6 +40,10 @@ function system(mainWindow, dir, lang) { }); } }); + //プラットフォーム + ipc.on('getPlatform', function (e, arg) { + mainWindow.webContents.send('platform', process.platform); + }) //言語 ipc.on('lang', function (e, arg) {