Commit 09f2f27a authored by nanahira's avatar nanahira

resolve update problems, again

parent e994b1c2
......@@ -207,13 +207,22 @@ function createTray() {
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', () => {
app.on('ready', async () => {
createWindow();
if (process.platform === 'win32') {
createTray();
}
if (process.env['NODE_ENV'] === 'production') {
autoUpdater.checkForUpdates();
let updateTempPath = '~/.cache/mycard-updater'
if (process.platform === 'win32') {
updateTempPath = `${process.env.LOCALAPPDATA}\\mycard-updater`
} else if (process.platform === 'darwin') {
updateTempPath = '~/Library/Application Support/Caches/mycard-updater'
}
try {
await require('fs').promises.mkdir(updateTempPath, {recursive: true});
} catch(e) {}
await autoUpdater.checkForUpdates();
}
});
......
......@@ -93,6 +93,9 @@
"extraResources": [
"bin"
],
"win": {
"publisherName": "Nana Yumesaki"
},
"linux": {
"target": [
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment