Skip to content

Commit 9d46877

Browse files
authored
fix(core): Use productName for FileDescription (#10975)
* fix(core): Use productName for FileDescription fixes #10968 fixes #10890 * just unwrap since winres will panic anyway or use the cargo.toml description which we don't want * regen * nsis
1 parent 7eb1171 commit 9d46877

7 files changed

Lines changed: 17 additions & 8 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
tauri-build: 'patch:bug'
3+
tauri-bundler: 'patch:bug'
4+
---
5+
6+
The executable and NSIS installer on Windows will now use the `productName` config for the `FileDescription` property instead of `shortDescription`.

Cargo.lock

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

crates/tauri-build/src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,12 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
673673
res.set("ProductName", product_name);
674674
}
675675

676-
if let Some(short_description) = &config.bundle.short_description {
677-
res.set("FileDescription", short_description);
678-
}
676+
let file_description = config
677+
.product_name
678+
.or_else(|| manifest.package.as_ref().map(|p| p.name.clone()))
679+
.or_else(|| std::env::var("CARGO_PKG_NAME").ok());
680+
681+
res.set("FileDescription", &file_description.unwrap());
679682

680683
if let Some(copyright) = &config.bundle.copyright {
681684
res.set("LegalCopyright", copyright);

crates/tauri-bundler/src/bundle/windows/templates/installer.nsi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ ${StrLoc}
3535
!define PRODUCTNAME "{{product_name}}"
3636
!define VERSION "{{version}}"
3737
!define VERSIONWITHBUILD "{{version_with_build}}"
38-
!define SHORTDESCRIPTION "{{short_description}}"
3938
!define HOMEPAGE "{{homepage}}"
4039
!define INSTALLMODE "{{install_mode}}"
4140
!define LICENSE "{{license}}"
@@ -78,7 +77,7 @@ InstallDir "${PLACEHOLDER_INSTALL_DIR}"
7877

7978
VIProductVersion "${VERSIONWITHBUILD}"
8079
VIAddVersionKey "ProductName" "${PRODUCTNAME}"
81-
VIAddVersionKey "FileDescription" "${SHORTDESCRIPTION}"
80+
VIAddVersionKey "FileDescription" "${PRODUCTNAME}"
8281
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
8382
VIAddVersionKey "FileVersion" "${VERSION}"
8483
VIAddVersionKey "ProductVersion" "${VERSION}"

crates/tauri-cli/config.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2675,7 +2675,7 @@
26752675
}
26762676
},
26772677
"obsoletes": {
2678-
"description": "The list of RPM dependencies your application supersedes - if this package is installed,\n packages listed as obsoletes will be automatically removed (if they are present).",
2678+
"description": "The list of RPM dependencies your application supersedes - if this package is installed,\n packages listed as \"obsoletes\" will be automatically removed (if they are present).",
26792679
"type": [
26802680
"array",
26812681
"null"

crates/tauri-schema-generator/schemas/config.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2675,7 +2675,7 @@
26752675
}
26762676
},
26772677
"obsoletes": {
2678-
"description": "The list of RPM dependencies your application supersedes - if this package is installed,\n packages listed as obsoletes will be automatically removed (if they are present).",
2678+
"description": "The list of RPM dependencies your application supersedes - if this package is installed,\n packages listed as \"obsoletes\" will be automatically removed (if they are present).",
26792679
"type": [
26802680
"array",
26812681
"null"

crates/tauri-utils/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ pub struct RpmConfig {
404404
/// in order for the package to be installed.
405405
pub conflicts: Option<Vec<String>>,
406406
/// The list of RPM dependencies your application supersedes - if this package is installed,
407-
/// packages listed as obsoletes will be automatically removed (if they are present).
407+
/// packages listed as "obsoletes" will be automatically removed (if they are present).
408408
pub obsoletes: Option<Vec<String>>,
409409
/// The RPM release tag.
410410
#[serde(default = "default_release")]

0 commit comments

Comments
 (0)