feat: `TAURI_SIGNTOOL_PATH` environment variable for specifying the path to signtool.exe. (#10588)

This commit is contained in:
anatawa12 2024-08-13 20:49:28 +09:00 committed by GitHub
parent fedf93eb7e
commit f8d658ea1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-bundler": patch:feat
---
`TAURI_SIGNTOOL_PATH` environment variable for specifying the path to signtool.exe.

View File

@ -59,6 +59,10 @@ fn signtool() -> Option<PathBuf> {
static SIGN_TOOL: OnceLock<crate::Result<PathBuf>> = OnceLock::new();
SIGN_TOOL
.get_or_init(|| {
if let Some(signtool) = std::env::var_os("TAURI_SIGNTOOL_PATH") {
return Ok(PathBuf::from(signtool));
}
const INSTALLED_ROOTS_REGKEY_PATH: &str = r"SOFTWARE\Microsoft\Windows Kits\Installed Roots";
const KITS_ROOT_REGVALUE_NAME: &str = r"KitsRoot10";