Skip to content

fix(tauri-build): allow user to specify win sdk path (fix: #2871) - #2893

Merged
lucasfernog merged 3 commits into
tauri-apps:nextfrom
SyntaxRules:feat/win-sdk-param
Nov 16, 2021
Merged

fix(tauri-build): allow user to specify win sdk path (fix: #2871)#2893
lucasfernog merged 3 commits into
tauri-apps:nextfrom
SyntaxRules:feat/win-sdk-param

Conversation

@SyntaxRules

@SyntaxRules SyntaxRules commented Nov 15, 2021

Copy link
Copy Markdown
Contributor

This fixes #2871 by allowing users to pass in the sdk_path (windows only) when it can otherwise not be found.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Docs
  • New Binding Issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:
    This is a fix because I need this to get the builds to work on my machine. Some may consider this a new feature that allows for greater flexibility.

Does this PR introduce a breaking change? (check one)

  • Yes. Issue #___
  • No
    If the new parameter is not specified, the old methods of resolving the path are taken.

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

@SyntaxRules
SyntaxRules requested a review from a team November 15, 2021 22:01
@SyntaxRules

Copy link
Copy Markdown
Contributor Author

For your information. I tested this in the tauri getting started by editing build.rs to look like:

use tauri_build::{try_build, Attributes, WindowsAttributes};

fn main() {
    if let Err(error) = try_build(Attributes::new().windows_attributes(
        WindowsAttributes::new().sdk_dir("C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64/")
    )) {
        panic!("error found during tauri-build: {}", error);
    }
}

I also ran cargo test and there were no errors.

@SyntaxRules
SyntaxRules requested a review from a team as a code owner November 15, 2021 22:13
@lucasfernog

Copy link
Copy Markdown
Member

Can you add a change file? It is a markdown file on the .changes folder, should look like this:

---
"tauri-build": patch
---

...The change description that will be pushed to the changelog

@SyntaxRules

Copy link
Copy Markdown
Contributor Author

@lucasfernog Done
Link to it

@lucasfernog

Copy link
Copy Markdown
Member

Thanks for this PR!

@lucasfernog
lucasfernog merged commit 59b6ee8 into tauri-apps:next Nov 16, 2021
@SyntaxRules
SyntaxRules deleted the feat/win-sdk-param branch November 16, 2021 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot run a new app on Windows

2 participants