feat(app-tauri): packager les assets web en ressource et les résoudre depuis le resource dir (#68)
L'AppImage ne pouvait pas servir d'assets web : `resolve_web_root` ne connaissait que `IDEA_WEB_ROOT`, le dossier de l'exécutable et le cwd — aucun ne pointe vers un bundle packagé. - `bundle.resources` embarque les assets sous `web/`, `beforeBuildCommand` déclenche le build du frontend. - Le resource dir Tauri descend de `lib.rs` jusqu'à `EmbeddedServerController` via `AppState::build_with_resource_dir`, en gardant les constructeurs historiques comme façade. - `resolve_web_root` insère le candidat packagé juste après `IDEA_WEB_ROOT`, qui garde donc la priorité pour le développement. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -96,13 +96,14 @@ pub fn run() {
|
||||
.path()
|
||||
.app_data_dir()
|
||||
.expect("failed to resolve the app data directory");
|
||||
let resource_dir = app.path().resource_dir().ok();
|
||||
// Point the orchestrator's best-effort diagnostics at a persistent file
|
||||
// (`<app-data>/logs/idea.log`) so inter-agent rendezvous beacons survive a
|
||||
// click-launched AppImage (whose stderr is otherwise discarded). Best-effort:
|
||||
// if the file can't be opened the beacons simply stay on stderr.
|
||||
application::diag::set_log_path(app_data_dir.join("logs").join("idea.log"));
|
||||
application::diag!("[startup] IdeA launched; diagnostics log armed");
|
||||
let app_state = AppState::build(app_data_dir);
|
||||
let app_state = AppState::build_with_resource_dir(app_data_dir, resource_dir);
|
||||
|
||||
// Wire the domain event bus → Tauri events relay.
|
||||
events::spawn_relay(app.handle().clone(), &app_state.event_bus);
|
||||
|
||||
Reference in New Issue
Block a user