diff --git a/.github/workflows/beta-pack.yml b/.github/workflows/beta-pack.yml index a6b53df3..b03289b6 100644 --- a/.github/workflows/beta-pack.yml +++ b/.github/workflows/beta-pack.yml @@ -133,6 +133,7 @@ jobs: - name: Prepare win7 electron env run: | npm install electron@22 + npm install better-sqlite3@12 pip.exe install setuptools - name: Build Package win7 Setup x64 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca4909f0..d5ea34f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -113,6 +113,7 @@ jobs: - name: Prepare win7 electron env run: | npm install electron@22 + npm install better-sqlite3@12 pip.exe install setuptools - name: Release win7 package diff --git a/build-config/build-before-pack.js b/build-config/build-before-pack.js index 07ec23a3..357c91e4 100644 --- a/build-config/build-before-pack.js +++ b/build-config/build-before-pack.js @@ -33,8 +33,8 @@ const archMap = { module.exports = async(context) => { await beforePack() const { arch } = context - const electronVersion = context.packager?.info?._framework?.version ?? require('../package.json').devDependencies.electron.replace(/^[^\d]*?(\d+)/, '$1') - await copyLib(archMap[arch], parseInt(electronVersion) == 22) + // const electronVersion = context.packager?.info?._framework?.version ?? require('../package.json').devDependencies.electron.replace(/^[^\d]*?(\d+)/, '$1') + await copyLib(archMap[arch]) // const electronNodeAbi = nodeAbi.getAbi(electronVersion, 'electron') // if (electronPlatformName !== 'linux' || process.env.FORCE) return // // const bindingFilePath = path.join(__dirname, '../node_modules/better-sqlite3/binding.gyp') diff --git a/build-config/deps.js b/build-config/deps.js index 0b81c085..59e90463 100644 --- a/build-config/deps.js +++ b/build-config/deps.js @@ -40,8 +40,8 @@ const replaceSqliteLib = async(arch) => { await fs.promises.unlink(targetPath).catch(_ => _) await fs.promises.copyFile(filePath, targetPath) } -exports.copyLib = async(arch = process.arch, replaceLocal = false) => { - if (process.platform === 'linux' || replaceLocal) { +exports.copyLib = async(arch = process.arch) => { + if (process.platform === 'linux') { await replaceSqliteLib(arch) return } diff --git a/build-config/lib/better_sqlite3_win32-ia32.node b/build-config/lib/better_sqlite3_win32-ia32.node deleted file mode 100644 index f455dbdc..00000000 Binary files a/build-config/lib/better_sqlite3_win32-ia32.node and /dev/null differ diff --git a/build-config/lib/better_sqlite3_win32-x64.node b/build-config/lib/better_sqlite3_win32-x64.node deleted file mode 100644 index 8c1fe47f..00000000 Binary files a/build-config/lib/better_sqlite3_win32-x64.node and /dev/null differ