Skip to content

Commit

Permalink
chore(release): 0.1.1 [skip ci]
Browse files Browse the repository at this point in the history
### [0.1.1](v0.1.0...v0.1.1) (2022-04-26)

### Documentation

* fix license field ([2c57a1b](2c57a1b))

### Continuous Integration

* add github workflow ([2976f65](2976f65))
  • Loading branch information
semantic-release-bot committed Apr 26, 2022
1 parent 2976f65 commit e230734
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### [0.1.1](https://github.com/meskill/mystic-light-sdk/compare/v0.1.0...v0.1.1) (2022-04-26)


### Documentation

* fix license field ([2c57a1b](https://github.com/meskill/mystic-light-sdk/commit/2c57a1b5dfc5b0233fdf5967e024bf19544c4399))


### Continuous Integration

* add github workflow ([2976f65](https://github.com/meskill/mystic-light-sdk/commit/2976f65ff773b7db140c61d1f199d6bbc6060b1f))
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mystic_light_sdk"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
authors = ["meskill"]
description = "A Rust wrapper for the MysticLight SDK (MSI hardware and peripherals)"
Expand All @@ -23,4 +23,4 @@ widestring = "0.4.3" # version compatible with `oaidl`
winapi = { version = "0.3.9" }

[build-dependencies]
copy_dir = "0.1.2"
copy_dir = "0.1.2"
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![Maintenance](https://img.shields.io/badge/maintenance-passively--maintained-yellowgreen.svg)

# mystic_light_sdk

Rust SDK wrapper for the [Mystic Light SDK](https://www.msi.com/Landing/mystic-light-rgb-gaming-pc/download)
Expand Down Expand Up @@ -85,27 +87,24 @@ You may use build script below in order to copy sdk files to the output dir. In

```rust
use std::env;
use std::path::{Path, PathBuf};

fn get_output_path() -> PathBuf {
//<root or manifest path>/target/<profile>/
let manifest_dir_string = env::var("CARGO_MANIFEST_DIR").unwrap();
let build_type = env::var("PROFILE").unwrap();
let target = env::var("TARGET").unwrap();
let path = Path::new(&manifest_dir_string)
.join("target")
.join(target)
.join(build_type);
return PathBuf::from(path);
}
use std::path::Path;

fn main() -> std::io::Result<()> {
println!("cargo:rerun-if-changed=sdk");

let current_dir = env::current_dir()?;
let out_dir = get_output_path();
let out_dir = env::var("OUT_DIR").unwrap();

let from_path = current_dir.join("sdk");
let dest_path = Path::new(&out_dir).join("sdk");

let dest_path = Path::new(&out_dir)
.parent()
.unwrap()
.parent()
.unwrap()
.parent()
.unwrap()
.join("sdk");

if !dest_path.exists() {
copy_dir::copy_dir(from_path, dest_path)?;
Expand Down

0 comments on commit e230734

Please sign in to comment.