There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
feat(client): switch to 512x512 icons for linux, add metainfo (#11759)
Vladimir Romashchenko8575fc2ad58f
diff --git a/packages/frontend/apps/electron/forge.config.mjs b/packages/frontend/apps/electron/forge.config.mjsindex 6c3c5d2cf5..f99e72567f 100644--- a/packages/frontend/apps/electron/forge.config.mjs+++ b/packages/frontend/apps/electron/forge.config.mjs@@ -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 yetbranch: 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,diff --git a/packages/frontend/apps/electron/resources/affine.metainfo.xml b/packages/frontend/apps/electron/resources/affine.metainfo.xmlnew file mode 100644index 0000000000..a1d5f812b8--- /dev/null+++ b/packages/frontend/apps/electron/resources/affine.metainfo.xml@@ -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 isn’t 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>diff --git a/packages/frontend/apps/electron/resources/deb/postinst b/packages/frontend/apps/electron/resources/deb/postinstnew file mode 100644index 0000000000..1f145acbd1--- /dev/null+++ b/packages/frontend/apps/electron/resources/deb/postinst@@ -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.xmldiff --git a/packages/frontend/apps/electron/resources/deb/prerm b/packages/frontend/apps/electron/resources/deb/prermnew file mode 100644index 0000000000..24c7840c65--- /dev/null+++ b/packages/frontend/apps/electron/resources/deb/prerm@@ -0,0 +1,4 @@+#!/bin/sh+set -e++rm /usr/share/metainfo/affine.metainfo.xmldiff --git a/packages/frontend/apps/electron/resources/icons/icon_beta_512x512.png b/packages/frontend/apps/electron/resources/icons/icon_beta_512x512.pngnew file mode 100644index 0000000000..73703495d2Binary files /dev/null and b/packages/frontend/apps/electron/resources/icons/icon_beta_512x512.png differdiff --git a/packages/frontend/apps/electron/resources/icons/icon_canary_512x512.png b/packages/frontend/apps/electron/resources/icons/icon_canary_512x512.pngnew file mode 100644index 0000000000..620e668ebeBinary files /dev/null and b/packages/frontend/apps/electron/resources/icons/icon_canary_512x512.png differdiff --git a/packages/frontend/apps/electron/resources/icons/icon_internal_512x512.png b/packages/frontend/apps/electron/resources/icons/icon_internal_512x512.pngnew file mode 100644index 0000000000..32622ace52Binary files /dev/null and b/packages/frontend/apps/electron/resources/icons/icon_internal_512x512.png differdiff --git a/packages/frontend/apps/electron/resources/icons/icon_stable_512x512.png b/packages/frontend/apps/electron/resources/icons/icon_stable_512x512.pngnew file mode 100644index 0000000000..35a4c953b7Binary files /dev/null and b/packages/frontend/apps/electron/resources/icons/icon_stable_512x512.png differdiff --git a/packages/frontend/apps/electron/scripts/make-env.ts b/packages/frontend/apps/electron/scripts/make-env.tsindex ce7439d052..70a62d25c3 100644--- a/packages/frontend/apps/electron/scripts/make-env.ts+++ b/packages/frontend/apps/electron/scripts/make-env.ts@@ -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,