From bc48391a70c12fc61217f684efa536f1b0f8d8a8 Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Thu, 26 Feb 2026 21:47:48 +0530 Subject: [PATCH] refactor: copy neodlp-msghost on flatpak registration --- src-tauri/tauri.linux-flatpak.conf.json | 4 ++-- src/helpers/use-linux-registerer.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src-tauri/tauri.linux-flatpak.conf.json b/src-tauri/tauri.linux-flatpak.conf.json index 04c7be7..d8bc6b1 100644 --- a/src-tauri/tauri.linux-flatpak.conf.json +++ b/src-tauri/tauri.linux-flatpak.conf.json @@ -1,8 +1,8 @@ { "identifier": "com.neosubhamoy.neodlp", "build": { - "beforeDevCommand": "npm run dev", - "beforeBuildCommand": "npm run build", + "beforeDevCommand": "cargo build --manifest-path=./src-tauri/msghost/Cargo.toml && npm run dev", + "beforeBuildCommand": "cargo build --release --manifest-path=./src-tauri/msghost/Cargo.toml && npm run build", "devUrl": "http://localhost:1420", "frontendDist": "../dist" }, diff --git a/src/helpers/use-linux-registerer.ts b/src/helpers/use-linux-registerer.ts index 32c3803..106fd5a 100644 --- a/src/helpers/use-linux-registerer.ts +++ b/src/helpers/use-linux-registerer.ts @@ -48,6 +48,7 @@ export function useLinuxRegisterer() { { source: 'chrome.json', destination: '.config/google-chrome/NativeMessagingHosts/com.neosubhamoy.neodlp.json', dir: '.config/google-chrome/NativeMessagingHosts/', content: JSON.stringify(flatpakChromeManifestContent) }, { source: 'chrome.json', destination: '.config/chromium/NativeMessagingHosts/com.neosubhamoy.neodlp.json', dir: '.config/chromium/NativeMessagingHosts/', content: JSON.stringify(flatpakChromeManifestContent) }, { source: 'firefox.json', destination: '.mozilla/native-messaging-hosts/com.neosubhamoy.neodlp.json', dir: '.mozilla/native-messaging-hosts/', content: JSON.stringify(flatpakFirefoxManifestContent) }, + { source: 'neodlp-msghost', destination: '.local/bin/neodlp-msghost', dir: '.local/bin/' }, ]; LOG.info("LINUX REGISTERER", `Is Flatpak: ${isFlatpak}, Resource dir: ${resourceDirPath}, Home dir: ${homeDirPath}`);