Kaynağa Gözat

feat(docs): improve config documentation (#2451)

Lucas Fernandes Nogueira 4 yıl önce
ebeveyn
işleme
b0a8c38a73

+ 11 - 2
docs/api/config.md

@@ -45,7 +45,7 @@ In addition to the JSON defined on the `tauri.conf.json` file, Tauri reads a pla
 ## `package`
 
 <Properties anchorRoot="package" rows={[
-  { property: "name", optional: true, type: "string", description: `Application binary name. Converted to snake-case on Linux.` },
+  { property: "productName", optional: true, type: "string", description: `Application name. The binary name is converted to snake-case on Linux.` },
   { property: "version", optional: true, type: "string", description: `Application version.` }
 ]}/>
 
@@ -213,7 +213,6 @@ In addition to the JSON defined on the `tauri.conf.json` file, Tauri reads a pla
           { property: "removeDir", optional: true, type: "boolean", description: `Remove directory from local filesystem.` },
           { property: "removeFile", optional: true, type: "boolean", description: `Remove file from local filesystem.` },
           { property: "renameFile", optional: true, type: "boolean", description: `Rename file from local filesystem.` },
-          { property: "path", optional: true, type: "boolean", description: `Resolve system paths.` },
         ]}/>
       },
       {
@@ -252,6 +251,16 @@ In addition to the JSON defined on the `tauri.conf.json` file, Tauri reads a pla
           { property: "all", type: "boolean", description: `Use this flag to enable all global shortcut API features.` },
         ]}/>
       },
