Three things the Windows build showed the entry point was missing, and that a Linux build never asks for. `--version`, answered before the logger and the crash hook install: a binary built on a machine that cannot run the application — the Linux CI producing the Windows executable, checked under Wine — needs an exit that proves it starts without opening a window or touching the user's directories. It is the smoke test in docs/windows.md §6. A GUI-subsystem executable in release, or Windows keeps a console window open behind the application for the life of the process. Debug builds keep the console, which is where their log goes. A resource block, or Explorer, the Start Menu and the taskbar show the generic executable icon and the Details tab is empty. build.rs wraps the PNG every other platform uses into an .ico at build time — an ICO entry may be a PNG, so the wrapper is a 22-byte header — and hands it to winresource with the version cargo already knows. The crate is an unconditional build-dependency because a cfg(windows) on one is evaluated against the host, which here is Linux; the script itself returns before touching it on any other target.
28 lines
986 B
TOML
28 lines
986 B
TOML
[package]
|
|
name = "darkroom-desktop"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
|
|
[dependencies]
|
|
dr-ui = { workspace = true, features = ["scene-model"] }
|
|
# For the panic hook and the log sink, directly rather than through dr-ui:
|
|
# both have to be installed before `dr_ui::run`, because a panic during startup
|
|
# is exactly the one they exist to catch and record (NFR-OPS-1, NFR-OPS-2).
|
|
dr-plat.workspace = true
|
|
anyhow.workspace = true
|
|
env_logger.workspace = true
|
|
log.workspace = true
|
|
|
|
# The Windows resource block — icon and version — compiled in by build.rs.
|
|
# Unconditional rather than under `[target.'cfg(windows)']`, because a cfg on
|
|
# a build-dependency is evaluated against the *host* — the machine running
|
|
# the build script — and this is built for Windows from Linux. The script
|
|
# itself returns before touching the crate on every other target.
|
|
[build-dependencies]
|
|
winresource = "0.1"
|
|
|
|
[features]
|
|
default = []
|