Compare commits

...

5 Commits

Author SHA1 Message Date
AnnoyingRains
3dc32ed3ae Merge branch 'StardustXR:dev' into dev 2025-08-31 02:18:41 +10:00
Schmarni
01ec90c699 fix(hexagon_launcher): use the proper resource init function
Signed-off-by: Schmarni <marnistromer@gmail.com>
2025-08-30 18:15:47 +02:00
Schmarni
e60463081e Revert "fix hexagon_launcher crashing (#8)"
This reverts commit 62b0fe8240.
This fix only stopped hexagon_launcher from exiting properly upon
receiving a fatal error
2025-08-30 18:09:23 +02:00
AnnoyingRains
cbd99c2cc7 fix: nix 2025-08-31 01:40:41 +10:00
Leah Anderson
62b0fe8240 fix hexagon_launcher crashing (#8) 2025-07-05 13:38:39 -07:00
3 changed files with 15 additions and 24 deletions

17
flake.lock generated
View File

@@ -1,17 +1,12 @@
{ {
"nodes": { "nodes": {
"crane": { "crane": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1712681629, "lastModified": 1755993354,
"narHash": "sha256-bMDXn4AkTXLCpoZbII6pDGoSeSe9gI87jxPsHRXgu/E=", "narHash": "sha256-FCRRAzSaL/+umLIm3RU3O/+fJ2ssaPHseI2SSFL8yZU=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "220387ac8e99cbee0ca4c95b621c4bc782b6a235", "rev": "25bd41b24426c7734278c2ff02e53258851db914",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -22,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1712791164, "lastModified": 1756386758,
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", "narHash": "sha256-1wxxznpW2CKvI9VdniaUnTT2Os6rdRJcRUf65ZK9OtE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", "rev": "dfb2f12e899db4876308eba6d93455ab7da304cd",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -2,7 +2,6 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
crane = { crane = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:ipetkov/crane"; url = "github:ipetkov/crane";
}; };
}; };
@@ -13,9 +12,9 @@
forAllSystems = nixpkgs.lib.genAttrs supportedSystems; forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in { in {
packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in { packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; craneLib = crane.mkLib pkgs; in {
default = crane.lib.${system}.buildPackage { default = craneLib.buildPackage {
pname = "protostar"; pname = "hexagon-launcher";
version = "0.1.0"; version = "0.1.0";
src = ./.; src = ./.;

View File

@@ -5,24 +5,24 @@ use app::App;
use color_eyre::eyre::Result; use color_eyre::eyre::Result;
use glam::Quat; use glam::Quat;
use hex::{HEX_CENTER, HEX_DIRECTION_VECTORS}; use hex::{HEX_CENTER, HEX_DIRECTION_VECTORS};
use manifest_dir_macros::directory_relative_path; use protostar::xdg::{DesktopFile, get_desktop_files, parse_desktop_file};
use protostar::xdg::{get_desktop_files, parse_desktop_file, DesktopFile};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use stardust_xr_fusion::{ use stardust_xr_fusion::{
ClientHandle,
client::Client, client::Client,
core::values::{ core::values::{
color::{color_space::LinearRgb, rgba_linear, Rgba},
ResourceID, ResourceID,
color::{Rgba, color_space::LinearRgb, rgba_linear},
}, },
drawable::{MaterialParameter, Model, ModelPartAspect}, drawable::{MaterialParameter, Model, ModelPartAspect},
node::NodeError, node::NodeError,
project_local_resources,
root::{ClientState, FrameInfo, RootAspect, RootEvent}, root::{ClientState, FrameInfo, RootAspect, RootEvent},
spatial::{Spatial, SpatialAspect, Transform}, spatial::{Spatial, SpatialAspect, Transform},
ClientHandle,
}; };
use stardust_xr_molecules::{ use stardust_xr_molecules::{
button::{Button, ButtonSettings},
FrameSensitive, Grabbable, GrabbableSettings, PointerMode, UIElement, FrameSensitive, Grabbable, GrabbableSettings, PointerMode, UIElement,
button::{Button, ButtonSettings},
}; };
use std::{f32::consts::PI, sync::Arc, time::Duration}; use std::{f32::consts::PI, sync::Arc, time::Duration};
@@ -43,12 +43,9 @@ async fn main() -> Result<()> {
.pretty() .pretty()
.init(); .init();
let owned_client = Client::connect().await?; let owned_client = Client::connect().await?;
owned_client.setup_resources(&[&project_local_resources!("../res")])?;
let client = owned_client.handle(); let client = owned_client.handle();
let async_loop = owned_client.async_event_loop(); let async_loop = owned_client.async_event_loop();
client
.get_root()
.set_base_prefixes(&[directory_relative_path!("../res").to_string()])
.unwrap();
let mut grid = AppHexGrid::new(&client).await; let mut grid = AppHexGrid::new(&client).await;
let mut owned_client = async_loop.stop().await.unwrap(); let mut owned_client = async_loop.stop().await.unwrap();
let event_loop = owned_client.sync_event_loop(|handle, _| { let event_loop = owned_client.sync_event_loop(|handle, _| {