Continue to optimize appimage packaging
This commit is contained in:
23
bin/builders/BaseBuilder.ts
vendored
23
bin/builders/BaseBuilder.ts
vendored
@@ -123,14 +123,12 @@ export default abstract class BaseBuilder {
|
||||
`cd "${npmDirectory}" && ${packageManager} install${registryOption}${peerDepsOption}`,
|
||||
timeout,
|
||||
buildEnv,
|
||||
this.options.debug,
|
||||
);
|
||||
} else {
|
||||
await shellExec(
|
||||
`cd "${npmDirectory}" && ${packageManager} install${peerDepsOption}`,
|
||||
timeout,
|
||||
buildEnv,
|
||||
this.options.debug,
|
||||
);
|
||||
}
|
||||
spinner.succeed(chalk.green('Package installed!'));
|
||||
@@ -169,11 +167,24 @@ export default abstract class BaseBuilder {
|
||||
...(process.env.NO_STRIP && { NO_STRIP: process.env.NO_STRIP }),
|
||||
};
|
||||
|
||||
// Warn users about potential AppImage build failures on modern Linux systems.
|
||||
// The linuxdeploy tool bundled in Tauri uses an older strip tool that doesn't
|
||||
// recognize the .relr.dyn section introduced in glibc 2.38+.
|
||||
if (process.platform === 'linux' && this.options.targets === 'appimage') {
|
||||
if (!buildEnv.NO_STRIP) {
|
||||
logger.warn(
|
||||
'⚠ Building AppImage on Linux may fail due to strip incompatibility with glibc 2.38+',
|
||||
);
|
||||
logger.warn(
|
||||
'⚠ If build fails, retry with: NO_STRIP=1 pake <url> --targets appimage',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
await shellExec(
|
||||
`cd "${npmDirectory}" && ${this.getBuildCommand(packageManager)}`,
|
||||
this.getBuildTimeout(),
|
||||
buildEnv,
|
||||
this.options.debug,
|
||||
);
|
||||
|
||||
// Copy app
|
||||
@@ -280,6 +291,12 @@ export default abstract class BaseBuilder {
|
||||
fullCommand += ` --target ${target}`;
|
||||
}
|
||||
|
||||
// Enable verbose output in debug mode to help diagnose build issues.
|
||||
// This provides detailed logs from Tauri CLI and bundler tools.
|
||||
if (this.options.debug) {
|
||||
fullCommand += ' --verbose';
|
||||
}
|
||||
|
||||
return fullCommand;
|
||||
}
|
||||
|
||||
|
||||
7
bin/builders/LinuxBuilder.ts
vendored
7
bin/builders/LinuxBuilder.ts
vendored
@@ -78,6 +78,13 @@ export default class LinuxBuilder extends BaseBuilder {
|
||||
fullCommand += ` --features ${features.join(',')}`;
|
||||
}
|
||||
|
||||
// Enable verbose output for AppImage builds when debugging or PAKE_VERBOSE is set.
|
||||
// AppImage builds often fail with minimal error messages from linuxdeploy,
|
||||
// so verbose mode helps diagnose issues like strip failures and missing dependencies.
|
||||
if (this.options.targets === 'appimage' && (this.options.debug || process.env.PAKE_VERBOSE)) {
|
||||
fullCommand += ' --verbose';
|
||||
}
|
||||
|
||||
return fullCommand;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user