Skip to content

Commit 5a768d5

Browse files
authored
refactor(build): remove WindowsAttributes::sdk_dir (#6886)
1 parent 3188f37 commit 5a768d5

2 files changed

Lines changed: 5 additions & 28 deletions

File tree

.changes/remove-sdk-dir.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-build": patch
3+
---
4+
5+
Remove `WindowsAttributes::sdk_dir`.

core/tauri-build/src/lib.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,6 @@ fn cfg_alias(alias: &str, has_feature: bool) {
110110
#[derive(Debug, Default)]
111111
pub struct WindowsAttributes {
112112
window_icon_path: Option<PathBuf>,
113-
/// The path to the sdk location.
114-
///
115-
/// For the GNU toolkit this has to be the path where MinGW put windres.exe and ar.exe.
116-
/// This could be something like: "C:\Program Files\mingw-w64\x86_64-5.3.0-win32-seh-rt_v4-rev0\mingw64\bin"
117-
///
118-
/// For MSVC the Windows SDK has to be installed. It comes with the resource compiler rc.exe.
119-
/// This should be set to the root directory of the Windows SDK, e.g., "C:\Program Files (x86)\Windows Kits\10" or,
120-
/// if multiple 10 versions are installed, set it directly to the correct bin directory "C:\Program Files (x86)\Windows Kits\10\bin\10.0.14393.0\x64"
121-
///
122-
/// If it is left unset, it will look up a path in the registry, i.e. HKLM\SOFTWARE\Microsoft\Windows Kits\Installed Roots
123-
sdk_dir: Option<PathBuf>,
124113
/// A string containing an [application manifest] to be included with the application on Windows.
125114
///
126115
/// Defaults to:
@@ -148,14 +137,6 @@ impl WindowsAttributes {
148137
self
149138
}
150139

151-
/// Sets the sdk dir for windows. Currently only used on Windows. This must be a valid UTF-8
152-
/// path. Defaults to whatever the `winres` crate determines is best.
153-
#[must_use]
154-
pub fn sdk_dir<P: AsRef<Path>>(mut self, sdk_dir: P) -> Self {
155-
self.sdk_dir = Some(sdk_dir.as_ref().into());
156-
self
157-
}
158-
159140
/// Sets the Windows app [manifest].
160141
///
161142
/// # Example
@@ -444,15 +425,6 @@ dependencies {"
444425
res.set_manifest(include_str!("window-app-manifest.xml"));
445426
}
446427

447-
if let Some(sdk_dir) = &attributes.windows_attributes.sdk_dir {
448-
if let Some(sdk_dir_str) = sdk_dir.to_str() {
449-
res.set_toolkit_path(sdk_dir_str);
450-
} else {
451-
return Err(anyhow!(
452-
"sdk_dir path is not valid; only UTF-8 characters are allowed"
453-
));
454-
}
455-
}
456428
if let Some(version) = &config.package.version {
457429
if let Ok(v) = Version::parse(version) {
458430
let version = v.major << 48 | v.minor << 32 | v.patch << 16;

0 commit comments

Comments
 (0)