feat(client): switch to 512x512 icons for linux, add metainfo (#11759)

This commit is contained in:
Vladimir Romashchenko
2025-04-17 07:17:51 -04:00
committed by GitHub
parent c2c106f508
commit 8575fc2ad5
9 changed files with 108 additions and 5 deletions
@@ -12,7 +12,7 @@ import {
icnsPath,
iconPngPath,
iconUrl,
iconX64PngPath,
iconX512PngPath,
icoPath,
platform,
productName,
@@ -85,8 +85,8 @@ const makers = [
config: {
icons: [
{
file: iconX64PngPath,
size: 64,
file: iconX512PngPath,
size: 512,
},
],
},
@@ -98,8 +98,14 @@ const makers = [
options: {
name: productName,
productName,
icon: iconX64PngPath,
icon: iconX512PngPath,
mimeType: linuxMimeTypes,
scripts: {
// maker-deb does not have a way to include arbitrary files in package root
// instead, put files in extraResource, and then install with a script
postinst: './resources/deb/postinst',
prerm: './resources/deb/prerm',
},
},
},
},
@@ -115,6 +121,12 @@ const makers = [
id: fromBuildIdentifier(appIdMap),
icon: iconPngPath, // not working yet
branch: buildType,
files: [
[
'./resources/affine.metainfo.xml',
'/usr/share/metainfo/affine.metainfo.xml',
],
],
runtimeVersion: '20.08',
finishArgs: [
// Wayland/X11 Rendering
@@ -160,7 +172,10 @@ export default {
}
: undefined,
// We need the following line for updater
extraResource: ['./resources/app-update.yml'],
extraResource: [
'./resources/app-update.yml',
...(platform === 'linux' ? ['./resources/affine.metainfo.xml'] : []),
],
protocols: [
{
name: productName,
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>affine</id>
<name>AFFiNE</name>
<summary>Productivity and note-taking app</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT AND LicenseRef-proprietary=https://github.com/toeverything/AFFiNE/blob/canary/LICENSE</project_license>
<url type="homepage">https://affine.pro</url>
<url type="bugtracker">https://github.com/toeverything/AFFiNE/issues</url>
<url type="help">https://docs.affine.pro/docs</url>
<url type="vcs-browser">https://github.com/toeverything/AFFiNE</url>
<url type="contribute">https://docs.affine.pro/docs/contributing</url>
<content_rating type="oars-1.1"></content_rating>
<categories>
<category>Office</category>
</categories>
<keywords>
<keyword>notes</keyword>
<keyword>canvas</keyword>
</keywords>
<branding>
<color type="primary">#1e96eb</color>
</branding>
<recommends>
<display_length compare="ge">800</display_length>
<internet>always</internet>
</recommends>
<provides>
<mediatype>x-scheme-handler/affine</mediatype>
</provides>
<supports>
<control>pointing</control>
<control>keyboard</control>
<control>tablet</control>
<control>touch</control>
</supports>
<description>
<p>Write, Draw, Plan, All at Once. With AI.</p>
<p>AFFiNE is a workspace with fully merged docs, whiteboards and databases. Get more things done, your creativity isnt monotone.</p>
<p>Features</p>
<ul>
<li>Write your way to better productivity. Build up your content like blocks and let your ideas run wild.</li>
<li>Draw and visualise with ease and creativity. Visualise your creativity with others. No constraints, limited only by your imagination.</li>
<li>Plan, track, and collaborate efficiently. Stay on top of your workload and achieve more in less time.</li>
<li>AI partner helps you better write, draw and plan. Let you think bigger, create faster, work smarter in anytime, anywhere</li>
</ul>
</description>
<launchable type="desktop-id">pro.affine.AFFiNE.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://affine.pro/overview/Write.jpg</image>
</screenshot>
<screenshot>
<image>https://affine.pro/overview/Draw.jpg</image>
</screenshot>
<screenshot>
<image>https://affine.pro/overview/Plan.jpg</image>
</screenshot>
</screenshots>
<releases>
<release version="0.21.2" date="2025-04-11">
<url>https://github.com/toeverything/AFFiNE/releases/tag/v0.21.2</url>
</release>
</releases>
</component>
@@ -0,0 +1,5 @@
#!/bin/sh
set -e
BUILD_TYPE=$(ls /usr/lib | grep '^affine')
install -Dm0644 /usr/lib/${BUILD_TYPE}/resources/affine.metainfo.xml /usr/share/metainfo/affine.metainfo.xml
@@ -0,0 +1,4 @@
#!/bin/sh
set -e
rm /usr/share/metainfo/affine.metainfo.xml
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

@@ -30,6 +30,11 @@ const iconX64PngPath = path.join(
`./resources/icons/icon_${buildType}_64x64.png`
);
const iconX512PngPath = path.join(
ROOT,
`./resources/icons/icon_${buildType}_512x512.png`
);
const icnsPath = path.join(
ROOT,
!stableBuild
@@ -77,6 +82,7 @@ export {
iconPngPath,
iconUrl,
iconX64PngPath,
iconX512PngPath,
icoPath,
platform,
productName,