Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Cross platform compilation issues that arise after v2 iteration #12312

Open
shi-lai-mu opened this issue Jan 8, 2025 · 3 comments
Open
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@shi-lai-mu
Copy link

Describe the bug

Compiling Winwos on MacOS with Tauri V2.02 is normal through "pnpm Tauri build -- target x86_64 pc windows gnu".
But in the same environment as V2.2.0, this error is now reported.

Reproduction

No response

Expected behavior

No response

Full tauri info output

> tauri "info"


[✔] Environment
    - OS: Mac OS 15.1.1 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 21.7.3
    - pnpm: 9.4.0
    - yarn: 1.22.17
    - npm: 10.5.0

[-] Packages
    - tauri 🦀: 2.2.0
    - tauri-build 🦀: 2.0.4
    - wry 🦀: 0.48.0
    - tao 🦀: 0.31.1
    - @tauri-apps/api : 2.2.0
    - @tauri-apps/cli : 2.2.2

[-] Plugins
    - tauri-plugin-updater 🦀: 2.3.1
    - @tauri-apps/plugin-updater : 2.3.1
    - tauri-plugin-os 🦀: 2.2.0
    - @tauri-apps/plugin-os : 2.2.0
    - tauri-plugin-dialog 🦀: 2.2.0
    - @tauri-apps/plugin-dialog : 2.2.0
    - tauri-plugin-fs 🦀: 2.2.0
    - @tauri-apps/plugin-fs : 2.2.0
    - tauri-plugin-log 🦀: 2.2.0
    - @tauri-apps/plugin-log : 2.2.0
    - tauri-plugin-process 🦀: 2.2.0
    - @tauri-apps/plugin-process : 2.2.0
    - tauri-plugin-http 🦀: 2.2.0
    - @tauri-apps/plugin-http : 2.2.0
    - tauri-plugin-shell 🦀: 2.2.0
    - @tauri-apps/plugin-shell : 2.2.0

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: Vue.js
    - bundler: Rollup

Stack trace

Finished `release` profile [optimized] target(s) in 56.98s
    Built application at: /test/src-tauri/target/x86_64-pc-windows-gnu/release/name.exe
    Warn Cross-platform compilation is experimental and does not support all features. Please use a matching host system for full compatibility.
    Warn Signing, by default, is only supported on Windows hosts, but you can specify a custom signing command in `bundler > windows > sign_command`, for now, skipping signing the installer...
    Warn ignoring msi
    Info Target: x64
    Running makensis.exe to produce /test/src-tauri/target/x86_64-pc-windows-gnu/release/bundle/nsis/name_1.1.8+7_x64-setup.exe
failed to bundle project: error running makensis.exe: No such file or directory (os error 2)
    Error failed to bundle project: error running makensis.exe: No such file or directory (os error 2)

Additional context

No response

@shi-lai-mu shi-lai-mu added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jan 8, 2025
@FabianLars
Copy link
Member

Please run it with the --verbose flag as well and show us the new logs you get from that.

@shi-lai-mu
Copy link
Author

shi-lai-mu commented Jan 9, 2025

Please run it with the --verbose flag as well and show us the new logs you get from that.

Yes, it is --verbose is very helpful. I found that the error was caused by executing the makensis command instead of a missing file. I solved it by using brew install makensis, successfully solved the packaging problem.

Running [tauri_bundler::utils] Command makensis -INPUTCHARSET UTF8 -OUTPUTCHARSET UTF8 -V3 /test/src-tauri/target/x86_64-pc-windows-gnu/release/nsis/x64/installer.nsi

@shi-lai-mu
Copy link
Author

However, when I installed it on windows server 2022 and tried to run it, I got an error that WebView2Loader.dll could not be found. The WebView2Loader.dll file was forgotten in src-tauri/target/x86_64-pc-windows-gnu/release/ and was not packaged into setup.exe. When I tried to put WebView2Loader.dll in the Windows software installation directory, it could start normally. How can I solve the WebView2Loader.dll packaging problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants