dx bundle fail on windows
ERROR Failed to bundle project: BundlerError
371.923s INFO Copying app to output directory...
375.582s ERROR Failed to bundle project: BundlerError(
Error {
context: "error running candle.exe",
source: GenericError(
"failed to run C:\\Users\\hcq\\AppData\\Local\\tauri\\WixTools314\\candle.exe",
),
},
)
375.594s ERROR err=BundleFailed(BundlerError(error running candle.exe
The same error.
I got it sort of working, after following workarounds:
-
(seems like many have already done this) added
icons/icon.ico -
I added to Dioxus.toml:
[bundle]
publisher = "my example publisher"
identifier = "com.example.app"
-
I renamed
target/debug/<APPNAME>/bundle/windows/<APPNAME>to<APPNAME>.exe -
I manually ran WiX:
~\AppData\Local\tauri\WixTools314\light.exe -ext WixUIExtension -loc .\target/dx/<APPNAME>/bundle/windows\wix\x64\locale.wxl .\target\dx\<APPNAME>\bundle\windows\wix\x64\main.wixobj
This successfully generated a working installer, however, app lacked permission to create its WebView2 cache in the default installed location (C:\Program Files\<APPNAME>\). Installing, to a different location, under my user folder, worked fine.
dx --version: dioxus 0.6.0 (ccf500c)
The same error:
dx bundle --platform desktop
17.829s INFO Bundling app...
17.852s INFO Copying asset (0/3): C:\Users\liigo\tmp\hidx06\myhotdog\assets\header.svg
17.852s INFO Copying app to output directory...
18.820s ERROR Failed to bundle project: BundlerError(
Error {
context: "error running candle.exe",
source: GenericError(
"failed to run C:\\Users\\liigo\\AppData\\Local\\tauri\\WixTools314\\candle.exe",
),
},
)
18.823s ERROR err=BundleFailed(BundlerError(error running candle.exe
Caused by:
`failed to run C:\Users\liigo\AppData\Local\tauri\WixTools314\candle.exe`))
But tauri build works well (both tauri and dioxus use the same wix as i known):
cargo tauri build
Running beforeBuildCommand `dx build --release`
0. 1s INFO Building project...
......
5.461s INFO Build completed successfully! 🚀 path="C:\\Users\\liigo\\tmp\\hi-tauri-dioxus\\target\\dx\\hi-tauri-dioxus-ui\\release\\web\\public"
Compiling hi-tauri-dioxus v0.1.0 (C:\Users\liigo\tmp\hi-tauri-dioxus\src-tauri)
Finished `release` profile [optimized] target(s) in 1m 12s
Built application at: E:\tmp\RUST_DIR\CARGO_TARGET_DIR\release\hi-tauri-dioxus.exe
Info Target: x64
Running candle for "main.wxs"
Running light to produce E:\tmp\RUST_DIR\CARGO_TARGET_DIR\release\bundle\msi\hi-tauri-dioxus_0.1.0_x64_en-US.msi
Finished 1 bundle at:
E:\tmp\RUST_DIR\CARGO_TARGET_DIR\release\bundle\msi\hi-tauri-dioxus_0.1.0_x64_en-US.msi
still having this same error on 0.6.2
during my exploration on #3688, I realized that the shortcut created by nsis (and probably msi as well) don't work anymore after #3482,
since the shortcut created by the nsis bundler takes krate.bundled_app_name(), to which it adds .exe.
the resulting link targets appname.exe.exe
alright ! I found the culprit for the shortcut problem, it was on the executable name here, #3482 helped a lot!
The shortcut, the uninstaller not deleting the executable, as well as WiX still not working on my first reply here, all now work on my side !
1 line PR incoming