From 94cdabba25849ebb5d565236c23b59c5d128a414 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Thu, 1 Sep 2022 18:14:52 +0200 Subject: [PATCH] chore: prepare to move to tauri-apps org --- .changes/config.json | 8 ++++---- .changes/initial-release.md | 5 ----- src/lib.rs | 5 ++--- src/platform_impl/macos.rs | 10 ---------- 4 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 .changes/initial-release.md delete mode 100644 src/platform_impl/macos.rs diff --git a/.changes/config.json b/.changes/config.json index 287f615b6..053cfec10 100644 --- a/.changes/config.json +++ b/.changes/config.json @@ -1,5 +1,5 @@ { - "gitSiteUrl": "https://www.github.com/your-org/tauri-plugin-single-instance/", + "gitSiteUrl": "https://www.github.com/tauri-apps/tauri-plugin-single-instance/", "pkgManagers": { "rust": { "version": true, @@ -10,7 +10,7 @@ "dryRunCommand": true }, { - "command": "echo \"# Cargo Publish\"", + "command": "echo '
\n

Cargo Publish

\n\n```'", "dryRunCommand": true, "pipe": true }, @@ -25,7 +25,7 @@ "pipe": true }, { - "command": "echo \"\\`\\`\\`\"", + "command": "echo '```\n\n
\n'", "dryRunCommand": true, "pipe": true } @@ -38,4 +38,4 @@ "manager": "rust" } } -} +} \ No newline at end of file diff --git a/.changes/initial-release.md b/.changes/initial-release.md deleted file mode 100644 index ae22a9e89..000000000 --- a/.changes/initial-release.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-plugin-single-instance": "minor" ---- - -Initial release. diff --git a/src/lib.rs b/src/lib.rs index 1cc9488a3..ae729c6ed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,9 +6,7 @@ mod platform_impl; #[cfg(target_os = "linux")] #[path = "platform_impl/linux.rs"] mod platform_impl; -#[cfg(target_os = "macos")] -#[path = "platform_impl/macos.rs"] -mod platform_impl; + pub(crate) type SingleInstanceCallback = dyn FnMut(&AppHandle, Vec, String) + Send + Sync + 'static; @@ -16,5 +14,6 @@ pub(crate) type SingleInstanceCallback = pub fn init, Vec, String) + Send + Sync + 'static>( f: F, ) -> TauriPlugin { + #[cfg(any(target_os = "windows", target_os = "linux"))] platform_impl::init(Box::new(f)) } diff --git a/src/platform_impl/macos.rs b/src/platform_impl/macos.rs deleted file mode 100644 index 99edeaedf..000000000 --- a/src/platform_impl/macos.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![cfg(target_os = "macos")] - -use crate::SingleInstanceCallback; -use tauri::{ - plugin::{self, TauriPlugin}, - Runtime, -}; -pub fn init(f: Box>) -> TauriPlugin { - plugin::Builder::new("single-instance").build() -}