-
Notifications
You must be signed in to change notification settings - Fork 65
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
1 parent
9182ade
commit 71244cf
Showing
4 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,27 @@ | ||
fn main() { | ||
#[cfg(target_os = "windows")] | ||
{ | ||
use image::io::Reader as ImageReader; | ||
use std::{ | ||
env, | ||
fs::File, | ||
Check warning on line 7 in neothesia/build.rs GitHub Actions / build_windows
|
||
path::{Path, PathBuf}, | ||
}; | ||
|
||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); | ||
let out_ico = out_dir.join("icon.ico"); | ||
let out_manifest = out_dir.join("manifest.rc"); | ||
|
||
let img = ImageReader::open("../flatpak/com.github.polymeilex.neothesia.png") | ||
.unwrap() | ||
.decode() | ||
.unwrap(); | ||
|
||
img.save(&out_ico); | ||
Check warning on line 20 in neothesia/build.rs GitHub Actions / build_windows
|
||
|
||
let manifest = "neothesia_icon ICON \"icon.ico\""; | ||
std::fs::write(&out_manifest, &manifest); | ||
Check warning on line 23 in neothesia/build.rs GitHub Actions / build_windows
|
||
|
||
embed_resource::compile(&out_manifest, embed_resource::NONE); | ||
} | ||
} |
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