Skip to content

Commit 525aa9f

Browse files
authored
Add opusName parameter to signing (#274)
Fixes #272 Fixes #224
1 parent 28be1e6 commit 525aa9f

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed

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.

azure-pipelines/pre-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ extends:
2424
template: azure-pipelines/rust-package/pipeline.yml@templates
2525
parameters:
2626
binaryName: "pet"
27+
opusName: "Python Environment Tools"
2728
signing: true
2829
apiScanSoftwareVersion: 2024 # major version of `pet` for internal reporting
2930
tsa:

azure-pipelines/stable.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ extends:
1414
template: azure-pipelines/rust-package/pipeline.yml@templates
1515
parameters:
1616
binaryName: "pet"
17+
opusName: "Python Environment Tools"
1718
signing: true
1819
apiScanPublishSymbols: true
1920
apiScanSoftwareVersion: 2024 # major version of `pet` for internal reporting

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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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(
14+
"LegalCopyright",
15+
"Copyright (c) Microsoft Corporation. All rights reserved.",
16+
);
17+
res.set("OriginalFilename", "pet.exe");
18+
res.set("InternalName", "pet");
19+
res.set("FileVersion", &version);
20+
res.set("ProductVersion", &version);
21+
res.compile().expect("Failed to compile Windows resources");
22+
}
23+
}

0 commit comments

Comments
 (0)