Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludea committed Aug 5, 2024
1 parent 99423b7 commit 3ff6403
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn get_plugin<R: Runtime>() -> Result<TauriPlugin<R>, Box<dyn std::error::Er
pub fn run() {
let spawner = updater::LocalSpawner::new();

let app = tauri::Builder::default()
let mut app = tauri::Builder::default()
.manage(spawner)
.invoke_handler(tauri::generate_handler![
updater::update_workspace,
Expand All @@ -40,8 +40,6 @@ pub fn run() {
})
.plugin(tauri_plugin_notification::init())
.plugin(tauri_plugin_shell::init())
#[cfg(desktop)]
.plugin(tauri_plugin_single_instance::init(|_, _, _| {}))
.plugin(tauri_plugin_store::Builder::default().build())
.plugin(
tauri_plugin_stronghold::Builder::new(|password| {
Expand All @@ -53,7 +51,6 @@ pub fn run() {
version: Version::Version13,
..Default::default()
};
//let salt;
let salt = match env::var("STRONGHOLD_SALT") {
Ok(val) => val,
Err(_) => {
Expand All @@ -74,15 +71,20 @@ pub fn run() {
.build(),
)
.plugin(tauri_plugin_process::init())
.plugin(tauri_plugin_os::init())
.plugin(tauri_plugin_os::init());

#[cfg(desktop)]
{
app
.plugin(tauri_plugin_single_instance::init(|_, _, _| {}))
.plugin(tauri_plugin_autostart::init(
MacosLauncher::LaunchAgent,
None,
));
}

app
.run(tauri::generate_context!())
.expect("error while running tauri application");

#[cfg(desktop)]
app
.plugin(tauri_plugin_single_instance::init(|_, _, _| {}))
.plugin(tauri_plugin_autostart::init(
MacosLauncher::LaunchAgent,
None,
));
}

0 comments on commit 3ff6403

Please sign in to comment.