Skip to content

Commit

Permalink
Bump version and split alvr_xtask
Browse files Browse the repository at this point in the history
  • Loading branch information
zmerp committed Aug 4, 2020
1 parent 91df317 commit 1e1d2b6
Show file tree
Hide file tree
Showing 17 changed files with 540 additions and 536 deletions.
43 changes: 20 additions & 23 deletions Cargo.lock

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

10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,21 @@ If you have a version prior to v12.0 you need to launch `remove_firewall_rules.b
- Install Visual Studio Code and the extension rust-analyzer (optional)
- Install [LLVM](https://releases.llvm.org/download.html)
- Install the MSVC compiler (for example installing C++ build tools with [Visual Studio](https://visualstudio.microsoft.com/downloads))
- Install Android Studio >=4.0, API Level 30. Requires LLDB and NDK. The environment variable `JAVA_HOME` must be set.
- Install Android Studio >=4.0, API Level 30. Requires LLDB and NDK.
- Set the environment variable `JAVA_HOME` to `C:\Program Files\Android\androidStudio\jre`.
- Install [rustup](https://rustup.rs/)
- Download this repository and on the project root execute:

```bash
cargo xtask build-all --release
cargo xtask build-server --release
cargo xtask build-client --release
```

- ALVR server and client will be in `/build`.

Note: The Visual Studio solution is left only for IDE support while coding. If compiled, the resulting binary will not be valid.
Notes:
To debug the client you can just open Android Studio, connect your Oculus Quest and press run, without the above cargo commands.
The Visual Studio solution is left only for IDE support while coding. If compiled, the resulting binary will not be valid.

## License

Expand Down
2 changes: 1 addition & 1 deletion alvr/client_hmd/.idea/misc.xml

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

4 changes: 2 additions & 2 deletions alvr/client_hmd/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "com.polygraphene.alvr"
minSdkVersion 24
targetSdkVersion 30
versionCode 30
versionName "12.0"
versionCode 31
versionName "12.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
Expand Down
22 changes: 17 additions & 5 deletions alvr/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
[package]
name = 'alvr_common'
version = '12.0.0-beta.3'
version = '12.0.0'
authors = ['Riccardo Zaglia <[email protected]>']
license = 'MIT'
edition = '2018'

[dependencies]
regex = '^1.3.9'
semver = '^0.10.0'
serde = { version = '^1.0', features = ['derive'] }
serde_json = '^1.0'
log = '^0.4.8'
backtrace = '^0.3.46'
settings-schema = { git = 'https://github.com/zarik5/settings-schema-rs', features = ['rename_camel_case'] }
sysinfo = '^0.14.1'
alvr_xtask = { path = '../xtask' }
sysinfo = '^0.15.0'
runas = '^0.2.1'
# cpal = { git = 'https://github.com/RustAudio/cpal' }
winapi = { version = '^0.3.8', features = ['mmdeviceapi', 'propsys', 'coml2api', 'propidl', 'functiondiscoverykeys_devpkey', 'wtypes'] }

[target.'cfg(windows)'.dependencies]
winapi = { version = '^0.3.8', features = [
'mmdeviceapi',
'propsys',
'coml2api',
'propidl',
'functiondiscoverykeys_devpkey',
'wtypes',
'objbase',
] }
wio = '^0.2.2'
widestring = '^0.4.2'
winreg = '^0.7.0'

[build-dependencies]
alvr_xtask = { path = '../xtask' }
toml = '^0.5.6'
29 changes: 20 additions & 9 deletions alvr/common/build.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
fn main() {
use std::{fs, path::Path};

fn get_version(dir_name: &str) -> String {
let cargo_data = toml::from_slice::<toml::Value>(
&fs::read(Path::new("..").join(dir_name).join("Cargo.toml")).unwrap(),
)
.unwrap();

println!(
"cargo:rustc-env=SERVER_VERSION={}",
alvr_xtask::server_version()
);
cargo_data["package"]["version"].as_str().unwrap().into()
}

// println!(
// "cargo:rustc-env=CLIENT_VERSION={}",
// alvr_xtask::client_version()
// );
pub fn server_version() -> String {
get_version("server_driver")
}

// pub fn client_version() -> String {
// get_version("client_hmd")
// }

fn main() {
println!("cargo:rustc-env=SERVER_VERSION={}", server_version());
// println!("cargo:rustc-env=CLIENT_VERSION={}", client_version());
}
2 changes: 1 addition & 1 deletion alvr/common/src/data/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub const ALVR_NAME: &str = "ALVR";
pub const ALVR_SERVER_VERSION: &str = env!("SERVER_VERSION");
pub const ALVR_CLIENT_VERSION: &str = "12.0.0";

pub const ALVR_SERVER_VERSION_REQ: &str = ">=12.0.0-beta.3";
pub const ALVR_SERVER_VERSION_REQ: &str = ">=12.0.0";
pub const ALVR_CLIENT_VERSION_REQ: &str = ">=12.0.0";

pub fn is_version_compatible(version: &str, requirement: &str) -> StrResult<bool> {
Expand Down
Loading

0 comments on commit 1e1d2b6

Please sign in to comment.