diff --git a/package.json b/package.json index 1b74178..4b5ea51 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "electron-app-c1-launcher", "version": "0.0.0", "private": true, + "author": "soviby 936858871@qq.com", "scripts": { "dev": "vite", "build": "run-p type-check \"build-only {@}\" --", @@ -10,6 +11,8 @@ "type-check": "vue-tsc --build --force" }, "dependencies": { + "electron-log": "^5.2.0", + "electron-updater": "^6.3.9", "vue": "^3.4.29" }, "devDependencies": { diff --git a/plugins/vite.electron.build.ts b/plugins/vite.electron.build.ts index 910972d..909a185 100644 --- a/plugins/vite.electron.build.ts +++ b/plugins/vite.electron.build.ts @@ -42,10 +42,14 @@ export const ElectronBuildPlugin = (): Plugin => { icon: path.resolve(process.cwd(), 'src/assets/test-icon.ico'), // 指定图标文件路径 target: [ { - target: 'portable', - arch: ['x64', 'ia32'] + target: 'nsis', // 安装模式: nsis 单文件启动: portable + arch: ['x64'] } ] + }, + nsis: { + oneClick: false, + allowToChangeInstallationDirectory: true } } }) diff --git a/src/App.vue b/src/App.vue index fa7e1bb..d05208d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,7 +5,6 @@ import TheWelcome from './components/TheWelcome.vue'