From a208a5f653a67346ecb321af7afb0b20ddbb1dfa Mon Sep 17 00:00:00 2001 From: Kaibu Date: Thu, 18 Apr 2024 21:45:19 +0200 Subject: [PATCH] removed preload and update notifications --- CHANGELOG.md | 33 --------------------------------- electron/main/index.ts | 11 ++--------- index.html | 1 - package.json | 2 +- public/logo.svg | 20 -------------------- vite.config.ts | 18 ------------------ 6 files changed, 3 insertions(+), 82 deletions(-) delete mode 100644 CHANGELOG.md delete mode 100644 public/logo.svg diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index db6dbaa..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,33 +0,0 @@ -## 2022-10-03 - -[v2.1.0](https://github.com/electron-vite/electron-vite-vue/pull/267) - -- `vite-electron-plugin` is Fast, and WYSIWYG. 🌱 -- last-commit: db2e830 v2.1.0: use `vite-electron-plugin` instead `vite-plugin-electron` - -## 2022-06-04 - -[v2.0.0](https://github.com/electron-vite/electron-vite-vue/pull/156) - -- 🖖 Based on the `vue-ts` template created by `npm create vite`, integrate `vite-plugin-electron` -- ⚡️ More simplify, is in line with Vite project structure -- last-commit: a15028a (HEAD -> main) feat: hoist `process.env` - -## 2022-01-30 - -[v1.0.0](https://github.com/electron-vite/electron-vite-vue/releases/tag/v1.0.0) - -- ⚡️ Main、Renderer、preload, all built with vite - -## 2022-01-27 -- Refactor the scripts part. -- Remove `configs` directory. - -## 2021-11-11 -- Refactor the project. Use vite.config.ts build `Main-process`, `Preload-script` and `Renderer-process` alternative rollup. -- Scenic `Vue>=3.2.13`, `@vue/compiler-sfc` is no longer necessary. -- If you prefer Rollup, Use rollup branch. - -```bash -Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependency tree. -``` diff --git a/electron/main/index.ts b/electron/main/index.ts index 0a736a3..e1b0a83 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -11,7 +11,6 @@ import { autoUpdater } from 'electron-updater'; import { promise } from 'ping'; import Winreg from 'winreg'; import { spawn } from 'node:child_process'; -import { set } from '@vueuse/core'; switch (process.argv[1]) { case '--open-website': @@ -29,12 +28,7 @@ process.env.DIST = join(process.env.DIST_ELECTRON, '../dist'); process.env.SRC = join(process.env.DIST_ELECTRON, '../src'); process.env.PUBLIC = process.env.VITE_DEV_SERVER_URL ? join(process.env.DIST_ELECTRON, '../public') : process.env.DIST; -const autoUpdaterNotification = { - title: 'Launcher Update verfügbar', - body: 'Das Launcher Update wird heruntergeladen und beim nächsten Neustart des Launchers installiert.' -} - -autoUpdater.checkForUpdatesAndNotify(autoUpdaterNotification) +autoUpdater.checkForUpdates() // Disable GPU Acceleration for Windows 7 if (release().startsWith('6.1')) app.disableHardwareAcceleration(); @@ -55,7 +49,6 @@ if (!app.requestSingleInstanceLock()) { let win: BrowserWindow | null = null; let worker_win: BrowserWindow | null = null; -const preload = join(__dirname, '../preload/index.js'); const url = process.env.VITE_DEV_SERVER_URL; const indexHtml = join(process.env.DIST, 'index.html'); let tray: Tray | null = null; @@ -174,7 +167,7 @@ const createTray = () => { } }) } else { - autoUpdater.checkForUpdatesAndNotify(autoUpdaterNotification) + autoUpdater.checkForUpdates() } } }, diff --git a/index.html b/index.html index 68d730e..66e96b4 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,6 @@ - Panthor Launcher diff --git a/package.json b/package.json index 42ced81..9ff4dde 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "panthor", - "version": "2.0.3", + "version": "2.0.4", "main": "dist-electron/main/index.js", "description": "Panthor Launcher", "author": "Kaibu", diff --git a/public/logo.svg b/public/logo.svg deleted file mode 100644 index 96fc008..0000000 --- a/public/logo.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/vite.config.ts b/vite.config.ts index 87cfbb0..05021ba 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -46,24 +46,6 @@ export default defineConfig(({ command }) => { }, }, }, - }, - { - entry: 'electron/preload/index.ts', - onstart(options) { - // Notify the Renderer-Process to reload the page when the Preload-Scripts build is complete, - // instead of restarting the entire Electron App. - options.reload() - }, - vite: { - build: { - sourcemap: sourcemap ? 'inline' : undefined, // #332 - minify: isBuild, - outDir: 'dist-electron/preload', - rollupOptions: { - external: Object.keys('dependencies' in pkg ? pkg.dependencies : {}), - }, - }, - }, } ]), // Use Node.js API in the Renderer-process