diff --git a/.changes/config.json b/.changes/config.json index 287f615b..053cfec1 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 ae22a9e8..00000000 --- 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 1cc9488a..ae729c6e 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 99edeaed..00000000 --- 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() -}