windows: Implement app_version (#9410)

#### Call `app_version`:

![Screenshot 2024-03-16
011821](https://github.com/zed-industries/zed/assets/14981363/9e618e49-fee2-4e7a-b884-6b0be05a0c95)

#### `Zed.exe` info:

![Screenshot 2024-03-16
011856](https://github.com/zed-industries/zed/assets/14981363/2b17a5df-ad38-42d0-8396-53680d77101d)


Release Notes:

- N/A
This commit is contained in:
张小白 2024-03-20 03:40:57 +08:00 committed by GitHub
parent cfa0fc96f0
commit 85c294da9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 129 additions and 6 deletions

View file

@ -44,7 +44,8 @@ fn main() {
}
}
if std::env::var("CARGO_CFG_TARGET_ENV").ok() == Some("msvc".to_string()) {
#[cfg(target_os = "windows")]
{
// todo(windows): This is to avoid stack overflow. Remove it when solved.
println!("cargo:rustc-link-arg=/stack:{}", 8 * 1024 * 1024);
@ -56,5 +57,11 @@ fn main() {
"cargo:rustc-link-arg-bins=/MANIFESTINPUT:{}",
manifest.canonicalize().unwrap().display()
);
let res = winresource::WindowsResource::new();
if let Err(e) = res.compile() {
eprintln!("{}", e);
std::process::exit(1);
}
}
}