portable.txt

This commit is contained in:
chenqiang 2025-09-09 21:42:18 +08:00
parent a6bdb9fdf6
commit b65ff88896

View File

@ -23,6 +23,7 @@ function deleteFolderRecursive(dir) {
}
// 创建打包前的准备工作
// 在prepareForBuild函数中添加
function prepareForBuild() {
console.log('开始准备Windows 7便携应用打包...');
@ -42,6 +43,13 @@ function prepareForBuild() {
console.log('创建data目录完成');
}
// 创建便携模式标识文件
const portableFlagPath = path.join(__dirname, 'portable.txt');
if (!fs.existsSync(portableFlagPath)) {
fs.writeFileSync(portableFlagPath, '');
console.log('创建便携模式标识文件完成');
}
console.log('准备工作完成');
} catch (error) {
console.error('准备工作失败:', error);