diff --git a/updater/src/copy/copy.js b/updater/src/copy/copy.js deleted file mode 100644 index b1b4d2c..0000000 --- a/updater/src/copy/copy.js +++ /dev/null @@ -1,9 +0,0 @@ -app.on('copy-me', () => { - const fs = require('fs'); - - // File destination.txt will be created or overwritten by default. - fs.copyFile('source.txt', 'destination.txt', (err) => { - if (err) throw err; - console.log('source.txt was copied to destination.txt'); - }); -}); \ No newline at end of file diff --git a/updater/src/download/downloader.js b/updater/src/download/downloader.js deleted file mode 100644 index 214246a..0000000 --- a/updater/src/download/downloader.js +++ /dev/null @@ -1,21 +0,0 @@ -const { app, BrowserWindow, ipcMain } = require("electron"); -const { download } = require("electron-dl"); -let window; -app.on("ready", () => { - window = new BrowserWindow({ - width: someWidth, - height: someHeight - }); - window.loadURL(`file://${__dirname}/index.html`); - ipcMain.on("download", (event, info) => { - download(BrowserWindow.getFocusedWindow(), info.url, info.properties) - .then(dl => window.webContents.send("download complete", dl.getSavePath())); - }); -}); - - -ipcMain.on("download", (event, info) => { - info.properties.onProgress = status => window.webContents.send("download progress", status); - download(BrowserWindow.getFocusedWindow(), info.url, info.properties) - .then(dl => window.webContents.send("download complete", dl.getSavePath())); -}); \ No newline at end of file diff --git a/updater/src/index.html b/updater/src/index.html index ab81bd2..acb18e5 100644 --- a/updater/src/index.html +++ b/updater/src/index.html @@ -3,22 +3,21 @@