Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
build: Add icon.png for Linux builds (fixes #507)
Elian Dorane3e6f56a8878
diff --git a/forge.config.cjs b/forge.config.cjsindex 2f0d64c4ba..e1c02a2f3d 100644--- a/forge.config.cjs+++ b/forge.config.cjs@@ -20,13 +20,20 @@ module.exports = {afterComplete: [(buildPath, _electronVersion, platform, _arch, callback) => {const extraResources = getExtraResourcesForPlatform();for (const resource of extraResources) {+ const baseName = path.basename(resource);let sourcePath;if (platform === 'darwin') {- sourcePath = path.join(buildPath, `${APP_NAME}.app`, 'Contents', 'Resources', path.basename(resource));+ sourcePath = path.join(buildPath, `${APP_NAME}.app`, 'Contents', 'Resources', baseName);} else {sourcePath = path.join(buildPath, 'resources', path.basename(resource));}- const destPath = path.join(buildPath, path.basename(resource));+ let destPath;++ if (baseName !== "256x256.png") {+ destPath = path.join(buildPath, path.basename(resource));+ } else {+ destPath = path.join(buildPath, "icon.png");+ }// Copy files from resources folder to rootfs.move(sourcePath, destPath)@@ -96,6 +103,7 @@ function getExtraResourcesForPlatform() {case 'darwin':break;case 'linux':+ resources.push("images/app-icons/png/256x256.png")for (const script of scripts) {resources.push(`./bin/tpl/${script}.sh`)}