forked from microsoft/python-environment-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
26 lines (24 loc) · 934 Bytes
/
build.rs
File metadata and controls
26 lines (24 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
fn main() {
#[cfg(target_os = "windows")]
{
if std::env::var("CARGO_BIN_NAME").is_err() {
return;
}
let version = std::env::var("CARGO_PKG_VERSION").unwrap_or_else(|_| "0.1.0".to_string());
let mut res = winresource::WindowsResource::new();
res.set("ProductName", "Python Environment Tools");
res.set("FileDescription", "Python Environment Tools");
res.set("CompanyName", "Microsoft Corporation");
res.set(
"LegalCopyright",
"Copyright (c) Microsoft Corporation. All rights reserved.",
);
res.set("OriginalFilename", "pet.exe");
res.set("InternalName", "pet");
res.set("FileVersion", &version);
res.set("ProductVersion", &version);
res.compile().expect("Failed to compile Windows resources");
}
}