说明.txt

This commit is contained in:
chenqiang 2025-09-14 11:25:19 +08:00
parent 1db2e19fe8
commit e1685afeaf
2 changed files with 97 additions and 0 deletions

View File

@ -49,6 +49,54 @@ function prepareForBuild() {
} }
} }
// 复制说明文件到目标目录
function copyReadmeFile() {
console.log('开始复制说明.txt文件...');
try {
// 源说明文件路径
const sourceReadmePath = path.join(__dirname, '说明.txt');
// 检查源文件是否存在
if (!fs.existsSync(sourceReadmePath)) {
console.error('未找到说明.txt文件请先在项目根目录创建该文件');
return;
}
// 查找win-unpacked目录可能有x64和ia32两个版本
const buildDir = path.join(__dirname, 'dist_electron');
const possibleDirs = [
path.join(buildDir, 'win-unpacked'),
path.join(buildDir, 'win-ia32-unpacked'),
path.join(buildDir, 'win-x64-unpacked')
];
// 确定存在的目录
let unpackedDir = null;
for (const dir of possibleDirs) {
if (fs.existsSync(dir)) {
unpackedDir = dir;
break;
}
}
if (!unpackedDir) {
console.error('未找到win-unpacked目录');
return;
}
// 目标文件路径
const targetReadmePath = path.join(unpackedDir, '说明.txt');
// 复制文件
fs.copyFileSync(sourceReadmePath, targetReadmePath);
console.log(`说明.txt文件已复制到${targetReadmePath}`);
} catch (error) {
console.error('复制说明.txt文件失败:', error);
}
}
// 执行打包命令 - 配置为dir模式 // 执行打包命令 - 配置为dir模式
function buildDirApp() { function buildDirApp() {
console.log('开始构建Windows 7目录模式应用...'); console.log('开始构建Windows 7目录模式应用...');
@ -70,6 +118,9 @@ function buildDirApp() {
console.log('Windows 7目录模式应用构建完成'); console.log('Windows 7目录模式应用构建完成');
console.log('构建产物位于 dist_electron 目录'); console.log('构建产物位于 dist_electron 目录');
// 复制说明文件
copyReadmeFile();
} catch (error) { } catch (error) {
console.error('构建失败:', error); console.error('构建失败:', error);
process.exit(1); process.exit(1);

46
说明.txt Normal file
View File

@ -0,0 +1,46 @@
统计技能考试系统使用说明
欢迎使用统计技能考试系统!
一、系统概述
本系统是一款专为统计技能考试设计的桌面应用程序,支持选择题和填空题等多种题型,提供考试管理、考生管理、试题管理等功能。
二、系统要求
- 操作系统Windows 7或更高版本
- 内存要求至少4GB RAM
- 硬盘空间至少100MB可用空间
- 显示器分辨率1024x768或更高
三、安装说明
本系统为绿色免安装版本,直接解压后即可使用:
1. 解压下载的安装包
2. 双击"统计技能考试系统.exe"运行程序
四、使用方法
1. **管理员登录**:系统启动后,使用管理员账号登录
2. **试题管理**:在"试题管理"模块添加、编辑和删除试题
3. **考试管理**:在"考试管理"模块创建和管理考试
4. **考生管理**:在"考生管理"模块添加和管理考生信息
5. **用户试卷**:在"用户试卷"模块查看和导出考生的答题情况
五、注意事项
1. 确保以管理员身份运行程序,以获得完整功能
2. 请勿删除或修改程序目录下的文件,以免影响系统正常运行
3. 重要数据会保存在程序目录下的data文件夹中请定期备份
4. 如需卸载,直接删除整个文件夹即可
六、常见问题
Q: 程序无法启动怎么办?
A: 请确认您的电脑满足系统要求,并尝试以管理员身份运行
Q: 数据保存在哪里?
A: 数据保存在程序目录下的data文件夹中
七、联系方式
如有任何问题或建议,请联系技术支持:
电话XXX-XXXXXXX
邮箱support@example.com
版本信息:
版本号0.1.0
发布日期2025年9月