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
fix icon in desktop linux build, fixes #372
azivner484715e44087
diff --git a/bin/build-linux-x64.sh b/bin/build-linux-x64.shindex faf16b9b6d..e200fc4964 100755--- a/bin/build-linux-x64.sh+++ b/bin/build-linux-x64.sh@@ -11,6 +11,8 @@ cp -r bin/deps/linux-x64/sqlite/* node_modules/sqlite3/lib/binding/mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR+cp src/public/images/app-icons/png/128x128.png $BUILD_DIR/icon.png+# removing software WebGL binaries because they are pretty huge and not necessaryrm -r $BUILD_DIR/swiftshaderdiff --git a/src/services/app_icon.js b/src/services/app_icon.jsindex 8b6c6e747d..9c6c0f3be1 100644--- a/src/services/app_icon.js+++ b/src/services/app_icon.js@@ -1,7 +1,7 @@"use strict";const path = require('path');-const {APP_PNG_ICON_DIR, ELECTRON_APP_ROOT_DIR} = require("./resource_dir");+const {ELECTRON_APP_ROOT_DIR} = require("./resource_dir");const log = require("./log");const os = require('os');const fs = require('fs');@@ -11,7 +11,7 @@ const utils = require('./utils');const template = `[Desktop Entry]Type=ApplicationName=Trilium Notes-Icon=#APP_PNG_ICON_DIR#/128x128.png+Icon=#APP_ROOT_DIR#/icon.pngExec=#EXE_PATH#Categories=OfficeTerminal=false@@ -50,7 +50,7 @@ function installLocalAppIcon() {function getDesktopFileContent() {return template- .replace("#APP_PNG_ICON_DIR#", escapePath(APP_PNG_ICON_DIR))+ .replace("#APP_ROOT_DIR#", escapePath(ELECTRON_APP_ROOT_DIR)).replace("#EXE_PATH#", escapePath(getExePath()));}diff --git a/src/services/resource_dir.js b/src/services/resource_dir.jsindex 2077e9f70e..28009aba7f 100644--- a/src/services/resource_dir.js+++ b/src/services/resource_dir.js@@ -7,7 +7,6 @@ const RESOURCE_DIR = path.resolve(__dirname, "../..");// where "trilium" executable isconst ELECTRON_APP_ROOT_DIR = path.resolve(RESOURCE_DIR, "../..");const DB_INIT_DIR = path.resolve(RESOURCE_DIR, "db");-const APP_PNG_ICON_DIR = path.resolve(RESOURCE_DIR, "src/public/images/app-icons/png");if (!fs.existsSync(DB_INIT_DIR)) {log.error("Could not find DB initialization directory: " + DB_INIT_DIR);@@ -25,6 +24,5 @@ module.exports = {RESOURCE_DIR,MIGRATIONS_DIR,DB_INIT_DIR,- ELECTRON_APP_ROOT_DIR,- APP_PNG_ICON_DIR+ ELECTRON_APP_ROOT_DIR};\ No newline at end of file