This commit is contained in:
@@ -4,7 +4,7 @@ pub fn run() {
|
||||
.plugin(tauri_plugin_global_shortcut::Builder::new().build())
|
||||
.plugin(tauri_plugin_process::init())
|
||||
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||
.plugin(tauri_plugin_single_instance::init(|_, _, _| {}))
|
||||
// .plugin(tauri_plugin_single_instance::init(|_, _, _| {}))
|
||||
.setup(|app| {
|
||||
if cfg!(debug_assertions) {
|
||||
app.handle().plugin(
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
fn set_app_user_model_id() {
|
||||
use windows::core::HSTRING;
|
||||
use windows::Win32::UI::Shell::SetCurrentProcessExplicitAppUserModelID;
|
||||
|
||||
unsafe {
|
||||
SetCurrentProcessExplicitAppUserModelID(
|
||||
&HSTRING::from("xyz.koptilnya.chad")
|
||||
).ok().expect("Failed to set AppUserModelID");
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
#[cfg(target_os = "windows")]
|
||||
set_app_user_model_id();
|
||||
|
||||
app_lib::run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user