You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ca160ad
Browse filesBrowse the repository at this point in the historyBrowse files
feat(cli): warn when productName is left as the default (#15895)
* feat(cli): warn when productName is left as the default (fix#14968)
The default productName tauri-app is used to derive the default WiX
installer upgrade code, so every app published without changing it gets
the same upgrade code and collides with unrelated apps in winget.
tauri build now warns when productName is still tauri-app, and the
config docs for productName and identifier explain what must be changed
before publishing. The upgrade code derivation itself is unchanged.
* docs(config): document the full surface of productName
The productName doc now lists everything the field controls on each
platform instead of focusing on the WiX upgrade code. Requested in
review of #15895.
* fix(cli): broaden the default productName warning
The warning and the change file described only the WiX upgrade code,
which is one of several things productName controls. Also bump
@tauri-apps/cli alongside tauri-cli, matching the other change files.
* Update crates/tauri-cli/src/build.rs
---------
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
`tauri build` now warns when `productName` is still set to the default `tauri-app`, since it names the generated bundles and is written into install paths and metadata that are expected to be unique to your application. The config documentation for `productName` now lists what the field controls on each platform, and `identifier`'s documentation notes that the default value is rejected.
Copy file name to clipboardExpand all lines: crates/tauri-cli/config.schema.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@
16
16
]
17
17
},
18
18
"productName": {
19
-
"description": "App name.",
19
+
"description": "App name.\n\n This is the name your app is known by on the user's system, so it must be changed from the\n default before publishing. Besides naming the generated bundles, it is written into platform\n metadata and install paths that are expected to be unique to your application.\n\n ## Platform-specific\n\n - **macOS**: Names the `.app` bundle and the `.dmg`, and sets the bundle's\n `CFBundleDisplayName` and `CFBundleName` properties. `CFBundleName` can be overridden with\n [`bundle > macOS > bundleName`](MacConfig::bundle_name).\n - **Linux**: Kebab-cased for the Debian and RPM package names, used as the `Name` entry of\n the desktop file and as the resource directory name under `/usr/lib`.\n - **Windows**: Names the installers, the installation directory, the Start Menu folder and\n the `HKCU\\Software\\<publisher>\\<product name>` registry key. It also derives the default\n WiX upgrade code, which must be unique across applications and can be set explicitly with\n [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code).",
20
20
"type": [
21
21
"string",
22
22
"null"
@@ -38,7 +38,7 @@
38
38
]
39
39
},
40
40
"identifier": {
41
-
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\n This string must be unique across applications since it is used in system configurations like\n the bundle ID and path to the webview data directory.\n This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),\n and periods (.).",
41
+
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\n This string must be unique across applications since it is used in system configurations like\n the bundle ID and path to the webview data directory.\n This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),\n and periods (.).\n The default value `com.tauri.dev` is rejected by `tauri build` and must be changed before\n building your application.",
Copy file name to clipboardExpand all lines: crates/tauri-cli/src/build.rs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -193,6 +193,12 @@ pub fn setup(
193
193
);
194
194
}
195
195
196
+
if config.product_name.as_deref() == Some("tauri-app"){
197
+
log::warn!(
198
+
"The `productName` is still set to the default value `tauri-app`, it must be unique across applications since it is written into install paths and platform metadata that are expected to be unique to your application, like the Windows installer upgrade code."
Copy file name to clipboardExpand all lines: crates/tauri-schema-generator/schemas/config.schema.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@
16
16
]
17
17
},
18
18
"productName": {
19
-
"description": "App name.",
19
+
"description": "App name.\n\n This is the name your app is known by on the user's system, so it must be changed from the\n default before publishing. Besides naming the generated bundles, it is written into platform\n metadata and install paths that are expected to be unique to your application.\n\n ## Platform-specific\n\n - **macOS**: Names the `.app` bundle and the `.dmg`, and sets the bundle's\n `CFBundleDisplayName` and `CFBundleName` properties. `CFBundleName` can be overridden with\n [`bundle > macOS > bundleName`](MacConfig::bundle_name).\n - **Linux**: Kebab-cased for the Debian and RPM package names, used as the `Name` entry of\n the desktop file and as the resource directory name under `/usr/lib`.\n - **Windows**: Names the installers, the installation directory, the Start Menu folder and\n the `HKCU\\Software\\<publisher>\\<product name>` registry key. It also derives the default\n WiX upgrade code, which must be unique across applications and can be set explicitly with\n [`bundle > windows > wix > upgradeCode`](WixConfig::upgrade_code).",
20
20
"type": [
21
21
"string",
22
22
"null"
@@ -38,7 +38,7 @@
38
38
]
39
39
},
40
40
"identifier": {
41
-
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\n This string must be unique across applications since it is used in system configurations like\n the bundle ID and path to the webview data directory.\n This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),\n and periods (.).",
41
+
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\n This string must be unique across applications since it is used in system configurations like\n the bundle ID and path to the webview data directory.\n This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),\n and periods (.).\n The default value `com.tauri.dev` is rejected by `tauri build` and must be changed before\n building your application.",
0 commit comments