Skip to content

Commit

Permalink
removed preload and update notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaibu committed Apr 18, 2024
1 parent 46d660f commit a208a5f
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 82 deletions.
33 changes: 0 additions & 33 deletions CHANGELOG.md

This file was deleted.

11 changes: 2 additions & 9 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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();
Expand All @@ -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;
Expand Down Expand Up @@ -174,7 +167,7 @@ const createTray = () => {
}
})
} else {
autoUpdater.checkForUpdatesAndNotify(autoUpdaterNotification)
autoUpdater.checkForUpdates()
}
}
},
Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="de">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Panthor Launcher</title>
</head>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
20 changes: 0 additions & 20 deletions public/logo.svg

This file was deleted.

18 changes: 0 additions & 18 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a208a5f

Please sign in to comment.