diff --git a/docs-src/0.4/en/CLI/configure.md b/docs-src/0.4/en/CLI/configure.md index 0f2f3667c..b3519c52d 100644 --- a/docs-src/0.4/en/CLI/configure.md +++ b/docs-src/0.4/en/CLI/configure.md @@ -192,3 +192,100 @@ script = [] [[web.proxy]] backend = "http://localhost:8000/api/" ``` + +## Desktop and TUI + +For the desktop and TUI (terminal user interface) renderers, +Dioxus bundles your app using `dx bundle` and the [tauri-bundler](https://docs.rs/crate/tauri-bundler/latest). + +You can check out the [tauri-bundler docs.rs](https://docs.rs/tauri-bundler/latest/tauri_bundler/bundle/index.html). +This covers all the different settings. Keep in mind that `FooSettings` becomes just `foo` in the TOML. + +Tauri uses a JSON file for the configuration, but Dioxus uses TOML. So this tauri-bundler example: +```json +{ + "package": { + "productName": "Your Awesome App", + "version": "0.1.0" + }, + "tauri": { + "bundle": { + "active": true, + "identifier": "com.my.app", + "shortDescription": "", + "longDescription": "", + "copyright": "Copyright (c) You 2021. All rights reserved.", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ], + "resources": ["./assets/**/*.png"], + "deb": { + "depends": ["debian-dependency1", "debian-dependency2"] + }, + "macOS": { + "frameworks": [], + "minimumSystemVersion": "10.11", + "license": "./LICENSE" + }, + "externalBin": ["./sidecar-app"] + } + } +} +``` + +needs to be translated to TOML. + +However, Dioxus has Dioxus-specific mandatory TOML fields that we need to include as well. +We can see what fields are mandatory from the documentation above. + +Additionally, we also need to remove `tauri` from the TOML headers. + +This is our final `Dioxus.toml`: + +```toml +# From Dioxus +[application] +name = "Your Awesome App" +default_platform = "desktop" + +# You might only be running on desktop, but the following "web" values are still required. +[web.app] +title = "Awesome" + +[web.watcher] + +[web.resource.dev] + +# From the tauri-bundler. +[package] +productName = "Your Awesome App" +version = "0.1.0" + +[bundle] +active = true +identifier = "com.my.app" +shortDescription = "" +longDescription = "" +copyright = "Copyright (c) You 2021. All rights reserved." +icon = [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" +] +resources = [ "./assets/**/*.png" ] +externalBin = [ "./sidecar-app" ] + +[bundle.deb] +depends = [ "debian-dependency1", "debian-dependency2" ] + +[bundle.macOS] +frameworks = [ ] +minimumSystemVersion = "10.11" +license = "./LICENSE" +``` \ No newline at end of file