-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.afdesign filter=lfs diff=lfs merge=lfs -text | ||
*.png filter=lfs diff=lfs merge=lfs -text | ||
*.ico filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#[cfg(target_os = "windows")] | ||
pub fn add_resource(name: String) { | ||
let out_dir = std::env::var("OUT_DIR").expect("No OUT_DIR env var"); | ||
|
||
if !std::process::Command::new("rc.exe") | ||
.args(["/fo", &format!("{}/{}.lib", &out_dir, &name), "/I", &out_dir, &(name.to_owned() + &String::from(".rc"))]) | ||
.status() | ||
.expect("Could not find rc.exe") | ||
.success() | ||
{ | ||
panic!("Failed to build resource file"); | ||
} | ||
|
||
println!("cargo:rustc-link-search=native={}", &out_dir); | ||
println!("cargo:rustc-link-lib=dylib={}", &name); | ||
} | ||
|
||
#[cfg(target_os = "windows")] | ||
fn main() { | ||
add_resource(String::from("resources")); | ||
} | ||
|
||
#[cfg(not(target_os = "windows"))] | ||
fn main() {} |
Git LFS file not shown
Binary file not shown.