mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2024-09-28 21:19:24 +00:00
add windows .exe icon
This commit is contained in:
parent
04fecdeee0
commit
fb253b7573
|
@ -92,6 +92,7 @@ xmltree = "0.10.3"
|
|||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
winapi = { version = "0.3", features = ["winuser"] }
|
||||
windres = "0.2"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
objc = "0.2.7"
|
||||
|
|
16
build.rs
16
build.rs
|
@ -1,7 +1,7 @@
|
|||
use std::env;
|
||||
|
||||
// #[cfg(feature = "generate-gl")]
|
||||
// use gl_generator::{Api, Fallbacks, Profile, Registry};
|
||||
#[cfg(target_os = "windows")]
|
||||
extern crate windres;
|
||||
|
||||
fn main() {
|
||||
// let dest = PathBuf::from(&env::var("OUT_DIR").unwrap());
|
||||
|
@ -9,15 +9,9 @@ fn main() {
|
|||
let is_android = cfg!(target_os = "android") || (cfg!(target_os = "linux") && target.contains("android")); // hack
|
||||
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
//
|
||||
// #[cfg(feature = "generate-gl")]
|
||||
// {
|
||||
// let mut file = File::create(&dest.join("gl_bindings.rs")).unwrap();
|
||||
//
|
||||
// Registry::new(Api::Gles2, (3, 0), Profile::Core, Fallbacks::All, [])
|
||||
// .write_bindings(gl_generator::StructGenerator, &mut file)
|
||||
// .unwrap();
|
||||
// }
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
windres::Build::new().compile("res/resources.rc").unwrap();
|
||||
|
||||
if target.contains("darwin") {
|
||||
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.15");
|
||||
|
|
1
res/resources.rc
Normal file
1
res/resources.rc
Normal file
|
@ -0,0 +1 @@
|
|||
0 ICON "sue.ico"
|
BIN
res/sue.ico
Normal file
BIN
res/sue.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Loading…
Reference in a new issue