[package]
name = "bds-ui"
edition.workspace = true
version.workspace = true
license.workspace = true
authors.workspace = true

[dependencies]
bds-core = { workspace = true }
bds-editor = { workspace = true }
bds-server = { workspace = true }
iced = { workspace = true }
muda = { workspace = true }
rfd = { workspace = true }
serde_json = { workspace = true }
regex = { workspace = true }
dirs = { workspace = true }
chrono = { workspace = true }
open = { workspace = true }
anyhow = { workspace = true }
tokio = { workspace = true }
uuid = { workspace = true }
futures = { workspace = true }
wry = "0.56.0"

[target.'cfg(target_os = "macos")'.dependencies]
objc2 = "0.6"
objc2-foundation = { version = "0.3", features = ["objc2-core-services"] }

[dev-dependencies]
fluent-syntax = { workspace = true }
serde_yaml = { workspace = true }
syn = { version = "3", features = ["full", "visit"] }
tempfile = "3"

[build-dependencies]
winresource = "0.1"

[package.metadata.packager]
product-name = "Blogging Desktop Server"
identifier = "de.rfc1437.ruds"
description = "A desktop application for writing and publishing static blogs."
before-packaging-command = "cargo run --quiet -p bds-package-runtime"
before-each-package-command = "cargo run --quiet -p bds-package-runtime -- sign-app-for-dmg"
binaries = [
    { path = "bds-ui", main = true },
    { path = "bds-cli" },
    { path = "bds-mcp" },
]
resources = [
    { src = "../../target/release/bds-runtime/*", target = "." },
]
deep-link-protocols = [{ schemes = ["ruds"] }]
icons = [
    "assets/app-icons/bds.icns",
    "assets/app-icons/bds.ico",
    "assets/app-icons/bds.png",
]

[package.metadata.packager.macos]
minimum-system-version = "26.0"

[package.metadata.packager.deb]
depends = [
    "libc6",
    "libdbus-1-3",
    "libgtk-3-0t64 | libgtk-3-0",
    "libstdc++6",
    "libwebkit2gtk-4.1-0",
    "libxdo3",
]

[package.metadata.packager.nsis]
installer-icon = "assets/app-icons/bds.ico"

[package.metadata.cargo-machete]
ignored = ["winresource"]
