Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: flatpak build failing due to too large icons #7875

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nervous-cheetahs-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix: flatpak build fails due to too large icons
4 changes: 4 additions & 0 deletions packages/app-builder-lib/src/targets/FlatpakTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export default class FlatpakTarget extends Target {
private async copyIcons(stageDir: StageDir) {
const icons = await this.helper.icons
const copyIcons = icons.map(async icon => {
if (icon.size > 512) {
// Flatpak does not allow icons larger than 512 pixels
return Promise.resolve();
}
const extWithDot = path.extname(icon.file)
const sizeName = extWithDot === ".svg" ? "scalable" : `${icon.size}x${icon.size}`
const iconDst = stageDir.getTempFile(path.join("share", "icons", "hicolor", sizeName, "apps", `${this.appId}${extWithDot}`))
Expand Down