diff --git a/backend/mpc-system/services/service-party-app/build-windows.bat b/backend/mpc-system/services/service-party-app/build-windows.bat index b5b63cef..73aa27fe 100644 --- a/backend/mpc-system/services/service-party-app/build-windows.bat +++ b/backend/mpc-system/services/service-party-app/build-windows.bat @@ -3,117 +3,113 @@ chcp 65001 >nul setlocal enabledelayedexpansion echo ============================================ -echo Service Party App - Windows 编译脚本 +echo Service Party App - Windows Build Script echo ============================================ echo. cd /d "%~dp0" -:: 检查 Node.js +:: Check Node.js where node >nul 2>nul if %errorlevel% neq 0 ( - echo [错误] 未找到 Node.js,请先安装 Node.js 18+ - echo 下载地址: https://nodejs.org/ + echo [ERROR] Node.js not found. Please install Node.js 18+ + echo Download: https://nodejs.org/ goto :error ) -:: 检查 Go +:: Check Go where go >nul 2>nul if %errorlevel% neq 0 ( - echo [错误] 未找到 Go,请先安装 Go 1.21+ - echo 下载地址: https://go.dev/dl/ + echo [ERROR] Go not found. Please install Go 1.21+ + echo Download: https://go.dev/dl/ goto :error ) -:: 显示版本信息 -echo [信息] Node.js 版本: +:: Show versions +echo [INFO] Node.js version: node --version -echo [信息] Go 版本: +echo [INFO] Go version: go version echo. -:: 步骤 1: 编译 TSS 子进程 +:: Step 1: Build TSS subprocess echo ============================================ -echo [1/4] 编译 TSS 子进程 (Go)... +echo [1/4] Building TSS subprocess (Go)... echo ============================================ cd tss-party if not exist "..\bin\win32-x64" mkdir "..\bin\win32-x64" -echo 正在编译 tss-party.exe... +echo Building tss-party.exe... go build -ldflags="-s -w" -o ..\bin\win32-x64\tss-party.exe . if %errorlevel% neq 0 ( - echo [错误] TSS 子进程编译失败 + echo [ERROR] TSS subprocess build failed goto :error ) -echo [成功] tss-party.exe 已生成 +echo [OK] tss-party.exe created cd .. echo. -:: 步骤 2: 安装依赖 +:: Step 2: Install dependencies echo ============================================ -echo [2/4] 安装 npm 依赖... +echo [2/4] Installing npm dependencies... echo ============================================ if exist "node_modules" ( - echo 依赖已存在,跳过安装 (如需重新安装请删除 node_modules 文件夹) + echo Dependencies exist, skipping install ) else ( call npm install if %errorlevel% neq 0 ( - echo [错误] npm install 失败 + echo [ERROR] npm install failed goto :error ) ) -echo [成功] 依赖安装完成 +echo [OK] Dependencies installed echo. -:: 步骤 3: 创建图标 (如果不存在) +:: Step 3: Check resources echo ============================================ -echo [3/4] 检查资源文件... +echo [3/4] Checking resources... echo ============================================ if not exist "build" mkdir "build" -if not exist "build\icon.ico" ( - echo [警告] 未找到 build\icon.ico,将使用默认图标 - echo 如需自定义图标,请将 icon.ico (256x256) 放入 build 文件夹 -) +if not exist "build\icon.ico" echo [WARN] build\icon.ico not found, using default icon echo. -:: 步骤 4: 编译 Electron 应用 +:: Step 4: Build Electron app echo ============================================ -echo [4/4] 编译 Windows 应用... +echo [4/4] Building Windows application... echo ============================================ -:: 编译 TypeScript 和 Vite -echo 正在编译前端代码... +echo Building frontend code... call npm run build:win if %errorlevel% neq 0 ( - echo [错误] 应用编译失败 + echo [ERROR] Application build failed goto :error ) echo. echo ============================================ -echo 编译完成! +echo Build Complete! echo ============================================ echo. -echo 输出目录: %cd%\release\ +echo Output directory: %cd%\release\ echo. -:: 列出生成的文件 +:: List generated files if exist "release" ( - echo 生成的文件: + echo Generated files: dir /b release\*.exe 2>nul ) echo. -echo 按任意键退出... +echo Press any key to exit... pause >nul exit /b 0 :error echo. -echo 编译失败,请检查错误信息 +echo Build failed. Please check error messages. echo. pause exit /b 1 diff --git a/backend/mpc-system/services/service-party-app/electron-builder.json b/backend/mpc-system/services/service-party-app/electron-builder.json index e55dbf18..999ec00b 100644 --- a/backend/mpc-system/services/service-party-app/electron-builder.json +++ b/backend/mpc-system/services/service-party-app/electron-builder.json @@ -25,7 +25,6 @@ "arch": ["x64"] } ], - "icon": "build/icon.ico", "artifactName": "${productName}-${version}-${platform}-${arch}.${ext}" }, "nsis": {