Update Tauri from v1 to v2 (#496)
* Upgrade tauri to v2 * update action and disable menu * Add args to workflow step in test.yml * Rename environment variables for Tauri signing * Change mainBinaryName from 'Cinny' to 'cinny' * Update linux file names to use 'Cinny' instead of 'cinny' * Upgrade Tauri action to v0.6.1 and fix targets Updated Tauri action version and corrected target specification.
This commit is contained in:
+3
-28
@@ -1,30 +1,5 @@
|
||||
#![cfg_attr(
|
||||
all(not(debug_assertions), target_os = "windows"),
|
||||
windows_subsystem = "windows"
|
||||
)]
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
mod menu;
|
||||
|
||||
use tauri::{utils::config::AppUrl, WindowUrl};
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
let port = 44548;
|
||||
|
||||
let mut context = tauri::generate_context!();
|
||||
let url = format!("http://localhost:{}", port).parse().unwrap();
|
||||
let window_url = WindowUrl::External(url);
|
||||
// rewrite the config so the IPC is enabled on this URL
|
||||
context.config_mut().build.dist_dir = AppUrl::Url(window_url.clone());
|
||||
context.config_mut().build.dev_path = AppUrl::Url(window_url.clone());
|
||||
let builder = tauri::Builder::default();
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
let builder = builder.menu(menu::menu());
|
||||
|
||||
builder
|
||||
.plugin(tauri_plugin_localhost::Builder::new(port).build())
|
||||
.plugin(tauri_plugin_window_state::Builder::default().build())
|
||||
.run(context)
|
||||
.expect("error while building tauri application")
|
||||
}
|
||||
app_lib::run();
|
||||
}
|
||||
Reference in New Issue
Block a user