diff --git a/.github/workflows/gradle.yaml b/.github/workflows/gradle.yaml index e5956d47ae..3e90c7d18e 100644 --- a/.github/workflows/gradle.yaml +++ b/.github/workflows/gradle.yaml @@ -144,7 +144,7 @@ jobs: bundle-linux: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: [build, test] if: contains(fromJSON('["workflow_dispatch", "create"]'), github.event_name) steps: @@ -160,14 +160,25 @@ jobs: - name: Set up Linux dependencies uses: awalsh128/cache-apt-pkgs-action@latest with: - packages: libgtk-3-dev webkit2gtk-4.1 libappindicator3-dev librsvg2-dev patchelf libfuse2 + packages: | + build-essential curl wget file libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev # Increment to invalidate the cache - version: 1.0 + version: 2.0 # Enables a workaround to attempt to run pre and post install scripts execute_install_scripts: true # Disables uploading logs as a build artifact debug: false + - name: Set up specific Linux versioned dependencies + run: | + sudo apt-get update && sudo apt-get install -y \ + libwebkit2gtk-4.1-0=2.44.0-2 \ + libwebkit2gtk-4.1-dev=2.44.0-2 \ + libjavascriptcoregtk-4.1-0=2.44.0-2 \ + libjavascriptcoregtk-4.1-dev=2.44.0-2 \ + gir1.2-javascriptcoregtk-4.1=2.44.0-2 \ + gir1.2-webkit2-4.1=2.44.0-2; + - name: Cache cargo dependencies uses: Swatinem/rust-cache@v2 with: diff --git a/Cargo.lock b/Cargo.lock index 2c3cd46f2f..23fc1864de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1837,6 +1837,24 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + [[package]] name = "hyper-util" version = "0.1.9" @@ -3124,6 +3142,55 @@ dependencies = [ "memchr", ] +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring", + "rustc-hash", + "rustls", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "quote" version = "1.0.37" @@ -3283,6 +3350,7 @@ dependencies = [ "http-body", "http-body-util", "hyper", + "hyper-rustls", "hyper-util", "ipnet", "js-sys", @@ -3291,11 +3359,16 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", + "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", + "tokio-rustls", "tokio-util", "tower-service", "url", @@ -3303,6 +3376,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", + "webpki-roots", "windows-registry", ] @@ -3329,12 +3403,33 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.15", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "rustc-demangle" version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" + [[package]] name = "rustc_version" version = "0.4.1" @@ -3357,6 +3452,46 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.23.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "ryu" version = "1.0.18" @@ -3780,6 +3915,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -3824,6 +3965,12 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "swift-rs" version = "1.0.7" @@ -4397,6 +4544,17 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.12" @@ -4681,6 +4839,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.5.2" @@ -4996,6 +5160,15 @@ dependencies = [ "system-deps", ] +[[package]] +name = "webpki-roots" +version = "0.26.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "webview2-com" version = "0.33.0" @@ -5589,6 +5762,12 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + [[package]] name = "zvariant" version = "4.0.0" diff --git a/gui/src-tauri/Cargo.toml b/gui/src-tauri/Cargo.toml index b42e91bffb..2f6985599f 100644 --- a/gui/src-tauri/Cargo.toml +++ b/gui/src-tauri/Cargo.toml @@ -28,7 +28,7 @@ shadow-rs = "0.35" [dependencies] serde_json = "1" serde = { version = "1", features = ["derive"] } -tauri = { version = "2.0", features = ["devtools", "tray-icon", "image-png"] } +tauri = { version = "2.0", features = ["devtools", "tray-icon", "image-png", "rustls-tls"] } tauri-runtime = "2.0" tauri-plugin-dialog = "2.0" tauri-plugin-fs = "2.0" diff --git a/gui/src-tauri/src/main.rs b/gui/src-tauri/src/main.rs index d319286f95..337ca37b59 100644 --- a/gui/src-tauri/src/main.rs +++ b/gui/src-tauri/src/main.rs @@ -90,8 +90,12 @@ fn main() -> Result<()> { .log_to_file( FileSpec::default().directory(path.expect("We need a log dir")), ) - .format_for_files(util::logger_format) - .format_for_stderr(util::logger_format) + .format_for_files(|w, now, record| { + util::logger_format(w, now, record, false) + }) + .format_for_stderr(|w, now, record| { + util::logger_format(w, now, record, true) + }) .rotate( Criterion::Age(Age::Day), Naming::Timestamps, diff --git a/gui/src-tauri/src/tray.rs b/gui/src-tauri/src/tray.rs index 0f741e1275..0ca65a49df 100644 --- a/gui/src-tauri/src/tray.rs +++ b/gui/src-tauri/src/tray.rs @@ -1,7 +1,7 @@ use std::{collections::HashMap, sync::Mutex}; use tauri::{ - image::Image, + include_image, menu::{Menu, MenuBuilder, MenuItemBuilder, MenuItemKind}, tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent}, AppHandle, Emitter, Manager, Runtime, State, @@ -107,10 +107,10 @@ pub fn create_tray(app: &tauri::AppHandle) -> tauri::Result<()> { .icon_as_template(true) .menu_on_left_click(false) .icon(if cfg!(target_os = "macos") { - Image::from_bytes(include_bytes!("../icons/appleTrayIcon.png")) + include_image!("icons/appleTrayIcon.png") } else { - Image::from_bytes(include_bytes!("../icons/128x128.png")) - }?) + include_image!("icons/128x128.png") + }) .on_menu_event(move |app, event| match event.id.as_ref() { "quit" => app.emit("try-close", "tray").unwrap(), "toggle" => { diff --git a/gui/src-tauri/src/util.rs b/gui/src-tauri/src/util.rs index feb2b2d13d..f47fdb0c98 100644 --- a/gui/src-tauri/src/util.rs +++ b/gui/src-tauri/src/util.rs @@ -107,7 +107,8 @@ pub fn show_error(text: &str) -> bool { .set_description(text) .set_buttons(MessageButtons::Ok) .set_level(MessageLevel::Error) - .show() == MessageDialogResult::Ok + .show() + == MessageDialogResult::Ok } #[cfg(mobile)] @@ -222,20 +223,26 @@ pub fn logger_format( w: &mut dyn std::io::Write, _now: &mut DeferredNow, record: &Record, + ansi: bool, ) -> Result<(), std::io::Error> { let level = record.level(); let module_path = record.module_path().unwrap_or(""); - // optionally print target + // Optionally print target let target = if module_path.starts_with(record.target()) { "".to_string() } else { format!(", {}", record.target()) }; - write!( - w, - "{} [{}{target}] {}", - style(level).paint(level.to_string()), - record.module_path().unwrap_or(""), - style(level).paint(record.args().to_string()) - ) + // A toggle for ansi formatting, mainly disabled for file logs, but enabled for terminal logs. + if ansi { + write!( + w, + "{} [{}{target}] {}", + style(level).paint(level.to_string()), + module_path, + style(level).paint(record.args().to_string()) + ) + } else { + write!(w, "{} [{}{target}] {}", level, module_path, record.args()) + } } diff --git a/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsBuilder.java b/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsBuilder.java index 6aed2000fc..97d17549fd 100644 --- a/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsBuilder.java +++ b/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsBuilder.java @@ -191,7 +191,9 @@ public static int createModelSettings( humanPoseManager.getToggle(SkeletonConfigToggles.TOE_SNAP), humanPoseManager.getToggle(SkeletonConfigToggles.FOOT_PLANT), humanPoseManager.getToggle(SkeletonConfigToggles.SELF_LOCALIZATION), - false + false, + true, + true ); int ratiosOffset = ModelRatios .createModelRatios( diff --git a/solarxr-protocol b/solarxr-protocol index 5b942415ab..aa69fb6e56 160000 --- a/solarxr-protocol +++ b/solarxr-protocol @@ -1 +1 @@ -Subproject commit 5b942415ab8a85206ebd0a92eec89c3f0134614d +Subproject commit aa69fb6e56b88a206010d1cb75bfa0edde5b4582