We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b95fd11 commit aa58698Copy full SHA for aa58698
1 file changed
src/main/linux.ts
@@ -49,9 +49,21 @@ export class LinuxAdapter extends Adapter {
49
50
if (!fs.existsSync(path.join(exePath, '../resources/electron.asar'))) return
51
52
+ let icon = ''
53
+ if (entry.Icon) {
54
+ try {
55
+ const iconBuffer = await fs.promises.readFile(
56
+ `/usr/share/icons/hicolor/1024x1024/apps/${entry.Icon}.png`,
57
+ )
58
+ icon = 'data:image/png;base64,' + iconBuffer.toString('base64')
59
+ } catch (err) {
60
+ console.error(err)
61
+ }
62
63
+
64
return {
65
id: exePath,
- icon: '', // TODO: Read icon
66
+ icon: icon, // TODO: Read icon
67
name: entry.Name || path.basename(exePath),
68
exePath: exePath,
69
}
0 commit comments