mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/lyswhut/lx-music-desktop.git
synced 2026-09-20 08:04:00 +08:00
修复 win7 无法启动的问题
This commit is contained in:
3
.github/workflows/beta-pack.yml
vendored
3
.github/workflows/beta-pack.yml
vendored
@@ -132,8 +132,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Prepare win7 electron env
|
- name: Prepare win7 electron env
|
||||||
run: |
|
run: |
|
||||||
npm install electron@22
|
npm install electron@22 better-sqlite3@12
|
||||||
npm install better-sqlite3@12
|
|
||||||
pip.exe install setuptools
|
pip.exe install setuptools
|
||||||
|
|
||||||
- name: Build Package win7 Setup x64
|
- name: Build Package win7 Setup x64
|
||||||
|
|||||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -112,8 +112,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Prepare win7 electron env
|
- name: Prepare win7 electron env
|
||||||
run: |
|
run: |
|
||||||
npm install electron@22
|
npm install electron@22 better-sqlite3@12
|
||||||
npm install better-sqlite3@12
|
|
||||||
pip.exe install setuptools
|
pip.exe install setuptools
|
||||||
|
|
||||||
- name: Release win7 package
|
- name: Release win7 package
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ const archMap = {
|
|||||||
module.exports = async(context) => {
|
module.exports = async(context) => {
|
||||||
await beforePack()
|
await beforePack()
|
||||||
const { arch } = context
|
const { arch } = context
|
||||||
// const electronVersion = context.packager?.info?._framework?.version ?? require('../package.json').devDependencies.electron.replace(/^[^\d]*?(\d+)/, '$1')
|
const electronVersion = context.packager?.info?._framework?.version ?? require('../package.json').devDependencies.electron.replace(/^[^\d]*?(\d+)/, '$1')
|
||||||
await copyLib(archMap[arch])
|
await copyLib(archMap[arch], parseInt(electronVersion) == 22)
|
||||||
// const electronNodeAbi = nodeAbi.getAbi(electronVersion, 'electron')
|
// const electronNodeAbi = nodeAbi.getAbi(electronVersion, 'electron')
|
||||||
// if (electronPlatformName !== 'linux' || process.env.FORCE) return
|
// if (electronPlatformName !== 'linux' || process.env.FORCE) return
|
||||||
// // const bindingFilePath = path.join(__dirname, '../node_modules/better-sqlite3/binding.gyp')
|
// // const bindingFilePath = path.join(__dirname, '../node_modules/better-sqlite3/binding.gyp')
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ const replaceSqliteLib = async(arch) => {
|
|||||||
await fs.promises.unlink(targetPath).catch(_ => _)
|
await fs.promises.unlink(targetPath).catch(_ => _)
|
||||||
await fs.promises.copyFile(filePath, targetPath)
|
await fs.promises.copyFile(filePath, targetPath)
|
||||||
}
|
}
|
||||||
exports.copyLib = async(arch = process.arch) => {
|
exports.copyLib = async(arch = process.arch, replaceLocal = false) => {
|
||||||
if (process.platform === 'linux') {
|
if (process.platform === 'linux' || replaceLocal) {
|
||||||
await replaceSqliteLib(arch)
|
await replaceSqliteLib(arch)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
build-config/lib/better_sqlite3_win32-ia32.node
Normal file
BIN
build-config/lib/better_sqlite3_win32-ia32.node
Normal file
Binary file not shown.
BIN
build-config/lib/better_sqlite3_win32-x64.node
Normal file
BIN
build-config/lib/better_sqlite3_win32-x64.node
Normal file
Binary file not shown.
Reference in New Issue
Block a user