Skip to content

Commit 0f5e001

Browse files
committed
resource changes
1 parent 3e8d5ba commit 0f5e001

3 files changed

Lines changed: 34 additions & 0 deletions

File tree

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/pet/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ pet-windows-registry = { path = "../pet-windows-registry" }
1111
[target.'cfg(target_os = "windows")'.dependencies]
1212
msvc_spectre_libs = { version = "0.1.1", features = ["error"] }
1313

14+
[target.'cfg(target_os = "windows")'.build-dependencies]
15+
winresource = "0.1"
16+
1417
[target.'cfg(unix)'.dependencies]
1518
pet-homebrew = { path = "../pet-homebrew" }
1619

crates/pet/build.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
fn main() {
5+
#[cfg(target_os = "windows")]
6+
{
7+
let version = std::env::var("CARGO_PKG_VERSION").unwrap_or_else(|_| "0.1.0".to_string());
8+
9+
let mut res = winresource::WindowsResource::new();
10+
res.set("ProductName", "Python Environment Tools");
11+
res.set("FileDescription", "Python Environment Tools");
12+
res.set("CompanyName", "Microsoft Corporation");
13+
res.set("LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved.");
14+
res.set("OriginalFilename", "pet.exe");
15+
res.set("InternalName", "pet");
16+
res.set("FileVersion", &version);
17+
res.set("ProductVersion", &version);
18+
res.compile().expect("Failed to compile Windows resources");
19+
}
20+
}

0 commit comments

Comments
 (0)