Fix the packaging appimage problem in linux

This commit is contained in:
Tw93
2025-10-13 20:29:32 +08:00
parent 2fb47988fc
commit 00d49bbbf7
7 changed files with 534 additions and 6 deletions

19
bin/utils/shell.ts vendored
View File

@@ -26,8 +26,21 @@ export async function shellExec(
);
}
throw new Error(
`Error occurred while executing command "${command}". Exit code: ${exitCode}. Details: ${errorMessage}`,
);
let errorMsg = `Error occurred while executing command "${command}". Exit code: ${exitCode}. Details: ${errorMessage}`;
if (
process.platform === 'linux' &&
(errorMessage.includes('linuxdeploy') ||
errorMessage.includes('appimage') ||
errorMessage.includes('strip'))
) {
errorMsg +=
'\n\nLinux AppImage build error. Try one of these solutions:\n' +
' 1. Run with: NO_STRIP=true pake <url> --targets appimage\n' +
' 2. Use DEB format instead: pake <url> --targets deb\n' +
' 3. See detailed solutions: https://github.com/tw93/Pake/blob/main/docs/faq.md';
}
throw new Error(errorMsg);
}
}