修复dev模式运行问题

pull/1583/head
lyswhut 2023-09-20 12:22:27 +08:00
parent 6d5cc38235
commit 89255a8c84
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,8 @@ const replaceQrcDecodeLib = async(electronNodeAbi, platform, arch) => {
module.exports = async(context) => {
const { electronPlatformName, arch } = context
const electronNodeAbi = nodeAbi.getAbi(context.packager.info._framework.version, 'electron')
const electronVersion = context.packager?.info?._framework?.version ?? require('../package.json').devDependencies.electron.replace(/.*?(\d+)/, '$1')
const electronNodeAbi = nodeAbi.getAbi(electronVersion, 'electron')
await replaceQrcDecodeLib(electronNodeAbi, electronPlatformName, arch)
if (electronPlatformName !== 'linux' || process.env.FORCE) return
const bindingFilePath = path.join(__dirname, '../node_modules/better-sqlite3/binding.gyp')