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
This commit is contained in:
Fabian-Lars 2024-09-12 19:36:48 +02:00 committed by GitHub
parent 7eb1171e3a
commit 9d468774a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 17 additions and 8 deletions

View File

@ -0,0 +1,6 @@
---
tauri-build: 'patch:bug'
tauri-bundler: 'patch:bug'
---
The executable and NSIS installer on Windows will now use the `productName` config for the `FileDescription` property instead of `shortDescription`.

1
Cargo.lock generated
View File

@ -7120,6 +7120,7 @@ dependencies = [
"thiserror",
"time",
"ureq",
"url",
"uuid",
"walkdir",
"windows-registry",

View File

@ -673,9 +673,12 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
res.set("ProductName", product_name);
}
if let Some(short_description) = &config.bundle.short_description {
res.set("FileDescription", short_description);
}
let file_description = config
.product_name
.or_else(|| manifest.package.as_ref().map(|p| p.name.clone()))
.or_else(|| std::env::var("CARGO_PKG_NAME").ok());
res.set("FileDescription", &file_description.unwrap());
if let Some(copyright) = &config.bundle.copyright {
res.set("LegalCopyright", copyright);

View File

@ -35,7 +35,6 @@ ${StrLoc}
!define PRODUCTNAME "{{product_name}}"
!define VERSION "{{version}}"
!define VERSIONWITHBUILD "{{version_with_build}}"
!define SHORTDESCRIPTION "{{short_description}}"
!define HOMEPAGE "{{homepage}}"
!define INSTALLMODE "{{install_mode}}"
!define LICENSE "{{license}}"
@ -78,7 +77,7 @@ InstallDir "${PLACEHOLDER_INSTALL_DIR}"
VIProductVersion "${VERSIONWITHBUILD}"
VIAddVersionKey "ProductName" "${PRODUCTNAME}"
VIAddVersionKey "FileDescription" "${SHORTDESCRIPTION}"
VIAddVersionKey "FileDescription" "${PRODUCTNAME}"
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
VIAddVersionKey "FileVersion" "${VERSION}"
VIAddVersionKey "ProductVersion" "${VERSION}"

View File

@ -2675,7 +2675,7 @@
}
},
"obsoletes": {
"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).",
"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).",
"type": [
"array",
"null"

View File

@ -2675,7 +2675,7 @@
}
},
"obsoletes": {
"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).",
"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).",
"type": [
"array",
"null"

View File

@ -404,7 +404,7 @@ pub struct RpmConfig {
/// in order for the package to be installed.
pub conflicts: Option<Vec<String>>,
/// The list of RPM dependencies your application supersedes - if this package is installed,
/// packages listed as “obsoletes” will be automatically removed (if they are present).
/// packages listed as "obsoletes" will be automatically removed (if they are present).
pub obsoletes: Option<Vec<String>>,
/// The RPM release tag.
#[serde(default = "default_release")]