Fixed plugins on Windows

This commit is contained in:
Gregory Schier
2024-07-21 16:01:13 -07:00
parent a444984aed
commit 6a5f61e84b
5 changed files with 12 additions and 72 deletions

View File

@@ -2512,69 +2512,6 @@
"clipboard-manager:deny-write-text"
]
},
{
"description": "deep-link:default -> Allows reading the opened deep link via the get_current command",
"type": "string",
"enum": [
"deep-link:default"
]
},
{
"description": "deep-link:allow-get-current -> Enables the get_current command without any pre-configured scope.",
"type": "string",
"enum": [
"deep-link:allow-get-current"
]
},
{
"description": "deep-link:allow-is-registered -> Enables the is_registered command without any pre-configured scope.",
"type": "string",
"enum": [
"deep-link:allow-is-registered"
]
},
{
"description": "deep-link:allow-register -> Enables the register command without any pre-configured scope.",
"type": "string",
"enum": [
"deep-link:allow-register"
]
},
{
"description": "deep-link:allow-unregister -> Enables the unregister command without any pre-configured scope.",
"type": "string",
"enum": [
"deep-link:allow-unregister"
]
},
{
"description": "deep-link:deny-get-current -> Denies the get_current command without any pre-configured scope.",
"type": "string",
"enum": [
"deep-link:deny-get-current"
]
},
{
"description": "deep-link:deny-is-registered -> Denies the is_registered command without any pre-configured scope.",
"type": "string",
"enum": [
"deep-link:deny-is-registered"
]
},
{
"description": "deep-link:deny-register -> Denies the register command without any pre-configured scope.",
"type": "string",
"enum": [
"deep-link:deny-register"
]
},
{
"description": "deep-link:deny-unregister -> Denies the unregister command without any pre-configured scope.",
"type": "string",
"enum": [
"deep-link:deny-unregister"
]
},
{
"type": "string",
"enum": [

View File

@@ -897,7 +897,10 @@ async fn cmd_request_to_curl(
let request_json = serde_json::to_string(&rendered).map_err(|e| e.to_string())?;
let manager: State<PluginManager> = app.state();
let import_response = manager.inner().run_export_curl(request_json.as_str()).await?;
let import_response = manager
.inner()
.run_export_curl(request_json.as_str())
.await?;
Ok(import_response.data)
}
@@ -1569,6 +1572,7 @@ async fn cmd_check_for_updates(
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
#[allow(unused_mut)]
let mut builder = tauri::Builder::default()
.plugin(
tauri_plugin_log::Builder::default()
@@ -1613,11 +1617,6 @@ pub fn run() {
builder = builder.plugin(tauri_plugin_mac_window::init());
}
#[cfg(target_os = "linux")]
{
builder = builder; // Don't complain about not being mut
}
builder
.setup(|app| {
let app_data_dir = app.path().app_data_dir().unwrap();

View File

@@ -24,11 +24,15 @@ pub async fn node_start<R: Runtime>(app: &AppHandle<R>, temp_dir: &PathBuf) -> S
.path()
.resolve("plugins", BaseDirectory::Resource)
.expect("failed to resolve plugin directory resource");
let plugins_dir = plugins_dir.to_string_lossy().to_string();
// Remove UNC prefix for Windows paths
let plugins_dir = plugins_dir.replace("\\\\?\\", "");
info!(
"Starting plugin runtime port_file={} plugins_dir={}",
port_file_path.to_string_lossy(),
plugins_dir.to_string_lossy(),
plugins_dir,
);
let (mut rx, _child) = app