Upgrade Tauri 1.x to 2.x: fix config format + add plugins
This commit is contained in:
@@ -12,12 +12,15 @@ rust-version = "1.60"
|
|||||||
[workspace]
|
[workspace]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { version = "1.5.6", features = [] }
|
tauri-build = { version = "2.0", features = [] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { version = "1.8.3", features = ["fs-all", "path-all", "http-all", "shell-all"] }
|
tauri = { version = "2.0", features = [] }
|
||||||
|
tauri-plugin-fs = "2.0"
|
||||||
|
tauri-plugin-http = "2.0"
|
||||||
|
tauri-plugin-shell = "2.0"
|
||||||
tokio = { version = "1.0", features = ["full"] }
|
tokio = { version = "1.0", features = ["full"] }
|
||||||
sysinfo = "0.30"
|
sysinfo = "0.30"
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ use commands::*;
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
|
.plugin(tauri_plugin_fs::init())
|
||||||
|
.plugin(tauri_plugin_http::init())
|
||||||
|
.plugin(tauri_plugin_shell::init())
|
||||||
.invoke_handler(tauri::generate_handler![
|
.invoke_handler(tauri::generate_handler![
|
||||||
get_tree,
|
get_tree,
|
||||||
list_files,
|
list_files,
|
||||||
|
|||||||
@@ -1,74 +1,38 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
|
"productName": "Momentry Display Engine",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"identifier": "com.momentry.markbase",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeBuildCommand": "cd src && npm run build",
|
"beforeBuildCommand": "cd src && npm run build",
|
||||||
"beforeDevCommand": "cd src && npm run dev",
|
"beforeDevCommand": "cd src && npm run dev",
|
||||||
"devPath": "http://localhost:5173",
|
"devUrl": "http://localhost:5173",
|
||||||
"distDir": "../src/dist"
|
"frontendDist": "../src/dist"
|
||||||
},
|
},
|
||||||
"package": {
|
"bundle": {
|
||||||
"productName": "Momentry Display Engine",
|
"active": true,
|
||||||
"version": "0.1.0"
|
"category": "DeveloperTool",
|
||||||
|
"copyright": "Copyright © 2026 Momentry",
|
||||||
|
"icon": [
|
||||||
|
"icons/32x32.png",
|
||||||
|
"icons/128x128.png",
|
||||||
|
"icons/128x128@2x.png",
|
||||||
|
"icons/icon.icns",
|
||||||
|
"icons/icon.ico"
|
||||||
|
],
|
||||||
|
"longDescription": "Momentry Display Engine - A Tauri-based desktop application for MarkBase management",
|
||||||
|
"macOS": {
|
||||||
|
"entitlements": null,
|
||||||
|
"exceptionDomain": "",
|
||||||
|
"frameworks": [],
|
||||||
|
"providerShortName": null,
|
||||||
|
"signingIdentity": null
|
||||||
|
},
|
||||||
|
"shortDescription": "Momentry Display Engine",
|
||||||
|
"targets": "all"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"app": {
|
||||||
"allowlist": {
|
"withGlobalTauri": false,
|
||||||
"all": false,
|
|
||||||
"fs": {
|
|
||||||
"all": true,
|
|
||||||
"scope": ["$RESOURCE/**", "$APPDATA/**", "$HOME/**"]
|
|
||||||
},
|
|
||||||
"path": {
|
|
||||||
"all": true
|
|
||||||
},
|
|
||||||
"http": {
|
|
||||||
"all": true,
|
|
||||||
"request": true,
|
|
||||||
"scope": ["http://localhost:11438/**", "http://localhost:11439/**"]
|
|
||||||
},
|
|
||||||
"shell": {
|
|
||||||
"all": true,
|
|
||||||
"execute": true,
|
|
||||||
"open": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bundle": {
|
|
||||||
"active": true,
|
|
||||||
"category": "DeveloperTool",
|
|
||||||
"copyright": "Copyright © 2026 Momentry",
|
|
||||||
"deb": {
|
|
||||||
"depends": []
|
|
||||||
},
|
|
||||||
"externalBin": [],
|
|
||||||
"icon": [
|
|
||||||
"icons/32x32.png",
|
|
||||||
"icons/128x128.png",
|
|
||||||
"icons/128x128@2x.png",
|
|
||||||
"icons/icon.icns",
|
|
||||||
"icons/icon.ico"
|
|
||||||
],
|
|
||||||
"identifier": "com.momentry.markbase",
|
|
||||||
"longDescription": "Momentry Display Engine - A Tauri-based desktop application for MarkBase management",
|
|
||||||
"macOS": {
|
|
||||||
"entitlements": null,
|
|
||||||
"exceptionDomain": "",
|
|
||||||
"frameworks": [],
|
|
||||||
"providerShortName": null,
|
|
||||||
"signingIdentity": null
|
|
||||||
},
|
|
||||||
"resources": ["../../data/**"],
|
|
||||||
"shortDescription": "Momentry Display Engine",
|
|
||||||
"targets": "all",
|
|
||||||
"windows": {
|
|
||||||
"certificateThumbprint": null,
|
|
||||||
"digestAlgorithm": "sha256",
|
|
||||||
"timestampUrl": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": {
|
|
||||||
"csp": null
|
|
||||||
},
|
|
||||||
"updater": {
|
|
||||||
"active": false
|
|
||||||
},
|
|
||||||
"windows": [
|
"windows": [
|
||||||
{
|
{
|
||||||
"fullscreen": false,
|
"fullscreen": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user