解决办法:
在主进程main.js中粘贴下面代码,手动生成app-update.yml文件
import path from "path"
import fs from "fs"
//我们的软件发布地址
const feed = 'your_site/update/windows_64'
let yaml = '';
let appName = 'ZhangWuJi_App'
yaml += "provider: generic\n"
yaml += "url: your_site/update/windows_64\n"
yaml += "useMultipleRangeRequest: false\n"
yaml += "channel: latest\n"
yaml += "updaterCacheDirName: " + appName
let update_file = [path.join(process.resourcesPath, 'app-update.yml'), yaml]
let dev_update_file = [path.join(process.resourcesPath, 'dev-app-update.yml'), yaml]
let chechFiles = [update_file, dev_update_file]
for (let file of chechFiles) {
if (!fs.existsSync(file[0])) {
fs.writeFileSync(file[0], file[1], () => { })
}
}