mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 09:15:41 +08:00
chore: 修改打包配置
This commit is contained in:
1 parent
f47af8024f
commit
6cadcb9a5a
7 files changed
+136
-47
No files matched your search
@@ -186,7 +186,21 @@ function validateMacEditionResources(runtimeResources, edition, platform) {
|
||||
throw new Error(`Missing FFmpeg license/build notice: ${relative}`)
|
||||
}
|
||||
}
|
||||
const ffmpegLicenseHashes = marker.ffmpegLicenseSha256
|
||||
if (!ffmpegLicenseHashes || typeof ffmpegLicenseHashes !== 'object') {
|
||||
throw new Error('Mac build marker is missing FFmpeg license/source notice hashes')
|
||||
}
|
||||
for (const [relative, expected] of Object.entries(ffmpegLicenseHashes)) {
|
||||
const notice = path.join(resources, relative)
|
||||
if (!/^[a-f0-9]{64}$/.test(expected) || !existsSync(notice) ||
|
||||
createHash('sha256').update(readFileSync(notice)).digest('hex') !== expected) {
|
||||
throw new Error(`Packaged FFmpeg license/source notice hash mismatch: ${relative}`)
|
||||
}
|
||||
}
|
||||
if (edition === 'native') {
|
||||
if (!readFileSync(host).includes(Buffer.from('/license/status'))) {
|
||||
throw new Error('Native Host does not implement GET /license/status')
|
||||
}
|
||||
for (const binary of [helper, host, runtimeDylib]) {
|
||||
if (!readBinaryArchitectures(binary).includes('arm64')) {
|
||||
throw new Error(`Native binary lacks arm64 architecture: ${binary}`)
|
||||
|
||||
Reference in new issue
Block a user