DioxusLabs / dioxus

Fullstack app framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
20.15k stars 772 forks source link

Feature parity with `tauri build` #1437

Open heyrict opened 1 year ago

heyrict commented 1 year ago

Specific Demand

Currently, dioxus has two building systems, dx build and dx bundle. While dx build is a wrapper around cargo build with side-effects, dx bundle is a wrapper around tauri_bundler::bundle::bundle_project.

What tauri does in tauri build is to Run side-effects in tauri_build::build(), check the config, then bundle_project(), and update the build binary/installer after bundling.

Currently, both two building commands lacks the side-effects from tauri, resulting in webview not properly bundled in the windows installer (see #1321), no app signing, and potentially some mobile/Mac related issues.

Implement Suggestion

The pre- and post-bundling side-effects should be implemented in either command, or preferrably use the same command for building (see #1387).

ImprovingRigmarole commented 10 months ago

Greetings,

I was about to make a new issue, but found this one and it seems related enough :

Environment:

I wanted to run dx bundle --release --package nsis, but dx panicked "nsis is not a valid package type"

and by checking the PackageType enum and mapping to tauri_bundler, the PackageType::Nsis doesn't exist in dioxus-cli, while it does exist in tauri_bundler 1.3.0.

So the only current way to get an Nsis bundle is to not specify --package, and tauri_builder gets its defaults of building all packet types for the platform (here both Msi and Nsis).