diff --git a/.github/workflows/beta-pack.yml b/.github/workflows/beta-pack.yml index a410fa46..05632f39 100644 --- a/.github/workflows/beta-pack.yml +++ b/.github/workflows/beta-pack.yml @@ -75,7 +75,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: lx-music-desktop-x64-Setup - path: build/* x64 Setup.exe + path: build/*-x64-Setup.exe - name: Build Package 7z x64 run: npm run pack:win:7z:x64 @@ -83,23 +83,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: lx-music-desktop-win_x64-green - path: build/*win_x64 green.7z - - - name: Build Package Setup x86 - run: npm run pack:win:setup:x86 - - name: Upload Artifact Setup x86 - uses: actions/upload-artifact@v3 - with: - name: lx-music-desktop-x86-Setup - path: build/* x86 Setup.exe - - - name: Build Package 7z x86 - run: npm run pack:win:7z:x86 - - name: Upload Artifact 7z x86 - uses: actions/upload-artifact@v3 - with: - name: lx-music-desktop-win_x86-green - path: build/*win_x86 green.7z + path: build/*win_x64-green.7z - name: Build Package Setup arm64 run: npm run pack:win:setup:arm64 @@ -107,7 +91,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: lx-music-desktop-arm64-Setup - path: build/* arm64 Setup.exe + path: build/*-arm64-Setup.exe - name: Build Package 7z arm64 run: npm run pack:win:7z:arm64 @@ -115,15 +99,27 @@ jobs: uses: actions/upload-artifact@v3 with: name: lx-music-desktop-win_arm64-green - path: build/*win_arm64 green.7z + path: build/*win_arm64-green.7z - - name: Build Package Setup x86_64 - run: npm run pack:win:setup:x86_64 - - name: Upload Artifact Setup x86_64 + + - name: Install old electron + run: npm install electron@22 + + - name: Build Package win7 7z x64 + run: npm run pack:win7:7z:x64 + - name: Upload Artifact win7 7z x64 uses: actions/upload-artifact@v3 with: - name: lx-music-desktop-x86_64-Setup - path: build/*x86_64 Setup.exe + name: lx-music-desktop-win7_x64-green + path: build/*win7_x64-green.7z + + - name: Build Package win7 7z x86 + run: npm run pack:win7:7z:x86 + - name: Upload Artifact win7 7z x86 + uses: actions/upload-artifact@v3 + with: + name: lx-music-desktop-win7_x86-green + path: build/*win7_x86-green.7z - name: Generate file MD5 run: | @@ -223,13 +219,13 @@ jobs: - name: Build src code run: npm run build - - name: Build Package deb x64 - run: npm run pack:linux:deb:x64 - - name: Upload Artifact deb x64 + - name: Build Package deb amd64 + run: npm run pack:linux:deb:amd64 + - name: Upload Artifact deb amd64 uses: actions/upload-artifact@v3 with: - name: lx-music-desktop-deb-x64 - path: build/* x64.deb + name: lx-music-desktop-deb-amd64 + path: build/*_amd64.deb - name: Build Package deb arm64 run: npm run pack:linux:deb:arm64 @@ -237,7 +233,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: lx-music-desktop-deb-arm64 - path: build/* arm64.deb + path: build/*_arm64.deb - name: Build Package deb armv7l run: npm run pack:linux:deb:armv7l @@ -245,7 +241,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: lx-music-desktop-deb-armv7l - path: build/* armv7l.deb + path: build/*_armv7l.deb - name: Build Package x64 appImage run: npm run pack:linux:appImage @@ -253,7 +249,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: lx-music-desktop-x64-appImage - path: build/* x64.AppImage + path: build/*_x64.AppImage - name: Build Package x64 rpm run: npm run pack:linux:rpm @@ -261,7 +257,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: lx-music-desktop-x64-rpm - path: build/* x64.rpm + path: build/*.x64.rpm - name: Build Package x64 pacman run: npm run pack:linux:pacman @@ -269,7 +265,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: lx-music-desktop-x64-pacman - path: build/* x64.pacman + path: build/*_x64.pacman - name: Generate file MD5 run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0fe1cb8..b5b944ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,13 +71,12 @@ jobs: - name: Release package run: | - npm run publish:win:setup:x64:always - npm run publish:win:7z:x64 - npm run publish:win:setup:x86 - npm run publish:win:7z:x86 + npm run publish:win:7z:x64:always npm run publish:win:setup:arm64 - npm run publish:win:7z:arm64 - npm run publish:win:setup:x86_64 + npm run publish:win:setup:x64 + npm install electron@22 + npm run publish:win7:7z:x64 + npm run publish:win7:7z:x86 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BT_TOKEN: ${{ secrets.BT_TOKEN }} @@ -171,7 +170,7 @@ jobs: - name: Release package run: | - npm run publish:linux:deb:x64:always + npm run publish:linux:deb:amd64:always npm run publish:linux:deb:arm64 npm run publish:linux:deb:armv7l npm run publish:linux:appImage diff --git a/build-config/build-before-pack.js b/build-config/build-before-pack.js index 3f12d156..e4276796 100644 --- a/build-config/build-before-pack.js +++ b/build-config/build-before-pack.js @@ -2,45 +2,47 @@ const fs = require('fs') const fsPromises = require('fs').promises const path = require('path') const { Arch } = require('electron-builder') +const nodeAbi = require('node-abi') const better_sqlite3_fileNameMap = { - [Arch.x64]: 'electron-v110-linux-x64', - [Arch.arm64]: 'electron-v110-linux-arm64', - [Arch.armv7l]: 'electron-v110-linux-arm', + [Arch.x64]: 'linux-x64', + [Arch.arm64]: 'linux-arm64', + [Arch.armv7l]: 'linux-arm', } const qrc_decode_fileNameMap = { win32: { - [Arch.x64]: 'electron-v110-win32-x64', - [Arch.ia32]: 'electron-v110-win32-ia32', - [Arch.arm64]: 'electron-v110-win32-arm64', + [Arch.x64]: 'win32-x64', + [Arch.ia32]: 'win32-ia32', + [Arch.arm64]: 'win32-arm64', }, linux: { - [Arch.x64]: 'electron-v110-linux-x64', - [Arch.arm64]: 'electron-v110-linux-arm64', - [Arch.armv7l]: 'electron-v110-linux-arm', + [Arch.x64]: 'linux-x64', + [Arch.arm64]: 'linux-arm64', + [Arch.armv7l]: 'linux-arm', }, darwin: { - [Arch.x64]: 'electron-v110-darwin-x64', - [Arch.arm64]: 'electron-v110-darwin-arm64', + [Arch.x64]: 'darwin-x64', + [Arch.arm64]: 'darwin-arm64', }, } -const replaceSqliteLib = async(arch) => { +const replaceSqliteLib = async(electronNodeAbi, arch) => { // console.log(await fs.readdir(path.join(context.appOutDir, './resources/'))) // if (context.electronPlatformName != 'linux' || context.arch != Arch.arm64) return // https://github.com/lyswhut/lx-music-desktop/issues/1102 // https://github.com/lyswhut/lx-music-desktop/issues/1161 console.log('replace sqlite lib...') - const filePath = path.join(__dirname, `./lib/better_sqlite3_${better_sqlite3_fileNameMap[arch]}.node`) + const filePath = path.join(__dirname, `./lib/better_sqlite3_electron-v${electronNodeAbi}-${better_sqlite3_fileNameMap[arch]}.node`) + console.log(filePath) const targetPath = path.join(__dirname, '../node_modules/better-sqlite3/build/Release/better_sqlite3.node') await fsPromises.unlink(targetPath).catch(_ => _) await fsPromises.copyFile(filePath, targetPath) } -const replaceQrcDecodeLib = async(platform, arch) => { - console.log('replace qrc_decode lib...', platform, qrc_decode_fileNameMap[platform][arch]) - const filePath = path.join(__dirname, `./lib/qrc_decode_${qrc_decode_fileNameMap[platform][arch]}.node`) +const replaceQrcDecodeLib = async(electronNodeAbi, platform, arch) => { + console.log('replace qrc_decode lib...', platform, electronNodeAbi, qrc_decode_fileNameMap[platform][arch]) + const filePath = path.join(__dirname, `./lib/qrc_decode_electron-v${electronNodeAbi}-${qrc_decode_fileNameMap[platform][arch]}.node`) const targetPath = path.join(__dirname, '../build/Release/qrc_decode.node') const targetDir = path.dirname(targetPath) if (fs.existsSync(targetDir)) await fsPromises.unlink(targetPath).catch(_ => _) @@ -51,7 +53,8 @@ const replaceQrcDecodeLib = async(platform, arch) => { module.exports = async(context) => { const { electronPlatformName, arch } = context - await replaceQrcDecodeLib(electronPlatformName, arch) + const electronNodeAbi = nodeAbi.getAbi(context.packager.info._framework.version, 'electron') + await replaceQrcDecodeLib(electronNodeAbi, electronPlatformName, arch) if (electronPlatformName !== 'linux' || process.env.FORCE) return const bindingFilePath = path.join(__dirname, '../node_modules/better-sqlite3/binding.gyp') const bindingBakFilePath = path.join(__dirname, '../node_modules/better-sqlite3/binding.gyp.bak') @@ -63,7 +66,7 @@ module.exports = async(context) => { // console.log('rename binding file...') await fsPromises.rename(bindingFilePath, bindingBakFilePath) } - await replaceSqliteLib(arch) + await replaceSqliteLib(electronNodeAbi, arch) break default: diff --git a/build-config/build-pack.js b/build-config/build-pack.js new file mode 100644 index 00000000..295850eb --- /dev/null +++ b/build-config/build-pack.js @@ -0,0 +1,297 @@ +/* eslint-disable no-template-curly-in-string */ + +const builder = require('electron-builder') +const beforePack = require('./build-before-pack') +const afterPack = require('./build-after-pack') + +/** +* @type {import('electron-builder').Configuration} +* @see https://www.electron.build/configuration/configuration +*/ +const options = { + appId: 'cn.toside.music.desktop', + beforePack, + afterPack, + protocols: { + name: 'lx-music-protocol', + schemes: [ + 'lxmusic', + ], + }, + directories: { + buildResources: './resources', + output: './build', + }, + files: [ + '!node_modules/**/*', + 'node_modules/font-list', + 'node_modules/better-sqlite3/lib', + 'node_modules/better-sqlite3/package.json', + 'node_modules/better-sqlite3/build/Release/better_sqlite3.node', + 'node_modules/electron-font-manager/index.js', + 'node_modules/electron-font-manager/package.json', + 'node_modules/electron-font-manager/build/Release/font_manager.node', + 'node_modules/node-gyp-build', + 'node_modules/bufferutil', + 'node_modules/utf-8-validate', + 'build/Release/qrc_decode.node', + 'dist/**/*', + ], + asar: { + smartUnpack: false, + }, + extraResources: [ + './licenses', + ], + publish: [ + { + provider: 'github', + owner: 'lyswhut', + repo: 'lx-music-desktop', + }, + ], +} +/** + * @type {import('electron-builder').Configuration} + * @see https://www.electron.build/configuration/configuration + */ +const winOptions = { + win: { + icon: './resources/icons/icon.ico', + legalTrademarks: 'lyswhut', + // artifactName: '${productName}-v${version}-${env.ARCH}-${env.TARGET}.${ext}', + }, + nsis: { + oneClick: false, + language: '2052', + allowToChangeInstallationDirectory: true, + differentialPackage: true, + license: './licenses/license.rtf', + shortcutName: 'LX Music', + }, +} +/** + * @type {import('electron-builder').Configuration} + * @see https://www.electron.build/configuration/configuration + */ +const linuxOptions = { + linux: { + maintainer: 'lyswhut ', + // artifactName: '${productName}-${version}.${env.ARCH}.${ext}', + icon: './resources/icons', + category: 'Utility;AudioVideo;Audio;Player;Music;', + desktop: { + Name: 'LX Music', + 'Name[zh_CN]': 'LX Music', + 'Name[zh_TW]': 'LX Music', + Encoding: 'UTF-8', + MimeType: 'x-scheme-handler/lxmusic', + StartupNotify: 'false', + }, + }, + appImage: { + license: './licenses/license_zh.txt', + category: 'Utility;AudioVideo;Audio;Player;Music;', + }, +} +/** + * @type {import('electron-builder').Configuration} + * @see https://www.electron.build/configuration/configuration + */ +const macOptions = { + mac: { + icon: './resources/icons/icon.icns', + category: 'public.app-category.music', + // artifactName: '${productName}-${version}.${ext}', + }, + dmg: { + window: { + width: 600, + height: 400, + }, + contents: [ + { + x: 106, + y: 252, + name: 'LX Music', + }, + { + x: 490, + y: 252, + type: 'link', + path: '/Applications', + }, + ], + title: '洛雪音乐助手 v${version}', + }, +} + +// win: { +// tagret: { +// setup: ['nsis', '${productName}-v${version}-${env.ARCH}-Setup.${ext}'], +// green: ['7z', '${productName}-v${version}-${env.ARCH}-green.${ext}'], +// portable: ['portable', '${productName}-v${version}-${env.ARCH}-portable.${ext}'], +// }, +// }, +// linux: { +// platform: Platform.WINDOWS, +// arch: { +// x64: builder.Arch.x64, +// arm64: builder.Arch.arm64, +// armv7l: builder.Arch.armv7l, +// }, +// tagret: { +// deb: ['deb', '${productName}_${version}_${env.ARCH}.${ext}'], +// appImage: ['AppImage', '${productName}_${version}_${env.ARCH}.${ext}'], +// pacman: ['pacman', '${productName}_${version}_${env.ARCH}.${ext}'], +// rpm: ['rpm', '${productName}-${version}.${env.ARCH}.${ext}'], +// }, +// }, +// mac: { +// arch: { +// x64: builder.Arch.x64, +// x86: builder.Arch.ia32, +// arm64: builder.Arch.arm64, +// }, +// tagret: { +// dmg: ['dmg', '${productName}-${version}-${env.ARCH}.${ext}'], +// }, +// }, + +const createTarget = { + /** + * + * @param {*} arch + * @param {*} packageType + * @returns {{ buildOptions: import('electron-builder').CliOptions, options: import('electron-builder').Configuration }} + */ + win(arch, packageType) { + switch (packageType) { + case 'setup': + winOptions.artifactName = `\${productName}-v\${version}-${arch}-Setup.\${ext}` + return { + buildOptions: { win: ['nsis'] }, + options: winOptions, + } + case 'green': + winOptions.artifactName = `\${productName}-v\${version}-win_${arch}-green.\${ext}` + return { + buildOptions: { win: ['7z'] }, + options: winOptions, + } + case 'win7_green': + winOptions.artifactName = `\${productName}-v\${version}-win7_${arch}-green.\${ext}` + return { + buildOptions: { win: ['7z'] }, + options: winOptions, + } + case 'portable': + winOptions.artifactName = `\${productName}-v\${version}-${arch}-portable.\${ext}` + return { + buildOptions: { win: ['portable'] }, + options: winOptions, + } + default: throw new Error('Unknown package type: ' + packageType) + } + }, + /** + * + * @param {*} arch + * @param {*} packageType + * @returns {{ buildOptions: import('electron-builder').CliOptions, options: import('electron-builder').Configuration }} + */ + linux(arch, packageType) { + switch (packageType) { + case 'deb': + linuxOptions.artifactName = `\${productName}_\${version}_${arch == 'x64' ? 'amd64' : arch}.\${ext}` + return { + buildOptions: { linux: ['deb'] }, + options: linuxOptions, + } + case 'appImage': + linuxOptions.artifactName = `\${productName}_\${version}_${arch}.\${ext}` + return { + buildOptions: { linux: ['AppImage'] }, + options: linuxOptions, + } + case 'pacman': + linuxOptions.artifactName = `\${productName}_\${version}_${arch}.\${ext}` + return { + buildOptions: { linux: ['pacman'] }, + options: linuxOptions, + } + case 'rpm': + linuxOptions.artifactName = `\${productName}-\${version}.${arch}.\${ext}` + return { + buildOptions: { linux: ['rpm'] }, + options: linuxOptions, + } + default: throw new Error('Unknown package type: ' + packageType) + } + }, + /** + * + * @param {*} arch + * @param {*} packageType + * @returns {{ buildOptions: import('electron-builder').CliOptions, options: import('electron-builder').Configuration }} + */ + mac(arch, packageType) { + switch (packageType) { + case 'dmg': + macOptions.artifactName = `\${productName}-\${version}-${arch}.\${ext}` + return { + buildOptions: { mac: ['dmg'] }, + options: macOptions, + } + default: throw new Error('Unknown package type: ' + packageType) + } + }, +} + +/** + * + * @param {'win' | 'mac' | 'linux' | 'dir'} target 构建目标平台 + * @param {'x86_64' | 'x64' | 'x86' | 'arm64' | 'armv7l'} arch 包架构 + * @param {*} packageType 包类型 + * @param {'onTagOrDraft' | 'always' | 'never'} publishType 发布类型 + */ +const build = async(target, arch, packageType, publishType) => { + if (target == 'dir') { + await builder.build({ + dir: true, + config: { ...options, ...winOptions, ...linuxOptions, ...macOptions }, + }) + return + } + const targetInfo = createTarget[target](arch, packageType) + // Promise is returned + await builder.build({ + ...targetInfo.buildOptions, + publish: publishType ?? 'never', + x64: arch == 'x64' || arch == 'x86_64', + ia32: arch == 'x86' || arch == 'x86_64', + arm64: arch == 'arm64', + armv7l: arch == 'armv7l', + config: { ...options, ...targetInfo.options }, + }) + // .then((result) => { + // console.log(JSON.stringify(result)) + // }) + // .catch((error) => { + // console.error(error) + // }) +} + +const params = {} + +for (const param of process.argv.slice(2)) { + const [name, value] = param.split('=') + params[name] = value +} + +if (params.target == null) throw new Error('Missing target') +if (params.target != 'dir' && params.arch == null) throw new Error('Missing arch') +if (params.target != 'dir' && params.type == null) throw new Error('Missing type') + +console.log(params.target, params.arch, params.type, params.publish ?? '') +build(params.target, params.arch, params.type, params.publish) diff --git a/build-config/lib-update.js b/build-config/lib-update.js new file mode 100644 index 00000000..f84bdb73 --- /dev/null +++ b/build-config/lib-update.js @@ -0,0 +1,53 @@ +const fs = require('fs') +const path = require('path') +const tar = require('tar') + +const libDir = path.join(__dirname, 'lib') + +const getGzipFiles = async() => { + const names = await fs.promises.readdir(libDir) + for (const name of names) { + if (name.endsWith('.node')) await fs.promises.unlink(path.join(libDir, name)) + } + return names.filter(name => name.endsWith('.gz')) +} + +const unzip = async(filePath) => { + const targetDir = filePath.replace('.tar.gz', '') + if (fs.existsSync(targetDir)) await fs.promises.rm(targetDir, { recursive: true }) + await fs.promises.mkdir(targetDir) + await tar.x({ + file: filePath, + strip: 1, + C: targetDir, + }) + return targetDir +} + +const files = [ + 'qrc_decode', + 'better_sqlite3', +] +const moveFile = async(filePath) => { + const name = 'electron-' + path.basename(filePath).split('-electron-')[1] + for (const fileName of files) { + if (fileName == 'better_sqlite3' && !name.includes('linux')) continue + const targetPath = path.join(libDir, `${fileName}_${name}.node`) + if (fs.existsSync(targetPath)) await fs.promises.unlink(targetPath) + await fs.promises.rename(path.join(filePath, 'Release', fileName + '.node'), targetPath) + } + await fs.promises.rm(filePath, { recursive: true }) +} + +const run = async() => { + const files = await getGzipFiles() + for (const name of files) { + await moveFile(await unzip(path.join(libDir, name))) + } + for (const name of files) { + await fs.promises.unlink(path.join(libDir, name)) + } +} + +run() + diff --git a/build-config/lib/better_sqlite3_electron-v110-linux-arm.node b/build-config/lib/better_sqlite3_electron-v116-linux-arm.node similarity index 82% rename from build-config/lib/better_sqlite3_electron-v110-linux-arm.node rename to build-config/lib/better_sqlite3_electron-v116-linux-arm.node index 153998ae..a86c77a2 100644 Binary files a/build-config/lib/better_sqlite3_electron-v110-linux-arm.node and b/build-config/lib/better_sqlite3_electron-v116-linux-arm.node differ diff --git a/build-config/lib/better_sqlite3_electron-v110-linux-arm64.node b/build-config/lib/better_sqlite3_electron-v116-linux-arm64.node similarity index 73% rename from build-config/lib/better_sqlite3_electron-v110-linux-arm64.node rename to build-config/lib/better_sqlite3_electron-v116-linux-arm64.node index 987701dd..661843f3 100644 Binary files a/build-config/lib/better_sqlite3_electron-v110-linux-arm64.node and b/build-config/lib/better_sqlite3_electron-v116-linux-arm64.node differ diff --git a/build-config/lib/better_sqlite3_electron-v110-linux-x64.node b/build-config/lib/better_sqlite3_electron-v116-linux-x64.node similarity index 70% rename from build-config/lib/better_sqlite3_electron-v110-linux-x64.node rename to build-config/lib/better_sqlite3_electron-v116-linux-x64.node index 9288a71a..1844c2a5 100644 Binary files a/build-config/lib/better_sqlite3_electron-v110-linux-x64.node and b/build-config/lib/better_sqlite3_electron-v116-linux-x64.node differ diff --git a/build-config/lib/qrc_decode_electron-v110-win32-arm64.node b/build-config/lib/qrc_decode_electron-v110-win32-arm64.node index 323d0931..5f0e1b68 100644 Binary files a/build-config/lib/qrc_decode_electron-v110-win32-arm64.node and b/build-config/lib/qrc_decode_electron-v110-win32-arm64.node differ diff --git a/build-config/lib/qrc_decode_electron-v110-win32-ia32.node b/build-config/lib/qrc_decode_electron-v110-win32-ia32.node index 759f6bae..62fd013a 100644 Binary files a/build-config/lib/qrc_decode_electron-v110-win32-ia32.node and b/build-config/lib/qrc_decode_electron-v110-win32-ia32.node differ diff --git a/build-config/lib/qrc_decode_electron-v110-win32-x64.node b/build-config/lib/qrc_decode_electron-v110-win32-x64.node index a5dc65e1..a4c9c89b 100644 Binary files a/build-config/lib/qrc_decode_electron-v110-win32-x64.node and b/build-config/lib/qrc_decode_electron-v110-win32-x64.node differ diff --git a/build-config/lib/qrc_decode_electron-v110-darwin-arm64.node b/build-config/lib/qrc_decode_electron-v116-darwin-arm64.node similarity index 93% rename from build-config/lib/qrc_decode_electron-v110-darwin-arm64.node rename to build-config/lib/qrc_decode_electron-v116-darwin-arm64.node index cdeee73f..b1d84097 100644 Binary files a/build-config/lib/qrc_decode_electron-v110-darwin-arm64.node and b/build-config/lib/qrc_decode_electron-v116-darwin-arm64.node differ diff --git a/build-config/lib/qrc_decode_electron-v110-darwin-x64.node b/build-config/lib/qrc_decode_electron-v116-darwin-x64.node similarity index 55% rename from build-config/lib/qrc_decode_electron-v110-darwin-x64.node rename to build-config/lib/qrc_decode_electron-v116-darwin-x64.node index 5d95a598..e4cd266e 100644 Binary files a/build-config/lib/qrc_decode_electron-v110-darwin-x64.node and b/build-config/lib/qrc_decode_electron-v116-darwin-x64.node differ diff --git a/build-config/lib/qrc_decode_electron-v110-linux-arm.node b/build-config/lib/qrc_decode_electron-v116-linux-arm.node similarity index 89% rename from build-config/lib/qrc_decode_electron-v110-linux-arm.node rename to build-config/lib/qrc_decode_electron-v116-linux-arm.node index fd909d5f..74c5d9e4 100644 Binary files a/build-config/lib/qrc_decode_electron-v110-linux-arm.node and b/build-config/lib/qrc_decode_electron-v116-linux-arm.node differ diff --git a/build-config/lib/qrc_decode_electron-v110-linux-arm64.node b/build-config/lib/qrc_decode_electron-v116-linux-arm64.node similarity index 83% rename from build-config/lib/qrc_decode_electron-v110-linux-arm64.node rename to build-config/lib/qrc_decode_electron-v116-linux-arm64.node index 9d99d374..125cdcf0 100644 Binary files a/build-config/lib/qrc_decode_electron-v110-linux-arm64.node and b/build-config/lib/qrc_decode_electron-v116-linux-arm64.node differ diff --git a/build-config/lib/qrc_decode_electron-v110-linux-x64.node b/build-config/lib/qrc_decode_electron-v116-linux-x64.node similarity index 95% rename from build-config/lib/qrc_decode_electron-v110-linux-x64.node rename to build-config/lib/qrc_decode_electron-v116-linux-x64.node index d64929c7..c96415f3 100644 Binary files a/build-config/lib/qrc_decode_electron-v110-linux-x64.node and b/build-config/lib/qrc_decode_electron-v116-linux-x64.node differ diff --git a/build-config/lib/qrc_decode_electron-v116-win32-arm64.node b/build-config/lib/qrc_decode_electron-v116-win32-arm64.node new file mode 100644 index 00000000..8f825101 Binary files /dev/null and b/build-config/lib/qrc_decode_electron-v116-win32-arm64.node differ diff --git a/build-config/lib/qrc_decode_electron-v116-win32-ia32.node b/build-config/lib/qrc_decode_electron-v116-win32-ia32.node new file mode 100644 index 00000000..6f255245 Binary files /dev/null and b/build-config/lib/qrc_decode_electron-v116-win32-ia32.node differ diff --git a/build-config/lib/qrc_decode_electron-v116-win32-x64.node b/build-config/lib/qrc_decode_electron-v116-win32-x64.node new file mode 100644 index 00000000..31e4b55f Binary files /dev/null and b/build-config/lib/qrc_decode_electron-v116-win32-x64.node differ diff --git a/package-lock.json b/package-lock.json index 5004332e..e9bc1c0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,12 +60,12 @@ "css-loader": "^6.8.1", "css-minimizer-webpack-plugin": "^5.0.1", "del": "^6.1.1", - "electron": "^22.3.24", - "electron-builder": "^24.6.4", + "electron": "^25.8.1", + "electron-builder": "^24.6.5", "electron-debug": "^3.2.0", "electron-devtools-installer": "^3.2.0", "electron-to-chromium": "^1.4.523", - "electron-updater": "^6.1.4", + "electron-updater": "^6.1.5", "eslint": "^8.49.0", "eslint-config-standard": "^17.1.0", "eslint-config-standard-with-typescript": "^39.0.0", @@ -79,7 +79,7 @@ "less-loader": "^11.1.3", "mini-css-extract-plugin": "^2.7.6", "node-loader": "^2.0.0", - "postcss": "^8.4.29", + "postcss": "^8.4.30", "postcss-loader": "^7.3.3", "postcss-pxtorem": "^6.0.0", "pug": "^3.0.2", @@ -2070,12 +2070,11 @@ } }, "node_modules/@electron/asar": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.4.tgz", - "integrity": "sha512-lykfY3TJRRWFeTxccEKdf1I6BLl2Plw81H0bbp4Fc5iEc67foDCa5pjJQULVgo0wF+Dli75f3xVcdb/67FFZ/g==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.5.tgz", + "integrity": "sha512-Ypahc2ElTj9YOrFvUHuoXv5Z/V1nPA5enlhmQapc578m/HZBHKTbqhoL5JZQjje2+/6Ti5AHh7Gj1/haeJa63Q==", "dev": true, "dependencies": { - "chromium-pickle-js": "^0.2.0", "commander": "^5.0.0", "glob": "^7.1.6", "minimatch": "^3.0.4" @@ -4120,9 +4119,9 @@ "dev": true }, "node_modules/app-builder-lib": { - "version": "24.6.4", - "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-24.6.4.tgz", - "integrity": "sha512-m9931WXb83teb32N0rKg+ulbn6+Hl8NV5SUpVDOVz9MWOXfhV6AQtTdftf51zJJvCQnQugGtSqoLvgw6mdF/Rg==", + "version": "24.6.5", + "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-24.6.5.tgz", + "integrity": "sha512-nNdbC21fyOhg/xFcuF3FLuQqtNJQ0SlO1+Ia/QSGzjrpJQ+KSUfZXf56Jydtc/TAua5svD677+Ult+MXuoRxHQ==", "dev": true, "dependencies": { "@develar/schema-utils": "~2.6.5", @@ -6587,12 +6586,12 @@ } }, "node_modules/dmg-builder": { - "version": "24.6.4", - "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-24.6.4.tgz", - "integrity": "sha512-BNcHRc9CWEuI9qt0E655bUBU/j/3wUCYBVKGu1kVpbN5lcUdEJJJeiO0NHK3dgKmra6LUUZlo+mWqc+OCbi0zw==", + "version": "24.6.5", + "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-24.6.5.tgz", + "integrity": "sha512-T4fS4iwqPIXIQovhyOx7bLiH8rw/QslOyVeNA0jlW/Qy33HZfXDhomPeK/7fpBVOuV/UVSKFkEodBCBavIOKqg==", "dev": true, "dependencies": { - "app-builder-lib": "24.6.4", + "app-builder-lib": "24.6.5", "builder-util": "24.5.0", "builder-util-runtime": "9.2.1", "fs-extra": "^10.1.0", @@ -6837,14 +6836,14 @@ } }, "node_modules/electron": { - "version": "22.3.24", - "resolved": "https://registry.npmjs.org/electron/-/electron-22.3.24.tgz", - "integrity": "sha512-wnGsShoRVk1Jmgr7h/jZK9bI5UwMF88sdQ5c8z2j2N8B9elhF/jKDFjwDXUrY1Y0xzAskOP0tYIDE+UbUM4byQ==", + "version": "25.8.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-25.8.1.tgz", + "integrity": "sha512-GtcP1nMrROZfFg0+mhyj1hamrHvukfF6of2B/pcWxmWkd5FVY1NJib0tlhiorFZRzQN5Z+APLPr7aMolt7i2AQ==", "dev": true, "hasInstallScript": true, "dependencies": { "@electron/get": "^2.0.0", - "@types/node": "^16.11.26", + "@types/node": "^18.11.18", "extract-zip": "^2.0.1" }, "bin": { @@ -6855,16 +6854,16 @@ } }, "node_modules/electron-builder": { - "version": "24.6.4", - "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-24.6.4.tgz", - "integrity": "sha512-uNWQoU7pE7qOaIQ6CJHpBi44RJFVG8OHRBIadUxrsDJVwLLo8Nma3K/EEtx5/UyWAQYdcK4nVPYKoRqBb20hbA==", + "version": "24.6.5", + "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-24.6.5.tgz", + "integrity": "sha512-O3dkOwo/cqafRkBlrjsPqB9ms1u/hTEoxwI7x+VEnkvywNmHxK2BYbOMWxgJQRkcmjKiArizRIvckbt9H0NVvA==", "dev": true, "dependencies": { - "app-builder-lib": "24.6.4", + "app-builder-lib": "24.6.5", "builder-util": "24.5.0", "builder-util-runtime": "9.2.1", "chalk": "^4.1.2", - "dmg-builder": "24.6.4", + "dmg-builder": "24.6.5", "fs-extra": "^10.1.0", "is-ci": "^3.0.0", "lazy-val": "^1.0.5", @@ -7072,9 +7071,9 @@ "dev": true }, "node_modules/electron-updater": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-6.1.4.tgz", - "integrity": "sha512-yYAJc6RQjjV4WtInZVn+ZcLyXRhbVXoomKEfUUwDqIk5s2wxzLhWaor7lrNgxODyODhipjg4SVPMhJHi5EnsCA==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-6.1.5.tgz", + "integrity": "sha512-RFoncoSbAWYN3CVOFFrEUB5O2V81REAnA4IXQ8enGTSbUjjv+z54TYp23y/3e63oiV3W8grhblJmn9oyH/LnVg==", "dev": true, "dependencies": { "builder-util-runtime": "9.2.1", @@ -7122,12 +7121,6 @@ "node": ">= 10.0.0" } }, - "node_modules/electron/node_modules/@types/node": { - "version": "16.18.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.11.tgz", - "integrity": "sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==", - "dev": true - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -12155,9 +12148,9 @@ } }, "node_modules/postcss": { - "version": "8.4.29", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz", - "integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==", + "version": "8.4.30", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.30.tgz", + "integrity": "sha512-7ZEao1g4kd68l97aWG/etQKPKq07us0ieSZ2TnFDk11i0ZfDW2AwKHYU8qv4MZKqN2fdBfg+7q0ES06UA73C1g==", "funding": [ { "type": "opencollective", @@ -15899,9 +15892,9 @@ } }, "node_modules/tar": { - "version": "6.1.15", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz", - "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", + "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", "dev": true, "dependencies": { "chownr": "^2.0.0", @@ -19017,12 +19010,11 @@ "dev": true }, "@electron/asar": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.4.tgz", - "integrity": "sha512-lykfY3TJRRWFeTxccEKdf1I6BLl2Plw81H0bbp4Fc5iEc67foDCa5pjJQULVgo0wF+Dli75f3xVcdb/67FFZ/g==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.5.tgz", + "integrity": "sha512-Ypahc2ElTj9YOrFvUHuoXv5Z/V1nPA5enlhmQapc578m/HZBHKTbqhoL5JZQjje2+/6Ti5AHh7Gj1/haeJa63Q==", "dev": true, "requires": { - "chromium-pickle-js": "^0.2.0", "commander": "^5.0.0", "glob": "^7.1.6", "minimatch": "latest" @@ -20677,9 +20669,9 @@ "dev": true }, "app-builder-lib": { - "version": "24.6.4", - "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-24.6.4.tgz", - "integrity": "sha512-m9931WXb83teb32N0rKg+ulbn6+Hl8NV5SUpVDOVz9MWOXfhV6AQtTdftf51zJJvCQnQugGtSqoLvgw6mdF/Rg==", + "version": "24.6.5", + "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-24.6.5.tgz", + "integrity": "sha512-nNdbC21fyOhg/xFcuF3FLuQqtNJQ0SlO1+Ia/QSGzjrpJQ+KSUfZXf56Jydtc/TAua5svD677+Ult+MXuoRxHQ==", "dev": true, "requires": { "@develar/schema-utils": "~2.6.5", @@ -22516,12 +22508,12 @@ } }, "dmg-builder": { - "version": "24.6.4", - "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-24.6.4.tgz", - "integrity": "sha512-BNcHRc9CWEuI9qt0E655bUBU/j/3wUCYBVKGu1kVpbN5lcUdEJJJeiO0NHK3dgKmra6LUUZlo+mWqc+OCbi0zw==", + "version": "24.6.5", + "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-24.6.5.tgz", + "integrity": "sha512-T4fS4iwqPIXIQovhyOx7bLiH8rw/QslOyVeNA0jlW/Qy33HZfXDhomPeK/7fpBVOuV/UVSKFkEodBCBavIOKqg==", "dev": true, "requires": { - "app-builder-lib": "24.6.4", + "app-builder-lib": "24.6.5", "builder-util": "24.5.0", "builder-util-runtime": "9.2.1", "dmg-license": "^1.0.11", @@ -22710,35 +22702,27 @@ } }, "electron": { - "version": "22.3.24", - "resolved": "https://registry.npmjs.org/electron/-/electron-22.3.24.tgz", - "integrity": "sha512-wnGsShoRVk1Jmgr7h/jZK9bI5UwMF88sdQ5c8z2j2N8B9elhF/jKDFjwDXUrY1Y0xzAskOP0tYIDE+UbUM4byQ==", + "version": "25.8.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-25.8.1.tgz", + "integrity": "sha512-GtcP1nMrROZfFg0+mhyj1hamrHvukfF6of2B/pcWxmWkd5FVY1NJib0tlhiorFZRzQN5Z+APLPr7aMolt7i2AQ==", "dev": true, "requires": { "@electron/get": "^2.0.0", - "@types/node": "^16.11.26", + "@types/node": "^18.11.18", "extract-zip": "^2.0.1" - }, - "dependencies": { - "@types/node": { - "version": "16.18.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.11.tgz", - "integrity": "sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==", - "dev": true - } } }, "electron-builder": { - "version": "24.6.4", - "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-24.6.4.tgz", - "integrity": "sha512-uNWQoU7pE7qOaIQ6CJHpBi44RJFVG8OHRBIadUxrsDJVwLLo8Nma3K/EEtx5/UyWAQYdcK4nVPYKoRqBb20hbA==", + "version": "24.6.5", + "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-24.6.5.tgz", + "integrity": "sha512-O3dkOwo/cqafRkBlrjsPqB9ms1u/hTEoxwI7x+VEnkvywNmHxK2BYbOMWxgJQRkcmjKiArizRIvckbt9H0NVvA==", "dev": true, "requires": { - "app-builder-lib": "24.6.4", + "app-builder-lib": "24.6.5", "builder-util": "24.5.0", "builder-util-runtime": "9.2.1", "chalk": "^4.1.2", - "dmg-builder": "24.6.4", + "dmg-builder": "24.6.5", "fs-extra": "^10.1.0", "is-ci": "^3.0.0", "lazy-val": "^1.0.5", @@ -22913,9 +22897,9 @@ "dev": true }, "electron-updater": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-6.1.4.tgz", - "integrity": "sha512-yYAJc6RQjjV4WtInZVn+ZcLyXRhbVXoomKEfUUwDqIk5s2wxzLhWaor7lrNgxODyODhipjg4SVPMhJHi5EnsCA==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-6.1.5.tgz", + "integrity": "sha512-RFoncoSbAWYN3CVOFFrEUB5O2V81REAnA4IXQ8enGTSbUjjv+z54TYp23y/3e63oiV3W8grhblJmn9oyH/LnVg==", "dev": true, "requires": { "builder-util-runtime": "9.2.1", @@ -26714,9 +26698,9 @@ "dev": true }, "postcss": { - "version": "8.4.29", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz", - "integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==", + "version": "8.4.30", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.30.tgz", + "integrity": "sha512-7ZEao1g4kd68l97aWG/etQKPKq07us0ieSZ2TnFDk11i0ZfDW2AwKHYU8qv4MZKqN2fdBfg+7q0ES06UA73C1g==", "requires": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", @@ -29607,9 +29591,9 @@ "dev": true }, "tar": { - "version": "6.1.15", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz", - "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", + "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", "dev": true, "requires": { "chownr": "^2.0.0", diff --git a/package.json b/package.json index 3af2653e..7128bdd9 100644 --- a/package.json +++ b/package.json @@ -7,53 +7,54 @@ "scripts": { "pack": "node build-config/pack.js && npm run pack:win:setup:x64", "pack:win": "node build-config/pack.js && npm run pack:win:setup:x64 && npm run pack:win:setup:x86 && npm run pack:win:setup:arm64 && npm run pack:win:setup:x86_64 && npm run pack:win:7z", - "pack:win:setup:x86_64": "cross-env TARGET=Setup ARCH=x86_64 electron-builder -w=nsis --x64 --ia32 -p never", - "pack:win:setup:x64": "cross-env TARGET=Setup ARCH=x64 electron-builder -w=nsis --x64 -p never", - "pack:win:setup:x86": "cross-env TARGET=Setup ARCH=x86 electron-builder -w=nsis --ia32 -p never", - "pack:win:setup:arm64": "cross-env TARGET=Setup ARCH=arm64 electron-builder -w=nsis --arm64 -p never", + "pack:win:setup:x86_64": "node build-config/build-pack.js target=win arch=x86_64 type=setup", + "pack:win:setup:x64": "node build-config/build-pack.js target=win arch=x64 type=setup", + "pack:win:setup:x86": "node build-config/build-pack.js target=win arch=x86 type=setup", + "pack:win:setup:arm64": "node build-config/build-pack.js target=win arch=arm64 type=setup", "pack:win:portable": "npm run pack:win:portable:x86_64 && npm run pack:win:portable:x64 && npm run pack:win:portable:x86", - "pack:win:portable:x86_64": "cross-env TARGET=portable ARCH=x86_64 electron-builder -w=portable --x64 --ia32 -p never", - "pack:win:portable:x64": "cross-env TARGET=portable ARCH=x64 electron-builder -w=portable --x64 -p never", - "pack:win:portable:x86": "cross-env TARGET=portable ARCH=x86 electron-builder -w=portable --ia32 -p never", - "pack:win:7z": "npm run pack:win:7z:x64 && npm run pack:win:7z:x86", - "pack:win:7z:x64": "cross-env TARGET=green ARCH=win_x64 electron-builder -w=7z --x64 -p never", - "pack:win:7z:x86": "cross-env TARGET=green ARCH=win_x86 electron-builder -w=7z --ia32 -p never", - "pack:win:7z:arm64": "cross-env TARGET=green ARCH=win_arm64 electron-builder -w=7z --arm64 -p never", + "pack:win:portable:x86_64": "node build-config/build-pack.js target=win arch=x86_64 type=portable", + "pack:win:portable:x64": "node build-config/build-pack.js target=win arch=x64 type=portable", + "pack:win:portable:x86": "node build-config/build-pack.js target=win arch=x86 type=portable", + "pack:win:7z": "npm run pack:win:7z:x64", + "pack:win:7z:x64": "node build-config/build-pack.js target=win arch=x64 type=green", + "pack:win:7z:arm64": "node build-config/build-pack.js target=win arch=arm64 type=green", + "pack:win7:7z:x64": "node build-config/build-pack.js target=win arch=x64 type=win7_green", + "pack:win7:7z:x86": "node build-config/build-pack.js target=win arch=x86 type=win7_green", "pack:linux": "node build-config/pack.js && npm run pack:linux:deb && npm run pack:linux:appImage && npm run pack:linux:rpm && npm run pack:linux:pacman", - "pack:linux:appImage": "cross-env ARCH=x64 electron-builder -l=AppImage -p never", - "pack:linux:deb": "npm run pack:linux:deb:x64 && npm run pack:linux:deb:arm64 && npm run pack:linux:deb:armv7l", - "pack:linux:deb:x64": "cross-env ARCH=x64 electron-builder -l=deb --x64 -p never", - "pack:linux:deb:arm64": "cross-env ARCH=arm64 electron-builder -l=deb --arm64 -p never", - "pack:linux:deb:armv7l": "cross-env ARCH=armv7l electron-builder -l=deb --armv7l -p never", - "pack:linux:rpm": "cross-env ARCH=x64 electron-builder -l=rpm --x64 -p never", - "pack:linux:pacman": "cross-env ARCH=x64 electron-builder -l=pacman --x64 -p never", + "pack:linux:appImage": "node build-config/build-pack.js target=linux arch=x64 type=appImage", + "pack:linux:deb": "npm run pack:linux:deb:amd64 && npm run pack:linux:deb:arm64 && npm run pack:linux:deb:armv7l", + "pack:linux:deb:amd64": "node build-config/build-pack.js target=linux arch=x64 type=deb", + "pack:linux:deb:arm64": "node build-config/build-pack.js target=linux arch=arm64 type=deb", + "pack:linux:deb:armv7l": "node build-config/build-pack.js target=linux arch=armv7l type=deb", + "pack:linux:rpm": "node build-config/build-pack.js target=linux arch=x64 type=rpm", + "pack:linux:pacman": "node build-config/build-pack.js target=linux arch=x64 type=pacman", "pack:mac": "node build-config/pack.js && npm run pack:mac:dmg && npm run pack:mac:dmg:arm64", - "pack:mac:dmg": "cross-env electron-builder -m=dmg -p never", - "pack:mac:dmg:arm64": "cross-env electron-builder -m=dmg --arm64 -p never", - "pack:dir": "node build-config/pack.js && electron-builder --dir", + "pack:mac:dmg": "node build-config/build-pack.js target=mac arch=x64 type=dmg", + "pack:mac:dmg:arm64": "node build-config/build-pack.js target=mac arch=arm64 type=dmg", + "pack:dir": "node build-config/pack.js && node build-config/build-pack.js target=dir", "publish": "node publish", - "publish:win:setup:x64:always": "cross-env TARGET=Setup ARCH=x64 electron-builder -w=nsis --x64 -p always", - "publish:win:setup:x64": "cross-env TARGET=Setup ARCH=x64 electron-builder -w=nsis --x64 -p always", - "publish:win:setup:x86": "cross-env TARGET=Setup ARCH=x86 electron-builder -w=nsis --ia32 -p onTagOrDraft", - "publish:win:setup:arm64": "cross-env TARGET=Setup ARCH=arm64 electron-builder -w=nsis --arm64 -p onTagOrDraft", - "publish:win:setup:x86_64": "cross-env TARGET=Setup ARCH=x86_64 electron-builder -w=nsis --x64 --ia32 -p onTagOrDraft", + "publish:win:setup:x64": "node build-config/build-pack.js target=win arch=x64 type=setup publish=onTagOrDraft", + "publish:win:setup:x86": "node build-config/build-pack.js target=win arch=x86 type=setup publish=onTagOrDraft", + "publish:win:setup:arm64": "node build-config/build-pack.js target=win arch=arm64 type=setup publish=onTagOrDraft", + "publish:win:setup:x86_64": "node build-config/build-pack.js target=win arch=x86_64 type=setup publish=onTagOrDraft", "publish:win:portable": "npm run publish:win:portable:x86_64 && npm run publish:win:portable:x64 && npm run publish:win:portable:x86", - "publish:win:portable:x86_64": "cross-env TARGET=portable ARCH=x86_64 electron-builder -w=portable --x64 --ia32 -p onTagOrDraft", - "publish:win:portable:x64": "cross-env TARGET=portable ARCH=x64 electron-builder -w=portable --x64 -p onTagOrDraft", - "publish:win:portable:x86": "cross-env TARGET=portable ARCH=x86 electron-builder -w=portable --ia32 -p onTagOrDraft", - "publish:win:7z:x64": "cross-env TARGET=green ARCH=win_x64 electron-builder -w=7z --x64 -p onTagOrDraft", - "publish:win:7z:x86": "cross-env TARGET=green ARCH=win_x86 electron-builder -w=7z --ia32 -p onTagOrDraft", - "publish:win:7z:arm64": "cross-env TARGET=green ARCH=win_arm64 electron-builder -w=7z --arm64 -p onTagOrDraft", - "publish:mac:dmg:always": "electron-builder -m=dmg -p always", - "publish:mac:dmg": "electron-builder -m=dmg -p onTagOrDraft", - "publish:mac:dmg:arm64": "electron-builder -m=dmg --arm64 -p onTagOrDraft", - "publish:linux:deb:x64:always": "cross-env ARCH=x64 electron-builder -l=deb --x64 -p always", - "publish:linux:deb:x64": "cross-env ARCH=x64 electron-builder -l=deb --x64 -p onTagOrDraft", - "publish:linux:deb:arm64": "cross-env ARCH=arm64 electron-builder -l=deb --arm64 -p onTagOrDraft", - "publish:linux:deb:armv7l": "cross-env ARCH=armv7l electron-builder -l=deb --armv7l -p onTagOrDraft", - "publish:linux:appImage": "cross-env ARCH=x64 electron-builder -l=AppImage -p onTagOrDraft", - "publish:linux:rpm": "cross-env ARCH=x64 electron-builder -l=rpm --x64 -p onTagOrDraft", - "publish:linux:pacman": "cross-env ARCH=x64 electron-builder -l=pacman --x64 -p onTagOrDraft", + "publish:win:portable:x86_64": "node build-config/build-pack.js target=win arch=x86_64 type=portable publish=onTagOrDraft", + "publish:win:portable:x64": "node build-config/build-pack.js target=win arch=x64 type=portable publish=onTagOrDraft", + "publish:win:portable:x86": "node build-config/build-pack.js target=win arch=x86 type=portable publish=onTagOrDraft", + "publish:win:7z:x64:always": "node build-config/build-pack.js target=win arch=x64 type=green publish=always", + "publish:win:7z:arm64": "node build-config/build-pack.js target=win arch=arm64 type=green publish=onTagOrDraft", + "publish:win7:7z:x64": "node build-config/build-pack.js target=win arch=x64 type=win7_green publish=onTagOrDraft", + "publish:win7:7z:x86": "node build-config/build-pack.js target=win arch=x86 type=win7_green publish=onTagOrDraft", + "publish:mac:dmg:always": "node build-config/build-pack.js target=mac arch=x64 type=dmg publish=always", + "publish:mac:dmg": "node build-config/build-pack.js target=mac arch=x64 type=dmg publish=onTagOrDraft", + "publish:mac:dmg:arm64": "node build-config/build-pack.js target=mac arch=arm64 type=dmg publish=onTagOrDraft", + "publish:linux:deb:amd64:always": "node build-config/build-pack.js target=linux arch=x64 type=deb publish=always", + "publish:linux:deb:amd64": "node build-config/build-pack.js target=linux arch=x64 type=deb publish=onTagOrDraft", + "publish:linux:deb:arm64": "node build-config/build-pack.js target=linux arch=arm64 type=deb publish=onTagOrDraft", + "publish:linux:deb:armv7l": "node build-config/build-pack.js target=linux arch=armv7l type=deb publish=onTagOrDraft", + "publish:linux:appImage": "node build-config/build-pack.js target=linux arch=x64 type=appImage publish=onTagOrDraft", + "publish:linux:rpm": "node build-config/build-pack.js target=linux arch=x64 type=rpm publish=onTagOrDraft", + "publish:linux:pacman": "node build-config/build-pack.js target=linux arch=x64 type=pacman publish=onTagOrDraft", "dev": "cross-env NODE_OPTIONS=--max-http-header-size=200000 node build-config/runner-dev.js", "build:theme": "node src/common/theme/createThemes.js", "build": "node build-config/pack.js", @@ -74,104 +75,6 @@ "node": ">= 16", "npm": ">=8.5.2" }, - "build": { - "appId": "cn.toside.music.desktop", - "beforePack": "./build-config/build-before-pack.js", - "afterPack": "./build-config/build-after-pack.js", - "protocols": { - "name": "lx-music-protocol", - "schemes": [ - "lxmusic" - ] - }, - "directories": { - "buildResources": "./resources", - "output": "./build" - }, - "files": [ - "!node_modules/**/*", - "node_modules/font-list", - "node_modules/better-sqlite3/lib", - "node_modules/better-sqlite3/package.json", - "node_modules/better-sqlite3/build/Release/better_sqlite3.node", - "node_modules/electron-font-manager/index.js", - "node_modules/electron-font-manager/package.json", - "node_modules/electron-font-manager/build/Release/font_manager.node", - "node_modules/node-gyp-build", - "node_modules/bufferutil", - "node_modules/utf-8-validate", - "build/Release/qrc_decode.node", - "dist/**/*" - ], - "asar": { - "smartUnpack": false - }, - "extraResources": [ - "./licenses" - ], - "win": { - "icon": "./resources/icons/icon.ico", - "legalTrademarks": "lyswhut", - "artifactName": "${productName} v${version} ${env.ARCH} ${env.TARGET}.${ext}" - }, - "mac": { - "icon": "./resources/icons/icon.icns", - "category": "public.app-category.music" - }, - "linux": { - "maintainer": "lyswhut ", - "artifactName": "${productName} v${version} ${env.ARCH}.${ext}", - "icon": "./resources/icons", - "category": "Utility;AudioVideo;Audio;Player;Music;", - "desktop": { - "Name": "LX Music", - "Name[zh_CN]": "LX Music", - "Name[zh_TW]": "LX Music", - "Encoding": "UTF-8", - "MimeType": "x-scheme-handler/lxmusic", - "StartupNotify": "false" - } - }, - "nsis": { - "oneClick": false, - "language": "2052", - "allowToChangeInstallationDirectory": true, - "differentialPackage": true, - "license": "./licenses/license.rtf", - "shortcutName": "LX Music" - }, - "dmg": { - "window": { - "width": 600, - "height": 400 - }, - "contents": [ - { - "x": 106, - "y": 252, - "name": "LX Music" - }, - { - "x": 490, - "y": 252, - "type": "link", - "path": "/Applications" - } - ], - "title": "洛雪音乐助手 v${version}" - }, - "appImage": { - "license": "./licenses/license_zh.txt", - "category": "Utility;AudioVideo;Audio;Player;Music;" - }, - "publish": [ - { - "provider": "github", - "owner": "lyswhut", - "repo": "lx-music-desktop" - } - ] - }, "macLanguagesInfoPlistStrings": { "en": { "CFBundleDisplayName": "LX Music", @@ -230,12 +133,12 @@ "css-loader": "^6.8.1", "css-minimizer-webpack-plugin": "^5.0.1", "del": "^6.1.1", - "electron": "^22.3.24", - "electron-builder": "^24.6.4", + "electron": "^25.8.1", + "electron-builder": "^24.6.5", "electron-debug": "^3.2.0", "electron-devtools-installer": "^3.2.0", "electron-to-chromium": "^1.4.523", - "electron-updater": "^6.1.4", + "electron-updater": "^6.1.5", "eslint": "^8.49.0", "eslint-config-standard": "^17.1.0", "eslint-config-standard-with-typescript": "^39.0.0", @@ -249,7 +152,7 @@ "less-loader": "^11.1.3", "mini-css-extract-plugin": "^2.7.6", "node-loader": "^2.0.0", - "postcss": "^8.4.29", + "postcss": "^8.4.30", "postcss-loader": "^7.3.3", "postcss-pxtorem": "^6.0.0", "pug": "^3.0.2", diff --git a/publish/changeLog.md b/publish/changeLog.md index 11153ee3..7436d3e5 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,6 +1,12 @@ 目前本项目的原始发布地址只有 **GitHub** 及 **蓝奏网盘** ,其他渠道均为第三方转载发布,可信度请自行鉴别。 本项目无微信公众号之类的官方账号,谨防被骗。 +### 不兼容性变更 + +- 由于微软及Electron已结束对 Windows 7、Windows 8 的支持,所以从这个版本起,LX的默认 Windows 版也不再支持这些版本的系统,但考虑到仍然有许多人使用 Windows 7,我们特别构建了能在 Windows 7 上使用的免安装版(文件名带win7),需要注意的是这个版本缺乏安全更新,若非必要情况,不要使用该版本 +- 由于微软在 Windows 10 2004版本已删除对32位的OEM支持,所以在这个版本起,LX的默认 Windows 版已不再提供32位的支持 +- 更改构建的文件名格式,主要修改linux下deb、rpm文件命名格式 + ### 新增 - 新增Scheme URL对播放器的控制操作,新增的操作包含 播放、暂停、下一首、上一首等,详情看Scheme URL文档 @@ -11,4 +17,4 @@ ### 其他 -- 更新 electron 到 v22.3.24 +- 更新 electron 到 v25.8.1