Skip to content
168 changes: 147 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions alvr/dashboard/src/steamvr_launcher/linux_steamvr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) {
let steamvr_root_dir = match alvr_server_io::steamvr_root_dir() {
Ok(dir) => dir,
Err(e) => {
error!("Couldn't detect openvr or steamvr files. \
Please make sure you have installed and ran SteamVR at least once. \
Or if you're using Flatpak Steam, make sure to use ALVR Dashboard from Flatpak ALVR. {e}");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really not happy with losing the flatpak steam information, because I feel that that's quite useful. We should find some way to still print it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or actually, would two competing installations of flatpak steam steamvr and normal steamvr trip up steamlocate?
Since we need to make sure it'll find the directory of the one from flatpak steam, and this is actually realistic enough to occur on linux with users fucking around to see what actually works

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna test specifically flatpak usecase, but steamlocate-rs does support finding even multiple installations, including flatpak (i thought it will probably find it relative to $home first, not from flatpak, but will check anyway)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i realized that we might have a problem/solution for the flatpak problem

So in a nutshell, steamlocate-rs finds flatpak steam first, instead of native.
And we can launch either native or flatpak alvr (driver) from dashboard (which can be also launched from either flatpak or natively)
i wonder if we should allow user to choose from where to launch it?...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will make quick poc in this pr and see you opinion about this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...not gonna make a quick poc, because RLS is not recognizing types for steamlocate::SteamDir::locate_multiple and even specifying them manually, doesn't make it work still... (compiler does work fine though)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in a nutshell, steamlocate-rs finds flatpak steam first, instead of native.

Does this also occur if ran from native and not just in flatpak? If so that's a straight up blocker (at least for using it to locate the steamvr root, failing to do mess around with the unblocking isn't too bad)

error!("{e}");
return;
}
};
Expand Down
4 changes: 4 additions & 0 deletions alvr/server_io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ encoding_rs_io = "0.1"
dirs = "6"
runas = "^1.2" # version 1.1 is broken
serde_json = "1"
steamlocate = { git = "https://github.com/WilliamVenner/steamlocate-rs.git", rev = "6fc7aeef928a5b9cc40823a02de61ed0cc38a759" }

[dev-dependencies]
tempfile = "3.20.0"

[target.'cfg(not(target_os = "linux"))'.dependencies]
cpal = "0.15"
Loading