TaskDialogIndirect only exists in comctl32 6, which Windows gives to processes whose executable asks for it;
php.exe does not, so the DLL failed to load ("the specified procedure could not be found"). comctl32 is now
delay-loaded and jt_run() activates a Common-Controls 6 context on the main thread first.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JkYTqpYNZKwTnRZHQRD5HP
9 lines
435 B
Rust
9 lines
435 B
Rust
fn main() {
|
|
// Windows: comctl32 is loaded at its first use, after the runtime activated version 6 of it (lib.rs,
|
|
// common_controls): a DLL loaded by php.exe can not import TaskDialogIndirect directly.
|
|
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") {
|
|
println!("cargo:rustc-link-arg=/DELAYLOAD:comctl32.dll");
|
|
println!("cargo:rustc-link-lib=delayimp");
|
|
}
|
|
tauri_build::build()
|
|
}
|