diff --git a/electron-vue-template/scripts/copy-assets.js b/electron-vue-template/scripts/copy-assets.js new file mode 100644 index 0000000..7d8c898 --- /dev/null +++ b/electron-vue-template/scripts/copy-assets.js @@ -0,0 +1,8 @@ +const Path = require('path'); +const FileSystem = require('fs-extra'); + +async function copyAssets() { + console.log('Static assets are now handled by Vite from src/renderer/public'); +} + +module.exports = copyAssets; \ No newline at end of file diff --git a/electron-vue-template/src/main/main.ts b/electron-vue-template/src/main/main.ts index 6b342b0..550c146 100644 --- a/electron-vue-template/src/main/main.ts +++ b/electron-vue-template/src/main/main.ts @@ -111,12 +111,10 @@ function getSplashPath(): string { return join(__dirname, '../../public/splash.html'); } - function getIconPath(): string { if (process.env.NODE_ENV === 'development') { return join(__dirname, '../../public/icon/icon.png'); } - const bundledIconPath = join(process.resourcesPath, 'app.asar.unpacked/public/icon/icon.png'); if (existsSync(bundledIconPath)) { return bundledIconPath; @@ -230,7 +228,7 @@ function startSpringBoot() { } } -startSpringBoot(); +// startSpringBoot(); function stopSpringBoot() { if (!springProcess) return; @@ -268,7 +266,7 @@ function createWindow() { Menu.setApplicationMenu(null); mainWindow.setMenuBarVisibility(false); - + // 打开开发者工具 if (process.env.NODE_ENV === 'development') { mainWindow.webContents.openDevTools(); @@ -315,7 +313,6 @@ app.whenReady().then(() => { splashWindow.loadFile(splashPath); } - //11111 // setTimeout(() => { // openAppIfNotOpened(); // }, 2000); diff --git a/electron-vue-template/src/renderer/components/common/UpdateDialog.vue b/electron-vue-template/src/renderer/components/common/UpdateDialog.vue index 460eb2f..d133515 100644 --- a/electron-vue-template/src/renderer/components/common/UpdateDialog.vue +++ b/electron-vue-template/src/renderer/components/common/UpdateDialog.vue @@ -1,7 +1,6 @@