tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
79.58k stars 2.36k forks source link

[bug] TaskDialogIndirect issue when building Windows cross platform #10164

Open minht11 opened 4 days ago

minht11 commented 4 days ago

Describe the bug

After compiling Tauri 2 Windows app cross platform. Launching it produces TaskDialogIndirect issue when building Windows cross platform

Reproduction

Create new Tauri 2 app. Try to build it on linux/macos with command:

cargo tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc

After installing application you get error Entry point TaskDialogIndirect could not be located

If I build application on Windows it works fine, so only cross install is broken.

Expected behavior

No error when launching appllication on Windows.

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.5.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: 1.79.0-aarch64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.11.1
    - pnpm: 9.1.3
    - npm: 10.2.4

[-] Packages
    - tauri [RUST]: 2.0.0-beta.22
    - tauri-build [RUST]: 2.0.0-beta.17
    - wry [RUST]: 0.40.1
    - tao [RUST]: 0.28.1
    - tauri-cli [RUST]: 2.0.0-beta.20
    - @tauri-apps/api [NPM]: 2.0.0-beta.13
    - @tauri-apps/cli [NPM]: 2.0.0-beta.20

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../frontend/dist
    - devUrl: http://localhost:1420/

Stack trace

No response

Additional context

I was using guide from Tauri 1 https://tauri.app/v1/guides/building/cross-platform/#building-the-app I know it was bit outdated, but with some changes things compile successfully just don't run.

FabianLars commented 4 days ago

Thanks for the report! It still works fine for me when i'm building on WSL. Would it be possible to share a minimal reproduction repo that causes this issue for you? I'll try it out on my macbook too then :)

minht11 commented 3 days ago

I added reproduction https://github.com/minht11/tauri-TaskDialogIndirect-issue. I am using moon task runner to install additional cargo things, but that shouldn't be needed if you have them.