From 5261a821156f0c7ff900bf9dfcec0375749cfd30 Mon Sep 17 00:00:00 2001 From: Andrew Zambazos Date: Tue, 14 Apr 2026 21:04:21 +1200 Subject: [PATCH] Add Linux prerequisites and tighten Windows cfg Update README: rename "Run (Windows dev)" to "Run (dev)", add a Linux (Ubuntu/Debian) prerequisites section with required apt packages and instructions to install Node/Rust and run dev, and clarify the Linux VM build step. Tweak src-tauri/src/main.rs to scope the windows_subsystem attribute to only non-debug Windows builds (add target_os = "windows" to the cfg_attr) to avoid extra console windows in release builds on Windows. --- README.md | 32 +++++++++++++++++++++++++++++--- src-tauri/src/main.rs | 5 ++++- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index baa25d9..df3731b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Animation and component architecture notes are in [src/styles/shell-guidelines.m npm install ``` -### Run (Windows dev) +### Run (dev) ```bash npm run dev @@ -43,6 +43,32 @@ npm run dev npm run build ``` +### Linux prerequisites (Ubuntu/Debian) + +Install system dependencies required by Tauri/WebKit: + +```bash +sudo apt update +sudo apt install -y \ + libwebkit2gtk-4.1-dev \ + libappindicator3-dev \ + librsvg2-dev \ + patchelf \ + build-essential \ + curl \ + wget \ + file \ + libssl-dev \ + libgtk-3-dev +``` + +Install Node.js LTS and Rust (if not already installed), then run: + +```bash +npm install +npm run dev +``` + ### Controller testing notes (Windows) - Connect an Xbox-compatible controller before launching dev mode. @@ -95,8 +121,8 @@ npm install ### Linux VM build (high-level) -- Install Rust, Node.js, and Tauri Linux prerequisites in the VM. -- Clone this repo in Linux VM. +- Install Rust, Node.js, and the Linux prerequisites above. +- Clone this repo in the Linux VM. - Run `npm install`. - Run `npm run dev` for integration checks in Linux session. - Run `npm run build` to produce Linux artifacts. diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 9445f39..795c4ea 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,5 +1,8 @@ // Prevents additional console window on Windows in release, DO NOT REMOVE!! -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] +#![cfg_attr( + all(target_os = "windows", not(debug_assertions)), + windows_subsystem = "windows" +)] fn main() { nebula_os_lib::run()