Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #41 from 0xjac/fix/deb-icon
Browse files Browse the repository at this point in the history
tmp fix: broken icon on linux (deb)
  • Loading branch information
polarker authored Nov 1, 2021
2 parents 76ec31d + 302aa40 commit b92a165
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .afterPack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// The hook is a temporary fix to set the right icon size for the deb archive.
// The hook only applies to the `deb` target.
// The hook will set the icon size to 512 for all icons with a size of 0.
// The hook can be removed once:
// 1. The proper fix (https://github.com/develar/app-builder/pull/71) is merged.
// 2. New versions of app-builder and app-builder-bin are released.
// 3. A version of electron-builder with the fixed app-builder-bin is released.
// 4. The electron-builder dev dependency is updated.
exports.default = async function(context) {
context.targets.forEach(target => {
if (target.name !== "deb") { return }

target.helper.iconPromise.value = target.helper.iconPromise.value.then(
icons => icons.map(
icon => ({...icon, size: icon.size === 0 ? 512 : icon.size})
)
)
})
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
"productName": "Alephium",
"directories": {
"buildResources": "assets"
}
},
"afterPack": ".afterPack.js"
},
"engines": {
"node": ">=12.0.0"
Expand Down

0 comments on commit b92a165

Please sign in to comment.