sign
This commit is contained in:
parent
9358bd1e80
commit
3b80ea1019
@ -1,6 +1,6 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process'); // 确保导入execSync
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
// 创建一个兼容Node.js 12的删除文件夹函数
|
||||
function deleteFolderRecursive(dir) {
|
||||
@ -49,7 +49,7 @@ function prepareForBuild() {
|
||||
}
|
||||
}
|
||||
|
||||
// 执行打包命令 - 简化命令行参数
|
||||
// 执行打包命令 - 移除不支持的--no-sign参数
|
||||
function buildPortableApp() {
|
||||
console.log('开始构建Windows 7便携应用...');
|
||||
|
||||
@ -57,13 +57,13 @@ function buildPortableApp() {
|
||||
// 完全删除签名环境变量
|
||||
delete process.env.WIN_CSC_LINK;
|
||||
delete process.env.WIN_CSC_KEY_PASSWORD;
|
||||
// 新增:设置环境变量明确禁用签名
|
||||
// 设置环境变量明确禁用签名相关功能
|
||||
process.env.ELECTRON_BUILDER_SKIP_NOTARIZATION = 'true';
|
||||
process.env.ELECTRON_SKIP_NOTARIZE = 'true';
|
||||
|
||||
// 使用基础命令行参数,同时添加额外的签名禁用参数
|
||||
// 使用最基本的命令行参数,移除不支持的--no-sign
|
||||
execSync(
|
||||
'npm run electron:build -- --win portable --ia32 --x64 --publish never --no-sign',
|
||||
'npm run electron:build -- --win portable --ia32 --x64 --publish never',
|
||||
{ stdio: 'inherit' }
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user