Pin MoltenVK version to v1.0.37 (#5)

This commit is contained in:
Johan Andersson 2019-10-28 16:46:57 +01:00 committed by GitHub
parent 9f6c298703
commit c2b15c989e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 4 deletions

View file

@ -1,7 +1,7 @@
[package] [package]
name = "ash-molten" name = "ash-molten"
description = "Statically linked MoltenVK for Vulkan on Mac using Ash" description = "Statically linked MoltenVK for Vulkan on Mac using Ash"
version = "0.1.0" version = "0.2.0+37"
authors = ["Embark <opensource@embark-studios.com>", "Maik Klein <maik.klein@embark-studios.com>"] authors = ["Embark <opensource@embark-studios.com>", "Maik Klein <maik.klein@embark-studios.com>"]
edition = "2018" edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"

View file

@ -45,9 +45,20 @@ You can run the example with `cargo run`.
### Features ### Features
`cargo build` will clone the newest master of [MoltenVK](https://github.com/KhronosGroup/MoltenVK) compile and statically link it with your application. `cargo build` will clone a specific release of [MoltenVK](https://github.com/KhronosGroup/MoltenVK) compile and statically link it with your application.
If you want to compile [MoltenVK](https://github.com/KhronosGroup/MoltenVK) yourself, you can use the `external` feature. `cargo build --features external` requires `libMoltenVK` to be visible (`LD_LIBRARY_PATH`). If you want to compile [MoltenVK](https://github.com/KhronosGroup/MoltenVK) yourself, you can use the `external` feature. `cargo build --features external` requires `libMoltenVK` to be visible (`LD_LIBRARY_PATH`).
### How to update
To update the version of [MoltenVK](https://github.com/KhronosGroup/MoltenVK) uses, change the following:
- In `build.rs`, change `let tag = "v1.0.37"` to the new [MoltenVK release](https://github.com/KhronosGroup/MoltenVK/releases) tag name
- Update the crate version in `Cargo.toml`
- Bump the patch version
- Set the version metadata to the MoltenVK release.
- E.g. `0.2.0+37` -> `0.2.1+38`.
## Contributing ## Contributing
We welcome community contributions to this project. We welcome community contributions to this project.

View file

@ -28,8 +28,11 @@ mod mac {
}, },
}; };
let checkout_dir = // MoltenVK git tagged release to use
Path::new(&std::env::var("OUT_DIR").expect("Couldn't find OUT_DIR")).join("MoltenVK"); let tag = "v1.0.37";
let checkout_dir = Path::new(&std::env::var("OUT_DIR").expect("Couldn't find OUT_DIR"))
.join(format!("MoltenVK-{}", tag));
let exit = Arc::new(AtomicBool::new(false)); let exit = Arc::new(AtomicBool::new(false));
let wants_exit = exit.clone(); let wants_exit = exit.clone();
@ -59,6 +62,10 @@ mod mac {
} else { } else {
Command::new("git") Command::new("git")
.arg("clone") .arg("clone")
.arg("--branch")
.arg(tag.to_owned())
.arg("--depth")
.arg("1")
.arg("https://github.com/KhronosGroup/MoltenVK.git") .arg("https://github.com/KhronosGroup/MoltenVK.git")
.arg(&checkout_dir) .arg(&checkout_dir)
.spawn() .spawn()