This commit is contained in:
chenqiang 2025-09-09 23:06:40 +08:00
parent 1c7dd98118
commit 158aad76c5
2 changed files with 8 additions and 6 deletions

View File

@ -38,13 +38,15 @@ function prepareForBuild() {
const dataDir = path.join(__dirname, 'data');
if (!fs.existsSync(dataDir)) {
fs.mkdirSync(dataDir);
fs.writeFileSync(path.join(dataDir, '.gitignore'), '*\n!.gitignore');
console.log('创建data目录完成');
}
// 创建.gitignore文件如果不存在
const gitignorePath = path.join(dataDir, '.gitignore');
if (!fs.existsSync(gitignorePath)) {
fs.writeFileSync(gitignorePath, '*\n!.gitignore');
// 确保portable-app目录存在
const portableDir = path.join(buildDir, 'portable-app');
if (!fs.existsSync(portableDir)) {
fs.mkdirSync(portableDir, { recursive: true });
console.log('创建portable-app目录完成');
}
console.log('准备工作完成');

View File

@ -93,8 +93,8 @@ module.exports = {
// 便携应用特定配置 - 修改输出结构
portable: {
// 修改artifactName以控制输出路径
artifactName: "portable-app/统计技能考试系统_便携版_${version}_${arch}.exe",
// 使用更简单的文件名,避免编码问题
artifactName: "portable-app/StatExamPortable_${version}_${arch}.exe",
},
// 全局禁用签名配置