Use proper tauri dev mode detection
This commit is contained in:
1 file changed
+4
-4
@@ -31,7 +31,7 @@ use sysinfo::System;
|
|||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use std::os::unix::fs::PermissionsExt;
|
use std::os::unix::fs::PermissionsExt;
|
||||||
|
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(dev))]
|
||||||
use tauri_plugin_updater::UpdaterExt;
|
use tauri_plugin_updater::UpdaterExt;
|
||||||
|
|
||||||
struct AppState {
|
struct AppState {
|
||||||
@@ -758,7 +758,7 @@ pub fn run() {
|
|||||||
eprintln!("Failed to create overlay titlebar: {:?}", e);
|
eprintln!("Failed to create overlay titlebar: {:?}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(dev))]
|
||||||
{
|
{
|
||||||
use tauri_plugin_cli::CliExt;
|
use tauri_plugin_cli::CliExt;
|
||||||
|
|
||||||
@@ -781,7 +781,7 @@ pub fn run() {
|
|||||||
Err(_) => {}
|
Err(_) => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(dev)]
|
||||||
{
|
{
|
||||||
let mut new_url = window.url().unwrap();
|
let mut new_url = window.url().unwrap();
|
||||||
new_url.set_path("/main");
|
new_url.set_path("/main");
|
||||||
@@ -799,7 +799,7 @@ pub fn run() {
|
|||||||
.expect("error while running tauri application");
|
.expect("error while running tauri application");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(dev))]
|
||||||
async fn update(
|
async fn update(
|
||||||
app: tauri::AppHandle,
|
app: tauri::AppHandle,
|
||||||
window: tauri::WebviewWindow,
|
window: tauri::WebviewWindow,
|
||||||
|
|||||||
Reference in new issue
Block a user