diff --git a/fluxer_desktop/electron-builder.config.cjs b/fluxer_desktop/electron-builder.config.cjs index 3b48c23b8..5732f9b63 100644 --- a/fluxer_desktop/electron-builder.config.cjs +++ b/fluxer_desktop/electron-builder.config.cjs @@ -959,8 +959,22 @@ function throwLinuxGlibcCompatibilityError(violations, formatPath) { throw new Error(lines.join('\n')); } +function linuxDistributableTargetNames(context) { + if (!Array.isArray(context.targets)) { + throw new Error('Cannot verify Linux glibc compatibility: electron-builder did not provide a target list.'); + } + return context.targets.map((target) => target.name).filter((name) => name !== 'dir'); +} + async function verifyLinuxGlibcCompatibility(context) { if (context.electronPlatformName !== 'linux') return; + const distributableTargets = linuxDistributableTargetNames(context); + if (distributableTargets.length === 0) { + console.log( + `Skipped the ${linuxGlibcBaseline.name} ABI baseline check: this pack produces no distributable Linux artifact.`, + ); + return; + } const elfFiles = await findPackagedElfFiles(context.appOutDir); if (elfFiles.length === 0) { throw new Error(`Linux package output contains no ELF files: ${context.appOutDir}`);