diff --git a/.gitignore b/.gitignore index a06dda4..a2e6810 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ desktop/.tauri-signing.pw screenshots/ *.log .DS_Store + +# local airspace test data (real data is installed into X-Plane via the launcher) +airspace-data/ diff --git a/desktop/src-tauri/src/lib.rs b/desktop/src-tauri/src/lib.rs index 3b4240c..ef8fd94 100644 --- a/desktop/src-tauri/src/lib.rs +++ b/desktop/src-tauri/src/lib.rs @@ -119,13 +119,21 @@ async fn start_server( .resolve("web", tauri::path::BaseDirectory::Resource) .map_err(|e| format!("resource path: {e}"))?; + // The FlyWithLua companion scripts ship as a bundled resource; tell the + // bridge where they live so it can auto-install them into X-Plane. + let lua_src = app + .path() + .resolve("plugins", tauri::path::BaseDirectory::Resource) + .map_err(|e| format!("resource path: {e}"))?; + let mut cmd = app .shell() .sidecar("xpbridge") .map_err(|e| format!("sidecar: {e}"))? .env("BRIDGE_PORT", port.to_string()) .env("BRIDGE_HOST", "0.0.0.0") - .env("WEB_DIST", web_dist.to_string_lossy().to_string()); + .env("WEB_DIST", web_dist.to_string_lossy().to_string()) + .env("LUA_SRC_DIR", lua_src.to_string_lossy().to_string()); if !xplane_path.is_empty() { cmd = cmd.env("XPLANE_ROOT", xplane_path); diff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.json index 27defc9..434b51a 100644 --- a/desktop/src-tauri/tauri.conf.json +++ b/desktop/src-tauri/tauri.conf.json @@ -41,7 +41,8 @@ "binaries/xpbridge" ], "resources": { - "resources/web": "web" + "resources/web": "web", + "resources/plugins": "plugins" }, "createUpdaterArtifacts": true, "macOS": { diff --git a/desktop/ui/index.html b/desktop/ui/index.html index 052d8c6..39acf7c 100644 --- a/desktop/ui/index.html +++ b/desktop/ui/index.html @@ -65,6 +65,16 @@
Wähle Regionen für die Luftraum-Anzeige (Class B/C/D, Restricted, MOA …). USA ist frei; Europa braucht einen kostenlosen OpenAIP-API-Key.
+ + + +