我计划为我的电子桌面应用购买代码签名证书,但是现在我不知道如何将代码应用于我的应用,因此如果有人知道如何构建它,请帮助我这部分。谢谢你。
这是我的Package.json文件代码:
{
"name": "electronapp",
"version": "1.0.0",
"description": "Exam app using electron",
"main": "main.js",
"build":{
"appid":"yourid",
"asar": true,
"forceCodeSigning": true,
"win":{
"target": "...",
"publisherName": "...",
"certificateFile": "...",
"certificatePassword":"...",
"certificateSubjectName":"...",
"certificateSha1":"...",
"signingHashAlgorithms":"..."
}
},
"scripts": {
"start": "electron main.js",
"test": "echo \"Error: no test specified\" && exit 1",
"package-mac": "electron-pac kager . --overwrite --platform=darwin --arch=all --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds \"KIT Online Examination System\"",
"package-win": "electron-packager . --overwrite --asar=true --platform=win32 --arch=all --icon=assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"KIT Online Examination System\" \"KIT Online Examination System\"",
"package-linux": "electron-packager . --overwrite --asar=true --platform=linux --arch=all --icon=assets/icons/png/kit-logo.png --prune=true --out=release-builds \"KIT Online Examination System\"",
"create-installer-mac": "electron-installer-dmg ./release-builds/Electron\\ tutorial\\ app-darwin-x64/Electron\\ tutorial\\ app.app electron-tutorial-app --out=release-builds --overwrite --icon=assets/icons/mac/icon.icns",
"create-installer-win": "node installers/windows/createinstaller.js",
"create-debian-installer": "electron-installer-debian --src release-builds/electron-tutorial-app-linux-x64/ --arch amd64 --config debian.json"
},