-
Notifications
You must be signed in to change notification settings - Fork 28
Build from source
Preferred IDE (optional): Visual Studio Code with rust-analyzer extension
- Install rustup
- Install LLVM
- Install MSVC compiler (for example from C++ build tools with Visual Studio)
On the repository root execute:
cargo xtask build-server --release
ALVR server will be built into /build/alvr_server_windows
.
Install npm.
cargo install wasm-pack
cargo xtask build-server --release --new-dashboard
To debug cd into alvr/dashboard
, run npm start
and open localhost:8080
in the browser. The ALVR server must be running for the dashboard to load.
- Install rustup
- Install LLVM
- Latest version of Android Studio, SDK level 30, NDK v22
- Environment variable
JAVA_HOME
set toC:\Program Files\Android\Android Studio\jre
- Environment variable
ANDROID_SDK_ROOT
set to%LOCALAPPDATA%\Android\Sdk
- For building Android dependencies (optional): Python
On the repository root execute:
cargo xtask build-android-deps
cargo xtask build-client --release
ALVR client APKs will be built as /build/alvr_client_*.apk
.
Note: You can debug the client normally by opening the Android Studio project at alvr/client/android
.
Note: If you have problems running build-android-deps
:
- Go to the nightly CI runs list
- Open the latest workflow run
- Download the artifact
android-deps
- Create a
deps
folder on the project root - Unzip
android-deps.zip
inside thedeps
folder. You should have the filedeps/rust-android-gradle/runst-android-0.8.3.jar
- AMD using radv is known to work, with hardware encoding
- AMD using amdvlk does not work
- NVIDIA using proprietary driver works, with software encoding
- Intel is untested
You need rustup and the following platform specific dependencies:
sudo apt install build-essential pkg-config libclang-dev libssl-dev libasound2-dev libgtk-3-dev libvulkan-dev libunwind-dev gcc-8 g++-8 yasm nasm
media-video/ffmpeg >= 4.4 [encode vulkan vaapi]
sys-libs/libunwind
dev-lang/rust >= 1.51
Use the shell.nix
in alvr/xtask
.
cargo xtask build-server --release
Or, if the ffmpeg package provided by your distribution does not have vulkan support enabled (such as Ubuntu)
cargo xtask build-server --release --bundle-ffmpeg
Steam Native on some distro's runs this a little better. To get Steam Native on Ubuntu run it with:
env STEAM_RUNTIME=0 steam
Dependencies might be missing then, so run:
$ cd ~/.steam/root/ubuntu12_32
$ file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq