add windows .exe icon

This commit is contained in:
Alula 2022-03-22 04:46:51 +01:00
parent 04fecdeee0
commit fb253b7573
No known key found for this signature in database
GPG Key ID: 3E00485503A1D8BA
4 changed files with 7 additions and 11 deletions

View File

@ -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"

View File

@ -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
View File

@ -0,0 +1 @@
0 ICON "sue.ico"

BIN
res/sue.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB