Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Use productName for FileDescription #10976

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/fix-tauri-build-filedescription.md
Original file line number Diff line number Diff line change
@@ -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`.
13 changes: 10 additions & 3 deletions core/tauri-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,12 +537,19 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
res.set("FileVersion", version_str);
res.set("ProductVersion", version_str);
}

if let Some(product_name) = &config.package.product_name {
res.set("ProductName", product_name);
}
if let Some(short_description) = &config.tauri.bundle.short_description {
res.set("FileDescription", short_description);
}

let file_description = config
.package
.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.tauri.bundle.copyright {
res.set("LegalCopyright", copyright);
}
Expand Down
4 changes: 2 additions & 2 deletions core/tauri-config-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@
]
},
"identifier": {
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`). This string must be unique across applications since it is used in system configurations like the bundle ID and path to the webview data directory. This string must contain only alphanumeric characters (AZ, az, and 09), hyphens (-), and periods (.).",
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`). This string must be unique across applications since it is used in system configurations like the bundle ID and path to the webview data directory. This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-), and periods (.).",
"type": "string"
},
"publisher": {
Expand Down Expand Up @@ -1509,7 +1509,7 @@
}
},
"obsoletes": {
"description": "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).",
"description": "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).",
"type": [
"array",
"null"
Expand Down
4 changes: 2 additions & 2 deletions core/tauri-utils/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,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")]
Expand Down Expand Up @@ -847,7 +847,7 @@ pub struct BundleConfig {
/// The application identifier in reverse domain name notation (e.g. `com.tauri.example`).
/// This string must be unique across applications since it is used in system configurations like
/// the bundle ID and path to the webview data directory.
/// This string must contain only alphanumeric characters (AZ, az, and 09), hyphens (-),
/// This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),
/// and periods (.).
pub identifier: String,
/// The application's publisher. Defaults to the second element in the identifier string.
Expand Down
4 changes: 2 additions & 2 deletions tooling/bundler/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ ${StrLoc}
!define PRODUCTNAME "{{product_name}}"
!define VERSION "{{version}}"
!define VERSIONWITHBUILD "{{version_with_build}}"
!define SHORTDESCRIPTION "{{short_description}}"
!define INSTALLMODE "{{install_mode}}"
!define LICENSE "{{license}}"
!define INSTALLERICON "{{installer_icon}}"
Expand Down Expand Up @@ -50,7 +49,7 @@ OutFile "${OUTFILE}"

VIProductVersion "${VERSIONWITHBUILD}"
VIAddVersionKey "ProductName" "${PRODUCTNAME}"
VIAddVersionKey "FileDescription" "${SHORTDESCRIPTION}"
VIAddVersionKey "FileDescription" "${PRODUCTNAME}"
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
VIAddVersionKey "FileVersion" "${VERSION}"
VIAddVersionKey "ProductVersion" "${VERSION}"
Expand Down
4 changes: 2 additions & 2 deletions tooling/cli/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@
]
},
"identifier": {
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`). This string must be unique across applications since it is used in system configurations like the bundle ID and path to the webview data directory. This string must contain only alphanumeric characters (AZ, az, and 09), hyphens (-), and periods (.).",
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`). This string must be unique across applications since it is used in system configurations like the bundle ID and path to the webview data directory. This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-), and periods (.).",
"type": "string"
},
"publisher": {
Expand Down Expand Up @@ -1509,7 +1509,7 @@
}
},
"obsoletes": {
"description": "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).",
"description": "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).",
"type": [
"array",
"null"
Expand Down
Loading