windows: Move manifest file to gpui (#11036)

This is a follow up of #10810 , `embed-resource` crate uses a different
method to link the manifest file, so this makes moving manifest file to
`gpui` possible.

Now, examples can run as expected:
![Screenshot 2024-04-26
111559](https://github.com/zed-industries/zed/assets/14981363/bb040690-8129-490b-83b3-0a7d3cbd4953)

TODO:
- [ ] check if it builds with gnu toolchain

Release Notes:

- N/A
This commit is contained in:
张小白 2024-04-27 04:56:48 +08:00 committed by GitHub
parent 6a915e349c
commit 268cb948a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 62 additions and 21 deletions

View file

@ -52,14 +52,11 @@ fn main() {
println!("cargo:rustc-link-arg=/stack:{}", 8 * 1024 * 1024);
}
let manifest = std::path::Path::new("resources/windows/manifest.xml");
let icon = std::path::Path::new("resources/windows/app-icon.ico");
println!("cargo:rerun-if-changed={}", manifest.display());
println!("cargo:rerun-if-changed={}", icon.display());
let mut res = winresource::WindowsResource::new();
res.set_icon(icon.to_str().unwrap());
res.set_manifest_file(manifest.to_str().unwrap());
if let Err(e) = res.compile() {
eprintln!("{}", e);