Fix: 修复和补充打包的部分功能和问题

This commit is contained in:
2025-09-03 19:44:46 +08:00
parent 4eff008fd9
commit 656c276f1e
3 changed files with 22 additions and 1 deletions

BIN
build/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -3,6 +3,8 @@ const path = require("path");
const { spawn } = require('child_process')
const fs = require("fs");
app.disableHardwareAcceleration(); // 高 DPI 缩放修复
// 音效播放器
function playAudioFile(filePath) {
if (process.platform === 'win32') {
@ -78,6 +80,8 @@ function createWindow() {
transparent: true, // 开启透明窗口
frame: false, // 无边框窗口
resizable: false, // 禁止调整大小
title: "说的道理桌宠",
icon: path.join(__dirname, '../build/icon.png'),
webPreferences: {
preload: path.join(__dirname, "preload.js"),
contextIsolation: true,

View File

@ -1,6 +1,6 @@
{
"name": "shuodedaoli-deskpet",
"version": "0.1.0",
"version": "0.2.0",
"description": "A cute desktop pet of 'Shuodedaoli' built with Electron and Vue 3.",
"main": "main/main.js",
"scripts": {
@ -15,15 +15,32 @@
"build": {
"appId": "com.kisechan.deskpet",
"productName": "说的道理桌面宠物",
"compression": "maximum",
"copyright": "Copyright © 2025 Kisechan",
"directories": {
"output": "out"
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"perMachine": false,
"allowElevation": false,
"installerIcon": "build/icon.ico",
"uninstallerIcon": "build/icon.ico",
"installerHeaderIcon": "build/icon.ico",
"installerLanguages": ["zh_CN", "en_US"],
"language": "2052"
},
"files": [
"main/",
"renderer/dist/",
"package.json"
],
"publish": {
"provider": "github",
"owner": "Kisechan",
"repo": "Shuodedaoli-Deskpet"
},
"win": {
"target": "nsis",
"icon": "build/icon.png"