Browse Source

refactor(bundler): group and organize template file structure (#11046)

This PR groups files in a predictable mannar, so instead of

```
windows/
  |_ templates
     |_ main.wxs
     |_ installer.nsi
  |_ nsis.rs
  |_ msi.rs
```
we group them next to each other
```
windows/
  |_ msi
     |_ main.wxs
     |_ mod.rs
  |_ nsis
    |_ installer.nsi
    |_ mod.rs
```
Amr Bashir 10 months ago
parent
commit
fbff6388ad
39 changed files with 72 additions and 88 deletions
  1. 0 0
      crates/tauri-bundler/src/bundle/linux/appimage/appimage
  2. 1 1
      crates/tauri-bundler/src/bundle/linux/appimage/mod.rs
  3. 0 0
      crates/tauri-bundler/src/bundle/linux/freedesktop/main.desktop
  4. 1 1
      crates/tauri-bundler/src/bundle/linux/freedesktop/mod.rs
  5. 0 0
      crates/tauri-bundler/src/bundle/macos/dmg/bundle_dmg
  6. 0 0
      crates/tauri-bundler/src/bundle/macos/dmg/eula-resources-template.xml
  7. 3 6
      crates/tauri-bundler/src/bundle/macos/dmg/mod.rs
  8. 0 0
      crates/tauri-bundler/src/bundle/macos/dmg/template.applescript
  9. 3 3
      crates/tauri-bundler/src/bundle/settings.rs
  10. 0 47
      crates/tauri-bundler/src/bundle/windows/msi.rs
  11. 0 0
      crates/tauri-bundler/src/bundle/windows/msi/install-task.ps1
  12. 0 0
      crates/tauri-bundler/src/bundle/windows/msi/main.wxs
  13. 41 4
      crates/tauri-bundler/src/bundle/windows/msi/mod.rs
  14. 0 0
      crates/tauri-bundler/src/bundle/windows/msi/uninstall-task.ps1
  15. 0 0
      crates/tauri-bundler/src/bundle/windows/msi/update-task.xml
  16. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/FileAssociation.nsh
  17. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/installer.nsi
  18. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/Arabic.nsh
  19. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/Bulgarian.nsh
  20. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/Dutch.nsh
  21. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/English.nsh
  22. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/French.nsh
  23. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/German.nsh
  24. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/Japanese.nsh
  25. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/Korean.nsh
  26. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/Persian.nsh
  27. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/PortugueseBR.nsh
  28. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/Russian.nsh
  29. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/SimpChinese.nsh
  30. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/Spanish.nsh
  31. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/SpanishInternational.nsh
  32. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/Swedish.nsh
  33. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/TradChinese.nsh
  34. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/languages/Turkish.nsh
  35. 20 23
      crates/tauri-bundler/src/bundle/windows/nsis/mod.rs
  36. 0 0
      crates/tauri-bundler/src/bundle/windows/nsis/utils.nsh
  37. 1 1
      crates/tauri-cli/config.schema.json
  38. 1 1
      crates/tauri-schema-generator/schemas/config.schema.json
  39. 1 1
      crates/tauri-utils/src/config.rs

+ 0 - 0
crates/tauri-bundler/src/bundle/linux/templates/appimage → crates/tauri-bundler/src/bundle/linux/appimage/appimage


+ 1 - 1
crates/tauri-bundler/src/bundle/linux/appimage.rs → crates/tauri-bundler/src/bundle/linux/appimage/mod.rs

@@ -86,7 +86,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
   let mut handlebars = Handlebars::new();
   handlebars.register_escape_fn(handlebars::no_escape);
   handlebars
-    .register_template_string("appimage", include_str!("templates/appimage"))
+    .register_template_string("appimage", include_str!("./appimage"))
     .expect("Failed to register template for handlebars");
   let temp = handlebars.render("appimage", &sh_map)?;
 

+ 0 - 0
crates/tauri-bundler/src/bundle/linux/templates/main.desktop → crates/tauri-bundler/src/bundle/linux/freedesktop/main.desktop


+ 1 - 1
crates/tauri-bundler/src/bundle/linux/freedesktop.rs → crates/tauri-bundler/src/bundle/linux/freedesktop/mod.rs

@@ -114,7 +114,7 @@ pub fn generate_desktop_file(
       .with_context(|| "Failed to setup custom handlebar template")?;
   } else {
     handlebars
-      .register_template_string("main.desktop", include_str!("./templates/main.desktop"))
+      .register_template_string("main.desktop", include_str!("./main.desktop"))
       .with_context(|| "Failed to setup default handlebar template")?;
   }
 

+ 0 - 0
crates/tauri-bundler/src/bundle/macos/templates/dmg/bundle_dmg → crates/tauri-bundler/src/bundle/macos/dmg/bundle_dmg


+ 0 - 0
crates/tauri-bundler/src/bundle/macos/templates/dmg/eula-resources-template.xml → crates/tauri-bundler/src/bundle/macos/dmg/eula-resources-template.xml


+ 3 - 6
crates/tauri-bundler/src/bundle/macos/dmg.rs → crates/tauri-bundler/src/bundle/macos/dmg/mod.rs

@@ -72,17 +72,14 @@ pub fn bundle_project(settings: &Settings, bundles: &[Bundle]) -> crate::Result<
   log::info!(action = "Bundling"; "{} ({})", dmg_name, dmg_path.display());
 
   // write the scripts
-  write(
-    &bundle_script_path,
-    include_str!("templates/dmg/bundle_dmg"),
-  )?;
+  write(&bundle_script_path, include_str!("./bundle_dmg"))?;
   write(
     support_directory_path.join("template.applescript"),
-    include_str!("templates/dmg/template.applescript"),
+    include_str!("./template.applescript"),
   )?;
   write(
     support_directory_path.join("eula-resources-template.xml"),
-    include_str!("templates/dmg/eula-resources-template.xml"),
+    include_str!("./eula-resources-template.xml"),
   )?;
 
   // chmod script for execution

+ 0 - 0
crates/tauri-bundler/src/bundle/macos/templates/dmg/template.applescript → crates/tauri-bundler/src/bundle/macos/dmg/template.applescript


+ 3 - 3
crates/tauri-bundler/src/bundle/settings.rs

@@ -185,7 +185,7 @@ pub struct DebianSettings {
   ///
   /// Default file contents:
   /// ```text
-  #[doc = include_str!("./linux/templates/main.desktop")]
+  #[doc = include_str!("./linux/freedesktop/main.desktop")]
   /// ```
   pub desktop_template: Option<PathBuf>,
   /// Define the section in Debian Control file. See : <https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections>
@@ -243,7 +243,7 @@ pub struct RpmSettings {
   ///
   /// Default file contents:
   /// ```text
-  #[doc = include_str!("./linux/templates/main.desktop")]
+  #[doc = include_str!("./linux/freedesktop/main.desktop")]
   /// ```
   pub desktop_template: Option<PathBuf>,
   /// Path to script that will be executed before the package is unpacked. See
@@ -410,7 +410,7 @@ pub struct NsisSettings {
   /// An key-value pair where the key is the language and the
   /// value is the path to a custom `.nsi` file that holds the translated text for tauri's custom messages.
   ///
-  /// See <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/English.nsh> for an example `.nsi` file.
+  /// See <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/nsis/languages/English.nsh> for an example `.nsi` file.
   ///
   /// **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`]languages array,
   pub custom_language_files: Option<HashMap<String, PathBuf>>,

+ 0 - 47
crates/tauri-bundler/src/bundle/windows/msi.rs

@@ -1,47 +0,0 @@
-// Copyright 2016-2019 Cargo-Bundle developers <https://github.com/burtonageo/cargo-bundle>
-// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
-// SPDX-License-Identifier: Apache-2.0
-// SPDX-License-Identifier: MIT
-
-mod wix;
-
-use crate::Settings;
-
-use std::{self, path::PathBuf};
-
-const WIX_REQUIRED_FILES: &[&str] = &[
-  "candle.exe",
-  "candle.exe.config",
-  "darice.cub",
-  "light.exe",
-  "light.exe.config",
-  "wconsole.dll",
-  "winterop.dll",
-  "wix.dll",
-  "WixUIExtension.dll",
-  "WixUtilExtension.dll",
-];
-
-/// Runs all of the commands to build the MSI installer.
-/// Returns a vector of PathBuf that shows where the MSI was created.
-pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result<Vec<PathBuf>> {
-  let tauri_tools_path = settings
-    .local_tools_directory()
-    .map(|d| d.join(".tauri"))
-    .unwrap_or_else(|| dirs::cache_dir().unwrap().join("tauri"));
-
-  let wix_path = tauri_tools_path.join("WixTools314");
-
-  if !wix_path.exists() {
-    wix::get_and_extract_wix(&wix_path)?;
-  } else if WIX_REQUIRED_FILES
-    .iter()
-    .any(|p| !wix_path.join(p).exists())
-  {
-    log::warn!("WixTools directory is missing some files. Recreating it.");
-    std::fs::remove_dir_all(&wix_path)?;
-    wix::get_and_extract_wix(&wix_path)?;
-  }
-
-  wix::build_wix_app_installer(settings, &wix_path, updater)
-}

+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/install-task.ps1 → crates/tauri-bundler/src/bundle/windows/msi/install-task.ps1


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/main.wxs → crates/tauri-bundler/src/bundle/windows/msi/main.wxs


+ 41 - 4
crates/tauri-bundler/src/bundle/windows/msi/wix.rs → crates/tauri-bundler/src/bundle/windows/msi/mod.rs

@@ -34,6 +34,43 @@ pub const WIX_URL: &str =
   "https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip";
 pub const WIX_SHA256: &str = "6ac824e1642d6f7277d0ed7ea09411a508f6116ba6fae0aa5f2c7daa2ff43d31";
 
+const WIX_REQUIRED_FILES: &[&str] = &[
+  "candle.exe",
+  "candle.exe.config",
+  "darice.cub",
+  "light.exe",
+  "light.exe.config",
+  "wconsole.dll",
+  "winterop.dll",
+  "wix.dll",
+  "WixUIExtension.dll",
+  "WixUtilExtension.dll",
+];
+
+/// Runs all of the commands to build the MSI installer.
+/// Returns a vector of PathBuf that shows where the MSI was created.
+pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result<Vec<PathBuf>> {
+  let tauri_tools_path = settings
+    .local_tools_directory()
+    .map(|d| d.join(".tauri"))
+    .unwrap_or_else(|| dirs::cache_dir().unwrap().join("tauri"));
+
+  let wix_path = tauri_tools_path.join("WixTools314");
+
+  if !wix_path.exists() {
+    get_and_extract_wix(&wix_path)?;
+  } else if WIX_REQUIRED_FILES
+    .iter()
+    .any(|p| !wix_path.join(p).exists())
+  {
+    log::warn!("WixTools directory is missing some files. Recreating it.");
+    std::fs::remove_dir_all(&wix_path)?;
+    get_and_extract_wix(&wix_path)?;
+  }
+
+  build_wix_app_installer(settings, &wix_path, updater)
+}
+
 // For Cross Platform Compilation.
 
 // const VC_REDIST_X86_URL: &str =
@@ -630,7 +667,7 @@ pub fn build_wix_app_installer(
       .expect("Failed to setup custom handlebar template");
   } else {
     handlebars
-      .register_template_string("main.wxs", include_str!("../templates/main.wxs"))
+      .register_template_string("main.wxs", include_str!("./main.wxs"))
       .map_err(|e| e.to_string())
       .expect("Failed to setup handlebar template");
   }
@@ -649,7 +686,7 @@ pub fn build_wix_app_installer(
 
     // Create the update task XML
     let mut skip_uac_task = Handlebars::new();
-    let xml = include_str!("../templates/update-task.xml");
+    let xml = include_str!("./update-task.xml");
     skip_uac_task
       .register_template_string("update.xml", xml)
       .map_err(|e| e.to_string())
@@ -661,7 +698,7 @@ pub fn build_wix_app_installer(
     // Create the Powershell script to install the task
     let mut skip_uac_task_installer = Handlebars::new();
     skip_uac_task_installer.register_escape_fn(handlebars::no_escape);
-    let xml = include_str!("../templates/install-task.ps1");
+    let xml = include_str!("./install-task.ps1");
     skip_uac_task_installer
       .register_template_string("install-task.ps1", xml)
       .map_err(|e| e.to_string())
@@ -673,7 +710,7 @@ pub fn build_wix_app_installer(
     // Create the Powershell script to uninstall the task
     let mut skip_uac_task_uninstaller = Handlebars::new();
     skip_uac_task_uninstaller.register_escape_fn(handlebars::no_escape);
-    let xml = include_str!("../templates/uninstall-task.ps1");
+    let xml = include_str!("./uninstall-task.ps1");
     skip_uac_task_uninstaller
       .register_template_string("uninstall-task.ps1", xml)
       .map_err(|e| e.to_string())

+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/uninstall-task.ps1 → crates/tauri-bundler/src/bundle/windows/msi/uninstall-task.ps1


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/update-task.xml → crates/tauri-bundler/src/bundle/windows/msi/update-task.xml


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/FileAssociation.nsh → crates/tauri-bundler/src/bundle/windows/nsis/FileAssociation.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/installer.nsi → crates/tauri-bundler/src/bundle/windows/nsis/installer.nsi


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/Arabic.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/Arabic.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/Bulgarian.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/Bulgarian.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/Dutch.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/Dutch.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/English.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/English.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/French.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/French.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/German.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/German.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/Japanese.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/Japanese.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/Korean.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/Korean.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/Persian.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/Persian.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/PortugueseBR.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/PortugueseBR.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/Russian.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/Russian.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/SimpChinese.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/SimpChinese.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/Spanish.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/Spanish.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/SpanishInternational.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/SpanishInternational.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/Swedish.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/Swedish.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/TradChinese.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/TradChinese.nsh


+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/Turkish.nsh → crates/tauri-bundler/src/bundle/windows/nsis/languages/Turkish.nsh


+ 20 - 23
crates/tauri-bundler/src/bundle/windows/nsis.rs → crates/tauri-bundler/src/bundle/windows/nsis/mod.rs

@@ -480,19 +480,16 @@ fn build_nsis_app_installer(
       .expect("Failed to setup custom handlebar template");
   } else {
     handlebars
-      .register_template_string("installer.nsi", include_str!("./templates/installer.nsi"))
+      .register_template_string("installer.nsi", include_str!("./installer.nsi"))
       .map_err(|e| e.to_string())
       .expect("Failed to setup handlebar template");
   }
 
   write_utf8_with_bom(
     output_path.join("FileAssociation.nsh"),
-    include_bytes!("./templates/FileAssociation.nsh"),
-  )?;
-  write_utf8_with_bom(
-    output_path.join("utils.nsh"),
-    include_bytes!("./templates/utils.nsh"),
+    include_bytes!("./FileAssociation.nsh"),
   )?;
+  write_utf8_with_bom(output_path.join("utils.nsh"), include_bytes!("./utils.nsh"))?;
 
   let installer_nsi_path = output_path.join("installer.nsi");
   write_utf8_with_bom(
@@ -681,23 +678,23 @@ fn generate_estimated_size(
 fn get_lang_data(lang: &str) -> Option<(String, &[u8])> {
   let path = format!("{lang}.nsh");
   let content: &[u8] = match lang.to_lowercase().as_str() {
-    "arabic" => include_bytes!("./templates/nsis-languages/Arabic.nsh"),
-    "bulgarian" => include_bytes!("./templates/nsis-languages/Bulgarian.nsh"),
-    "dutch" => include_bytes!("./templates/nsis-languages/Dutch.nsh"),
-    "english" => include_bytes!("./templates/nsis-languages/English.nsh"),
-    "german" => include_bytes!("./templates/nsis-languages/German.nsh"),
-    "japanese" => include_bytes!("./templates/nsis-languages/Japanese.nsh"),
-    "korean" => include_bytes!("./templates/nsis-languages/Korean.nsh"),
-    "portuguesebr" => include_bytes!("./templates/nsis-languages/PortugueseBR.nsh"),
-    "russian" => include_bytes!("./templates/nsis-languages/Russian.nsh"),
-    "tradchinese" => include_bytes!("./templates/nsis-languages/TradChinese.nsh"),
-    "simpchinese" => include_bytes!("./templates/nsis-languages/SimpChinese.nsh"),
-    "french" => include_bytes!("./templates/nsis-languages/French.nsh"),
-    "spanish" => include_bytes!("./templates/nsis-languages/Spanish.nsh"),
-    "spanishinternational" => include_bytes!("./templates/nsis-languages/SpanishInternational.nsh"),
-    "persian" => include_bytes!("./templates/nsis-languages/Persian.nsh"),
-    "turkish" => include_bytes!("./templates/nsis-languages/Turkish.nsh"),
-    "swedish" => include_bytes!("./templates/nsis-languages/Swedish.nsh"),
+    "arabic" => include_bytes!("./languages/Arabic.nsh"),
+    "bulgarian" => include_bytes!("./languages/Bulgarian.nsh"),
+    "dutch" => include_bytes!("./languages/Dutch.nsh"),
+    "english" => include_bytes!("./languages/English.nsh"),
+    "german" => include_bytes!("./languages/German.nsh"),
+    "japanese" => include_bytes!("./languages/Japanese.nsh"),
+    "korean" => include_bytes!("./languages/Korean.nsh"),
+    "portuguesebr" => include_bytes!("./languages/PortugueseBR.nsh"),
+    "russian" => include_bytes!("./languages/Russian.nsh"),
+    "tradchinese" => include_bytes!("./languages/TradChinese.nsh"),
+    "simpchinese" => include_bytes!("./languages/SimpChinese.nsh"),
+    "french" => include_bytes!("./languages/French.nsh"),
+    "spanish" => include_bytes!("./languages/Spanish.nsh"),
+    "spanishinternational" => include_bytes!("./languages/SpanishInternational.nsh"),
+    "persian" => include_bytes!("./languages/Persian.nsh"),
+    "turkish" => include_bytes!("./languages/Turkish.nsh"),
+    "swedish" => include_bytes!("./languages/Swedish.nsh"),
     _ => return None,
   };
   Some((path, content))

+ 0 - 0
crates/tauri-bundler/src/bundle/windows/templates/utils.nsh → crates/tauri-bundler/src/bundle/windows/nsis/utils.nsh


+ 1 - 1
crates/tauri-cli/config.schema.json

@@ -2340,7 +2340,7 @@
           }
         },
         "customLanguageFiles": {
-          "description": "A key-value pair where the key is the language and the\n value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\n See <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/English.nsh> for an example `.nsh` file.\n\n **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,",
+          "description": "A key-value pair where the key is the language and the\n value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\n See <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/nsis/languages/English.nsh> for an example `.nsh` file.\n\n **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,",
           "type": [
             "object",
             "null"

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

@@ -2340,7 +2340,7 @@
           }
         },
         "customLanguageFiles": {
-          "description": "A key-value pair where the key is the language and the\n value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\n See <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/English.nsh> for an example `.nsh` file.\n\n **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,",
+          "description": "A key-value pair where the key is the language and the\n value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\n See <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/nsis/languages/English.nsh> for an example `.nsh` file.\n\n **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,",
           "type": [
             "object",
             "null"

+ 1 - 1
crates/tauri-utils/src/config.rs

@@ -783,7 +783,7 @@ pub struct NsisConfig {
   /// A key-value pair where the key is the language and the
   /// value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.
   ///
-  /// See <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/English.nsh> for an example `.nsh` file.
+  /// See <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/nsis/languages/English.nsh> for an example `.nsh` file.
   ///
   /// **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,
   pub custom_language_files: Option<HashMap<String, PathBuf>>,