+      {
+        property: "os", optional: true, type: "object", child: <Properties anchorRoot="tauri.allowlist.os" rows={[
+          { property: "all", type: "boolean", description: `Use this flag to enable all OS API features.` },
+        ]}/>
+      },
+      {
+        property: "path", optional: true, type: "object", child: <Properties anchorRoot="tauri.allowlist.path" rows={[
+          { property: "all", type: "boolean", description: `Use this flag to enable all path API features.` },
+        ]}/>
+      },
     ]} />
   },
   {

+ 1 - 1
tooling/bundler/src/bundle/settings.rs

@@ -197,7 +197,7 @@ pub struct WixSettings {
   /// Disables the Webview2 runtime installation after app install.
   pub skip_webview_install: bool,
   /// The path to the LICENSE file.
-  pub license: Option<String>,
+  pub license: Option<PathBuf>,
   /// Create an elevated update task within Windows Task Scheduler.
   pub enable_elevated_update_task: bool,
   /// Path to a bitmap file to use as the installation user interface banner.

+ 1 - 2
tooling/bundler/src/bundle/windows/msi/wix.rs

@@ -419,8 +419,7 @@ pub fn build_wix_app_installer(
       if license.ends_with(".rtf") {
         data.insert("license", to_json(license));
       } else {
-        let license_path = PathBuf::from(license);
-        let license_contents = std::fs::read_to_string(&license_path)?;
+        let license_contents = std::fs::read_to_string(&license)?;
         let license_rtf = format!(
           r#"{{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{{\fonttbl{{\f0\fnil\fcharset0 Calibri;}}}}
 {{\*\generator Riched20 10.0.18362}}\viewkind4\uc1

+ 92 - 5
tooling/cli.rs/config_definition.rs

@@ -34,9 +34,12 @@ impl BundleTarget {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct DebConfig {
+  /// The list of deb dependencies your application relies on.
   pub depends: Option<Vec<String>>,
+  /// Enable the boostrapper script.
   #[serde(default)]
   pub use_bootstrapper: bool,
+  /// The files to include on the package.
   #[serde(default)]
   pub files: HashMap<PathBuf, PathBuf>,
 }
@@ -45,13 +48,23 @@ pub struct DebConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct MacConfig {
+  /// A list of strings indicating any macOS X frameworks that need to be bundled with the application.
+  ///
+  /// If a name is used, ".framework" must be omitted and it will look for standard install locations. You may also use a path to a specific framework.
   pub frameworks: Option<Vec<String>>,
+  /// A version string indicating the minimum macOS X version that the bundled application supports.
   pub minimum_system_version: Option<String>,
+  /// Allows your application to communicate with the outside world.
+  /// It should be a lowercase, without port and protocol domain name.
   pub exception_domain: Option<String>,
+  /// The path to the license file to add to the DMG bundle.
   pub license: Option<String>,
+  /// Enable the boostrapper script.
   #[serde(default)]
   pub use_bootstrapper: bool,
+  /// Identity to use for code signing.
   pub signing_identity: Option<String>,
+  /// Path to the entitlements file.
   pub entitlements: Option<String>,
 }
 
@@ -62,26 +75,36 @@ fn default_language() -> String {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct WixConfig {
-  /// App language. See https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables.
+  /// The installer language. See https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables.
   #[serde(default = "default_language")]
   pub language: String,
+  /// A custom .wxs template to use.
   pub template: Option<PathBuf>,
+  /// A list of paths to .wxs files with WiX fragments to use.
   #[serde(default)]
   pub fragment_paths: Vec<PathBuf>,
+  /// The ComponentGroup element ids you want to reference from the fragments.
   #[serde(default)]
   pub component_group_refs: Vec<String>,
+  /// The Component element ids you want to reference from the fragments.
   #[serde(default)]
   pub component_refs: Vec<String>,
+  /// The FeatureGroup element ids you want to reference from the fragments.
   #[serde(default)]
   pub feature_group_refs: Vec<String>,
+  /// The Feature element ids you want to reference from the fragments.
   #[serde(default)]
   pub feature_refs: Vec<String>,
+  /// The Merge element ids you want to reference from the fragments.
   #[serde(default)]
   pub merge_refs: Vec<String>,
+  /// Disables the Webview2 runtime installation after app install.
   #[serde(default)]
   pub skip_webview_install: bool,
-  /// Path to the license file.
-  pub license: Option<String>,
+  /// The path to the license file to render on the installer.
+  ///
+  /// Must be an RTF file, so if a different extension is provided, we convert it to the RTF format.
+  pub license: Option<PathBuf>,
   #[serde(default)]
   pub enable_elevated_update_task: bool,
   /// Path to a bitmap file to use as the installation user interface banner.
@@ -99,9 +122,14 @@ pub struct WixConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct WindowsConfig {
+  /// Specifies the file digest algorithm to use for creating file signatures.
+  /// Required for code signing. SHA-256 is recommended.
   pub digest_algorithm: Option<String>,
+  /// Specifies the SHA1 hash of the signing certificate.
   pub certificate_thumbprint: Option<String>,
+  /// Server to use during timestamping.
   pub timestamp_url: Option<String>,
+  /// Configuration for the MSI generated with WiX.
   pub wix: Option<WixConfig>,
 }
 
@@ -109,9 +137,9 @@ pub struct WindowsConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct PackageConfig {
-  /// App name. Automatically converted to kebab-case on Linux.
+  /// Application name. Automatically converted to kebab-case on Linux.
   pub product_name: Option<String>,
-  /// App version.
+  /// Application version.
   pub version: Option<String>,
 }
 
@@ -146,15 +174,33 @@ pub struct BundleConfig {
   /// Each resource is a path to a file or directory.
   /// Glob patterns are supported.
   pub resources: Option<Vec<String>>,
+  /// A copyright string associated with your application.
   pub copyright: Option<String>,
+  /// The application kind.
   pub category: Option<String>,
+  /// A short description of your application.
   pub short_description: Option<String>,
+  /// A longer, multi-line description of the application.
   pub long_description: Option<String>,
+  /// Configuration for the Debian bundle.
   #[serde(default)]
   pub deb: DebConfig,
+  /// Configuration for the macOS bundles.
   #[serde(rename = "macOS", default)]
   pub macos: MacConfig,
+  /// A list of—either absolute or relative—paths to binaries to embed with your application.
+  ///
+  /// Note that Tauri will look for system-specific binaries following the pattern "binary-name{-target-triple}{.system-extension}".
+  ///
+  /// E.g. for the external binary "my-binary", Tauri looks for:
+  ///
+  /// - "my-binary-x86_64-pc-windows-msvc.exe" for Windows
+  /// - "my-binary-x86_64-apple-darwin" for macOS
+  /// - "my-binary-x86_64-unknown-linux-gnu" for Linux
+  ///
+  /// so don't forget to provide binaries for all targeted platforms.
   pub external_bin: Option<Vec<String>>,
+  /// Configuration for the Windows bundle.
   #[serde(default)]
   pub windows: WindowsConfig,
 }
@@ -366,6 +412,10 @@ fn default_file_drop_enabled() -> bool {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct SecurityConfig {
+  /// The Content Security Policy that will be injected on all HTML files.
+  ///
+  /// This is a really important part of the configuration since it helps you ensure your WebView is secured.
+  /// See https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP.
   pub csp: Option<String>,
 }
 
@@ -384,26 +434,37 @@ macro_rules! check_feature {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct FsAllowlistConfig {
+  /// Use this flag to enable all file system API features.
   #[serde(default)]
   pub all: bool,
+  /// Read text file from local filesystem.
   #[serde(default)]
   pub read_text_file: bool,
+  /// Read binary file from local filesystem.
   #[serde(default)]
   pub read_binary_file: bool,
+  /// Write text file to local filesystem.
   #[serde(default)]
   pub write_file: bool,
+  /// Write binary file to local filesystem.
   #[serde(default)]
   pub write_binary_file: bool,
+  /// Read directory from local filesystem.
   #[serde(default)]
   pub read_dir: bool,
+  /// Copy file from local filesystem.
   #[serde(default)]
   pub copy_file: bool,
+  /// Create directory from local filesystem.
   #[serde(default)]
   pub create_dir: bool,
+  /// Remove directory from local filesystem.
   #[serde(default)]
   pub remove_dir: bool,
+  /// Remove file from local filesystem.
   #[serde(default)]
   pub remove_file: bool,
+  /// Rename file from local filesystem.
   #[serde(default)]
   pub rename_file: bool,
 }
@@ -432,8 +493,10 @@ impl Allowlist for FsAllowlistConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct WindowAllowlistConfig {
+  /// Use this flag to enable all window API features.
   #[serde(default)]
   pub all: bool,
+  /// Allows dynamic window creation.
   #[serde(default)]
   pub create: bool,
 }
@@ -453,10 +516,13 @@ impl Allowlist for WindowAllowlistConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct ShellAllowlistConfig {
+  /// Use this flag to enable all shell API features.
   #[serde(default)]
   pub all: bool,
+  /// Enable binary execution.
   #[serde(default)]
   pub execute: bool,
+  /// Open URL with the user's default application.
   #[serde(default)]
   pub open: bool,
 }
@@ -477,10 +543,13 @@ impl Allowlist for ShellAllowlistConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct DialogAllowlistConfig {
+  /// Use this flag to enable all dialog API features.
   #[serde(default)]
   pub all: bool,
+  /// Open dialog window to pick files.
   #[serde(default)]
   pub open: bool,
+  /// Open dialog window to pick where to save files.
   #[serde(default)]
   pub save: bool,
 }
@@ -501,8 +570,10 @@ impl Allowlist for DialogAllowlistConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct HttpAllowlistConfig {
+  /// Use this flag to enable all HTTP API features.
   #[serde(default)]
   pub all: bool,
+  /// Allows making HTTP requests.
   #[serde(default)]
   pub request: bool,
 }
@@ -522,6 +593,7 @@ impl Allowlist for HttpAllowlistConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct NotificationAllowlistConfig {
+  /// Use this flag to enable all notification API features.
   #[serde(default)]
   pub all: bool,
 }
@@ -539,6 +611,7 @@ impl Allowlist for NotificationAllowlistConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct GlobalShortcutAllowlistConfig {
+  /// Use this flag to enable all global shortcut API features.
   #[serde(default)]
   pub all: bool,
 }
@@ -556,6 +629,7 @@ impl Allowlist for GlobalShortcutAllowlistConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct OsAllowlistConfig {
+  /// Use this flag to enable all OS API features.
   #[serde(default)]
   pub all: bool,
 }
@@ -573,6 +647,7 @@ impl Allowlist for OsAllowlistConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct PathAllowlistConfig {
+  /// Use this flag to enable all path API features.
   #[serde(default)]
   pub all: bool,
 }
@@ -590,24 +665,34 @@ impl Allowlist for PathAllowlistConfig {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct AllowlistConfig {
+  /// Use this flag to enable all API features.
   #[serde(default)]
   pub all: bool,
+  /// File system API allowlist.
   #[serde(default)]
   pub fs: FsAllowlistConfig,
+  /// Window API allowlist.
   #[serde(default)]
   pub window: WindowAllowlistConfig,
+  /// Shell API allowlist.
   #[serde(default)]
   pub shell: ShellAllowlistConfig,
+  /// Dialog API allowlist.
   #[serde(default)]
   pub dialog: DialogAllowlistConfig,
+  /// HTTP API allowlist.
   #[serde(default)]
   pub http: HttpAllowlistConfig,
+  /// Notification API allowlist.
   #[serde(default)]
   pub notification: NotificationAllowlistConfig,
+  /// Global shortcut API allowlist.
   #[serde(default)]
   pub global_shortcut: GlobalShortcutAllowlistConfig,
+  /// OS allowlist.
   #[serde(default)]
   pub os: OsAllowlistConfig,
+  /// Path API allowlist.
   #[serde(default)]
   pub path: PathAllowlistConfig,
 }
@@ -645,8 +730,10 @@ pub struct TauriConfig {
   /// The bundler configuration.
   #[serde(default)]
   pub bundle: BundleConfig,
+  /// The allowlist configuration.
   #[serde(default)]
   allowlist: AllowlistConfig,
+  /// Security configuration.
   pub security: Option<SecurityConfig>,
   /// The updater configuration.
   #[serde(default = "default_updater")]

+ 72 - 4
tooling/cli.rs/schema.json

@@ -118,10 +118,12 @@
       "type": "object",
       "properties": {
         "all": {
+          "description": "Use this flag to enable all API features.",
           "default": false,
           "type": "boolean"
         },
         "dialog": {
+          "description": "Dialog API allowlist.",
           "default": {
             "all": false,
             "open": false,
@@ -134,6 +136,7 @@
           ]
         },
         "fs": {
+          "description": "File system API allowlist.",
           "default": {
             "all": false,
             "copyFile": false,
@@ -154,6 +157,7 @@
           ]
         },
         "globalShortcut": {
+          "description": "Global shortcut API allowlist.",
           "default": {
             "all": false
           },
@@ -164,6 +168,7 @@
           ]
         },
         "http": {
+          "description": "HTTP API allowlist.",
           "default": {
             "all": false,
             "request": false
@@ -175,6 +180,7 @@
           ]
         },
         "notification": {
+          "description": "Notification API allowlist.",
           "default": {
             "all": false
           },
@@ -185,6 +191,7 @@
           ]
         },
         "os": {
+          "description": "OS allowlist.",
           "default": {
             "all": false
           },
@@ -195,6 +202,7 @@
           ]
         },
         "path": {
+          "description": "Path API allowlist.",
           "default": {
             "all": false
           },
@@ -205,6 +213,7 @@
           ]
         },
         "shell": {
+          "description": "Shell API allowlist.",
           "default": {
             "all": false,
             "execute": false,
@@ -217,6 +226,7 @@
           ]
         },
         "window": {
+          "description": "Window API allowlist.",
           "default": {
             "all": false,
             "create": false
@@ -316,18 +326,21 @@
           "type": "boolean"
         },
         "category": {
+          "description": "The application kind.",
           "type": [
             "string",
             "null"
           ]
         },
         "copyright": {
+          "description": "A copyright string associated with your application.",
           "type": [
             "string",
             "null"
           ]
         },
         "deb": {
+          "description": "Configuration for the Debian bundle.",
           "default": {
             "files": {},
             "useBootstrapper": false
@@ -339,6 +352,7 @@
           ]
         },
         "externalBin": {
+          "description": "A list of—either absolute or relative—paths to binaries to embed with your application.\n\nNote that Tauri will look for system-specific binaries following the pattern \"binary-name{-target-triple}{.system-extension}\".\n\nE.g. for the external binary \"my-binary\", Tauri looks for:\n\n- \"my-binary-x86_64-pc-windows-msvc.exe\" for Windows - \"my-binary-x86_64-apple-darwin\" for macOS - \"my-binary-x86_64-unknown-linux-gnu\" for Linux\n\nso don't forget to provide binaries for all targeted platforms.",
           "type": [
             "array",
             "null"
@@ -365,12 +379,14 @@
           ]
         },
         "longDescription": {
+          "description": "A longer, multi-line description of the application.",
           "type": [
             "string",
             "null"
           ]
         },
         "macOS": {
+          "description": "Configuration for the macOS bundles.",
           "default": {
             "useBootstrapper": false
           },
@@ -391,6 +407,7 @@
           }
         },
         "shortDescription": {
+          "description": "A short description of your application.",
           "type": [
             "string",
             "null"
@@ -408,6 +425,7 @@
           ]
         },
         "windows": {
+          "description": "Configuration for the Windows bundle.",
           "default": {
             "certificateThumbprint": null,
             "digestAlgorithm": null,
@@ -693,6 +711,7 @@
       "type": "object",
       "properties": {
         "depends": {
+          "description": "The list of deb dependencies your application relies on.",
           "type": [
             "array",
             "null"
@@ -702,6 +721,7 @@
           }
         },
         "files": {
+          "description": "The files to include on the package.",
           "default": {},
           "type": "object",
           "additionalProperties": {
@@ -709,6 +729,7 @@
           }
         },
         "useBootstrapper": {
+          "description": "Enable the boostrapper script.",
           "default": false,
           "type": "boolean"
         }
@@ -719,14 +740,17 @@
       "type": "object",
       "properties": {
         "all": {
+          "description": "Use this flag to enable all dialog API features.",
           "default": false,
           "type": "boolean"
         },
         "open": {
+          "description": "Open dialog window to pick files.",
           "default": false,
           "type": "boolean"
         },
         "save": {
+          "description": "Open dialog window to pick where to save files.",
           "default": false,
           "type": "boolean"
         }
@@ -737,46 +761,57 @@
       "type": "object",
       "properties": {
         "all": {
+          "description": "Use this flag to enable all file system API features.",
           "default": false,
           "type": "boolean"
         },
         "copyFile": {
+          "description": "Copy file from local filesystem.",
           "default": false,
           "type": "boolean"
         },
         "createDir": {
+          "description": "Create directory from local filesystem.",
           "default": false,
           "type": "boolean"
         },
         "readBinaryFile": {
+          "description": "Read binary file from local filesystem.",
           "default": false,
           "type": "boolean"
         },
         "readDir": {
+          "description": "Read directory from local filesystem.",
           "default": false,
           "type": "boolean"
         },
         "readTextFile": {
+          "description": "Read text file from local filesystem.",
           "default": false,
           "type": "boolean"
         },
         "removeDir": {
+          "description": "Remove directory from local filesystem.",
           "default": false,
           "type": "boolean"
         },
         "removeFile": {
+          "description": "Remove file from local filesystem.",
           "default": false,
           "type": "boolean"
         },
         "renameFile": {
+          "description": "Rename file from local filesystem.",
           "default": false,
           "type": "boolean"
         },
         "writeBinaryFile": {
+          "description": "Write binary file to local filesystem.",
           "default": false,
           "type": "boolean"
         },
         "writeFile": {
+          "description": "Write text file to local filesystem.",
           "default": false,
           "type": "boolean"
         }
@@ -787,6 +822,7 @@
       "type": "object",
       "properties": {
         "all": {
+          "description": "Use this flag to enable all global shortcut API features.",
           "default": false,
           "type": "boolean"
         }
@@ -797,10 +833,12 @@
       "type": "object",
       "properties": {
         "all": {
+          "description": "Use this flag to enable all HTTP API features.",
           "default": false,
           "type": "boolean"
         },
         "request": {
+          "description": "Allows making HTTP requests.",
           "default": false,
           "type": "boolean"
         }
@@ -811,18 +849,21 @@
       "type": "object",
       "properties": {
         "entitlements": {
+          "description": "Path to the entitlements file.",
           "type": [
             "string",
             "null"
           ]
         },
         "exceptionDomain": {
+          "description": "Allows your application to communicate with the outside world. It should be a lowercase, without port and protocol domain name.",
           "type": [
             "string",
             "null"
           ]
         },
         "frameworks": {
+          "description": "A list of strings indicating any macOS X frameworks that need to be bundled with the application.\n\nIf a name is used, \".framework\" must be omitted and it will look for standard install locations. You may also use a path to a specific framework.",
           "type": [
             "array",
             "null"
@@ -832,24 +873,28 @@
           }
         },
         "license": {
+          "description": "The path to the license file to add to the DMG bundle.",
           "type": [
             "string",
             "null"
           ]
         },
         "minimumSystemVersion": {
+          "description": "A version string indicating the minimum macOS X version that the bundled application supports.",
           "type": [
             "string",
             "null"
           ]
         },
         "signingIdentity": {
+          "description": "Identity to use for code signing.",
           "type": [
             "string",
             "null"
           ]
         },
         "useBootstrapper": {
+          "description": "Enable the boostrapper script.",
           "default": false,
           "type": "boolean"
         }
@@ -860,6 +905,7 @@
       "type": "object",
       "properties": {
         "all": {
+          "description": "Use this flag to enable all notification API features.",
           "default": false,
           "type": "boolean"
         }
@@ -870,6 +916,7 @@
       "type": "object",
       "properties": {
         "all": {
+          "description": "Use this flag to enable all OS API features.",
           "default": false,
           "type": "boolean"
         }
@@ -880,14 +927,14 @@
       "type": "object",
       "properties": {
         "productName": {
-          "description": "App name. Automatically converted to kebab-case on Linux.",
+          "description": "Application name. Automatically converted to kebab-case on Linux.",
           "type": [
             "string",
             "null"
           ]
         },
         "version": {
-          "description": "App version.",
+          "description": "Application version.",
           "type": [
             "string",
             "null"
@@ -900,6 +947,7 @@
       "type": "object",
       "properties": {
         "all": {
+          "description": "Use this flag to enable all path API features.",
           "default": false,
           "type": "boolean"
         }
@@ -910,6 +958,7 @@
       "type": "object",
       "properties": {
         "csp": {
+          "description": "The Content Security Policy that will be injected on all HTML files.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP.",
           "type": [
             "string",
             "null"
@@ -922,14 +971,17 @@
       "type": "object",
       "properties": {
         "all": {
+          "description": "Use this flag to enable all shell API features.",
           "default": false,
           "type": "boolean"
         },
         "execute": {
+          "description": "Enable binary execution.",
           "default": false,
           "type": "boolean"
         },
         "open": {
+          "description": "Open URL with the user's default application.",
           "default": false,
           "type": "boolean"
         }
@@ -959,6 +1011,7 @@
       "type": "object",
       "properties": {
         "allowlist": {
+          "description": "The allowlist configuration.",
           "default": {
             "all": false,
             "dialog": {
@@ -1047,6 +1100,7 @@
           ]
         },
         "security": {
+          "description": "Security configuration.",
           "anyOf": [
             {
               "$ref": "#/definitions/SecurityConfig"
@@ -1130,10 +1184,12 @@
       "type": "object",
       "properties": {
         "all": {
+          "description": "Use this flag to enable all window API features.",
           "default": false,
           "type": "boolean"
         },
         "create": {
+          "description": "Allows dynamic window creation.",
           "default": false,
           "type": "boolean"
         }
@@ -1291,24 +1347,28 @@
       "type": "object",
       "properties": {
         "certificateThumbprint": {
+          "description": "Specifies the SHA1 hash of the signing certificate.",
           "type": [
             "string",
             "null"
           ]
         },
         "digestAlgorithm": {
+          "description": "Specifies the file digest algorithm to use for creating file signatures. Required for code signing. SHA-256 is recommended.",
           "type": [
             "string",
             "null"
           ]
         },
         "timestampUrl": {
+          "description": "Server to use during timestamping.",
           "type": [
             "string",
             "null"
           ]
         },
         "wix": {
+          "description": "Configuration for the MSI generated with WiX.",
           "anyOf": [
             {
               "$ref": "#/definitions/WixConfig"
@@ -1332,6 +1392,7 @@
           ]
         },
         "componentGroupRefs": {
+          "description": "The ComponentGroup element ids you want to reference from the fragments.",
           "default": [],
           "type": "array",
           "items": {
@@ -1339,6 +1400,7 @@
           }
         },
         "componentRefs": {
+          "description": "The Component element ids you want to reference from the fragments.",
           "default": [],
           "type": "array",
           "items": {
@@ -1357,6 +1419,7 @@
           "type": "boolean"
         },
         "featureGroupRefs": {
+          "description": "The FeatureGroup element ids you want to reference from the fragments.",
           "default": [],
           "type": "array",
           "items": {
@@ -1364,6 +1427,7 @@
           }
         },
         "featureRefs": {
+          "description": "The Feature element ids you want to reference from the fragments.",
           "default": [],
           "type": "array",
           "items": {
@@ -1371,6 +1435,7 @@
           }
         },
         "fragmentPaths": {
+          "description": "A list of paths to .wxs files with WiX fragments to use.",
           "default": [],
           "type": "array",
           "items": {
@@ -1378,18 +1443,19 @@
           }
         },
         "language": {
-          "description": "App language. See https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables.",
+          "description": "The installer language. See https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables.",
           "default": "en-US",
           "type": "string"
         },
         "license": {
-          "description": "Path to the license file.",
+          "description": "The path to the license file to render on the installer.\n\nMust be an RTF file, so if a different extension is provided, we convert it to the RTF format.",
           "type": [
             "string",
             "null"
           ]
         },
         "mergeRefs": {
+          "description": "The Merge element ids you want to reference from the fragments.",
           "default": [],
           "type": "array",
           "items": {
@@ -1397,10 +1463,12 @@
           }
         },
         "skipWebviewInstall": {
+          "description": "Disables the Webview2 runtime installation after app install.",
           "default": false,
           "type": "boolean"
         },
         "template": {
+          "description": "A custom .wxs template to use.",
           "type": [
             "string",
             "null"

+ 1 - 3
tooling/cli.rs/src/interface/rust.rs

@@ -451,9 +451,7 @@ fn tauri_config_to_bundle_settings(
       certificate_thumbprint: config.windows.certificate_thumbprint,
       wix: config.windows.wix.map(|w| {
         let mut wix = WixSettings::from(w);
-        wix.license = wix
-          .license
-          .map(|l| tauri_dir().join(l).to_string_lossy().into_owned());
+        wix.license = wix.license.map(|l| tauri_dir().join(l));
         wix
       }),
       icon_path: windows_icon_path,