diff --git a/.gitignore b/.gitignore index 546a66881a..15f4be8a87 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ work/ /assets/* !/assets/logo.png !/assets/logo.svg +!/assets/logo.ico carve/ # rpf9-explorer's index cache (archive paths and entry names); see "Full-scan indexes" in docs/design.md RpfPreview/ diff --git a/README.md b/README.md index 9041367d48..982b7fe33c 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,8 @@ The port isn't downloaded ready-made. It's built on your PC from your own copy. and otherwise tells you what to do. 3. Double-click **`Build.bat`**. On Linux or macOS, run **`./Build.sh`** from a terminal instead (see [docs/linux.md](docs/linux.md) for Linux). + Prefer a window? [`builder/`](builder) is a desktop launcher (Rust, `cargo build --release`) that + builds the port, manages its mods and starts it. It finds your copy of the game by itself: it looks in Downloads, Desktop, Documents (also where Windows keeps them, such as in OneDrive), Games, your home folder and the top of every drive, two folders deep. It recognises the diff --git a/assets/logo.ico b/assets/logo.ico new file mode 100644 index 0000000000..a48a34f2a3 Binary files /dev/null and b/assets/logo.ico differ diff --git a/builder/.gitignore b/builder/.gitignore new file mode 100644 index 0000000000..2f7896d1d1 --- /dev/null +++ b/builder/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/builder/Cargo.lock b/builder/Cargo.lock new file mode 100644 index 0000000000..c8a66b6456 --- /dev/null +++ b/builder/Cargo.lock @@ -0,0 +1,4336 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ab_glyph" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + +[[package]] +name = "accesskit" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99b76d84ee70e30a4a7e39ab9018e2b17a6a09e31084176cc7c0b2dec036ba45" + +[[package]] +name = "accesskit_atspi_common" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5393c75d4666f580f4cac0a968bc97c36076bb536a129f28210dac54ee127ed" +dependencies = [ + "accesskit", + "accesskit_consumer", + "atspi-common", + "serde", + "thiserror 1.0.69", + "zvariant 4.2.0", +] + +[[package]] +name = "accesskit_consumer" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a12dc159d52233c43d9fe5415969433cbdd52c3d6e0df51bda7d447427b9986" +dependencies = [ + "accesskit", + "immutable-chunkmap", +] + +[[package]] +name = "accesskit_macos" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfc6c1ecd82053d127961ad80a8beaa6004fb851a3a5b96506d7a6bd462403f6" +dependencies = [ + "accesskit", + "accesskit_consumer", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "once_cell", +] + +[[package]] +name = "accesskit_unix" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be7f5cf6165be10a54b2655fa2e0e12b2509f38ed6fc43e11c31fdb7ee6230bb" +dependencies = [ + "accesskit", + "accesskit_atspi_common", + "async-channel", + "async-executor", + "async-task", + "atspi", + "futures-lite", + "futures-util", + "serde", + "zbus 4.4.0", +] + +[[package]] +name = "accesskit_windows" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "974e96c347384d9133427167fb8a58c340cb0496988dacceebdc1ed27071023b" +dependencies = [ + "accesskit", + "accesskit_consumer", + "paste", + "static_assertions", + "windows 0.58.0", + "windows-core 0.58.0", +] + +[[package]] +name = "accesskit_winit" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aea3522719f1c44564d03e9469a8e2f3a98b3a8a880bd66d0789c6b9c4a669dd" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_unix", + "accesskit_windows", + "raw-window-handle", + "winit", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fca89247609239eeb6915e6991111866b92d7b31025e69302bbf430cc4d2c38" +dependencies = [ + "cfg-if", + "getrandom 0.4.3", + "once_cell", + "serde", + "version_check", + "zerocopy", +] + +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags 2.13.2", + "cc", + "jni", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys 0.6.0+11769913", + "num_enum", + "thiserror 2.0.21", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "arboard" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb9553e62312c8756a5979254fc6d7da8bbeb5986a1e17037fab932f7037917" +dependencies = [ + "clipboard-win", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "parking_lot", + "percent-encoding", + "windows-sys 0.61.2", + "x11rb", +] + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "ash" +version = "0.38.0+1.3.281" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" +dependencies = [ + "libloading", +] + +[[package]] +name = "ashpd" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f3f79755c74fd155000314eb349864caa787c6592eace6c6882dad873d9c39" +dependencies = [ + "async-fs", + "async-net", + "enumflags2", + "futures-channel", + "futures-util", + "rand 0.9.5", + "raw-window-handle", + "serde", + "serde_repr", + "url", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "zbus 5.19.0", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5" +dependencies = [ + "async-lock", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix 1.1.6", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0876700b0d007ad25d5508865a4259c3af9af6d296bf663a0d586d0bc3369f6f" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-net" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" +dependencies = [ + "async-io", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix 1.1.6", +] + +[[package]] +name = "async-recursion" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "async-signal" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 1.1.6", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "atspi" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be534b16650e35237bb1ed189ba2aab86ce65e88cc84c66f4935ba38575cecbf" +dependencies = [ + "atspi-common", + "atspi-connection", + "atspi-proxies", +] + +[[package]] +name = "atspi-common" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1909ed2dc01d0a17505d89311d192518507e8a056a48148e3598fef5e7bb6ba7" +dependencies = [ + "enumflags2", + "serde", + "static_assertions", + "zbus 4.4.0", + "zbus-lockstep", + "zbus-lockstep-macros", + "zbus_names 3.0.0", + "zvariant 4.2.0", +] + +[[package]] +name = "atspi-connection" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "430c5960624a4baaa511c9c0fcc2218e3b58f5dbcc47e6190cafee344b873333" +dependencies = [ + "atspi-common", + "atspi-proxies", + "futures-lite", + "zbus 4.4.0", +] + +[[package]] +name = "atspi-proxies" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e6c5de3e524cf967569722446bcd458d5032348554d9a17d7d72b041ab7496" +dependencies = [ + "atspi-common", + "serde", + "zbus 4.4.0", + "zvariant 4.2.0", +] + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "bit-set" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2 0.5.3", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.5", +] + +[[package]] +name = "blocking" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "bumpalo" +version = "3.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "776dfebd015e2d8732c684a2c71003674ccb49457b539b9e82151ba38e96dd7c" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.13.2", + "log", + "polling", + "rustix 0.38.44", + "slab", + "thiserror 1.0.69", +] + +[[package]] +name = "calloop" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b32313e937c8721c9d17ee9bf60699a6402b4b7c2cb6ac1bee0ffcaa4b4e5e" +dependencies = [ + "bitflags 2.13.2", + "polling", + "rustix 1.1.6", + "tracing", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop 0.13.0", + "rustix 0.38.44", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" +dependencies = [ + "calloop 0.14.5", + "rustix 1.1.6", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cc" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02f0e023adb368345ce0ca6cdfc0f24a06554468d0e8503e14a0841de79bfa69" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + +[[package]] +name = "clipboard-win" +version = "5.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052af7878466feccda12ba7a6a67d019d712f296809559b47c12c8cc196d3a9a" +dependencies = [ + "error-code", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + +[[package]] +name = "com" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" +dependencies = [ + "com_macros", +] + +[[package]] +name = "com_macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" +dependencies = [ + "com_macros_support", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "com_macros_support" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd9ae8fcb3ea71b0b26338b4ffb13006bb175de8fd07921089a906ce7e5e6945" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "libc", + "objc2 0.6.5", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "dlib" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" +dependencies = [ + "libloading", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "ecolor" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775cfde491852059e386c4e1deb4aef381c617dc364184c6f6afee99b87c402b" +dependencies = [ + "bytemuck", + "emath", +] + +[[package]] +name = "eframe" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ac2645a9bf4826eb4e91488b1f17b8eaddeef09396706b2f14066461338e24f" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "egui-wgpu", + "egui-winit", + "egui_glow", + "glow 0.14.2", + "glutin", + "glutin-winit", + "image", + "js-sys", + "log", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "web-time", + "winapi", + "windows-sys 0.52.0", + "winit", +] + +[[package]] +name = "egui" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53eafabcce0cb2325a59a98736efe0bf060585b437763f8c476957fb274bb974" +dependencies = [ + "accesskit", + "ahash", + "emath", + "epaint", + "log", + "nohash-hasher", +] + +[[package]] +name = "egui-wgpu" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d00fd5d06d8405397e64a928fa0ef3934b3c30273ea7603e3dc4627b1f7a1a82" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "epaint", + "log", + "thiserror 1.0.69", + "type-map", + "web-time", + "wgpu", + "winit", +] + +[[package]] +name = "egui-winit" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a9c430f4f816340e8e8c1b20eec274186b1be6bc4c7dfc467ed50d57abc36c6" +dependencies = [ + "accesskit_winit", + "ahash", + "arboard", + "egui", + "log", + "raw-window-handle", + "smithay-clipboard", + "web-time", + "webbrowser", + "winit", +] + +[[package]] +name = "egui_glow" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e39bccc683cd43adab530d8f21a13eb91e80de10bcc38c3f1c16601b6f62b26" +dependencies = [ + "ahash", + "bytemuck", + "egui", + "glow 0.14.2", + "log", + "memoffset", + "wasm-bindgen", + "web-sys", + "winit", +] + +[[package]] +name = "emath" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1fe0049ce51d0fb414d029e668dd72eb30bc2b739bf34296ed97bd33df544f3" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "epaint" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a32af8da821bd4f43f2c137e295459ee2e1661d87ca8779dfa0eaf45d870e20f" +dependencies = [ + "ab_glyph", + "ahash", + "bytemuck", + "ecolor", + "emath", + "epaint_default_fonts", + "log", + "nohash-hasher", + "parking_lot", +] + +[[package]] +name = "epaint_default_fonts" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "483440db0b7993cf77a20314f08311dbe95675092405518c0677aa08c151a3ea" + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "errno" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "error-code" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7" + +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" + +[[package]] +name = "flate2" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4" +dependencies = [ + "crc32fast", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix 1.1.6", + "windows-link", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "wasm-bindgen", +] + +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + +[[package]] +name = "glow" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glow" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" +dependencies = [ + "bitflags 2.13.2", + "cfg_aliases 0.2.2", + "cgl", + "dispatch2", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "libloading", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "once_cell", + "raw-window-handle", + "wayland-sys", + "windows-sys 0.52.0", + "x11-dl", +] + +[[package]] +name = "glutin-winit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" +dependencies = [ + "cfg_aliases 0.2.2", + "glutin", + "raw-window-handle", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" +dependencies = [ + "gl_generator", + "windows-sys 0.52.0", +] + +[[package]] +name = "glutin_glx_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" +dependencies = [ + "gl_generator", + "x11-dl", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "gpu-alloc" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45cf04b2726f02df5508c6de726acdc90cdf97ac771a9a0ffd8ba10a6e696bf9" +dependencies = [ + "bitflags 2.13.2", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bbed164dd10ed526c2e4fe3e721ca4a71c61730e5aafac6844b417b3227058" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "gpu-allocator" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" +dependencies = [ + "log", + "presser", + "thiserror 1.0.69", + "winapi", + "windows 0.52.0", +] + +[[package]] +name = "gpu-descriptor" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" +dependencies = [ + "bitflags 2.13.2", + "gpu-descriptor-types", + "hashbrown 0.15.5", +] + +[[package]] +name = "gpu-descriptor-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "735eaa21a6a5ffb2e84362faaeb90c05ba8e19797ca30428478cb6ea3a4921bc" + +[[package]] +name = "hassle-rs" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" +dependencies = [ + "bitflags 2.13.2", + "com", + "libc", + "libloading", + "thiserror 1.0.69", + "widestring", + "winapi", +] + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + +[[package]] +name = "icu_collections" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" + +[[package]] +name = "icu_properties" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" + +[[package]] +name = "icu_provider" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "moxcms", + "num-traits", + "png", +] + +[[package]] +name = "immutable-chunkmap" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f5098ef24cf336da7cdf71d9e5aa8ba82aaef01b7413d754c11b6857c2434c6" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.2", +] + +[[package]] +name = "itoa" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.21", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "khronos-egl" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" +dependencies = [ + "libc", + "libloading", + "pkg-config", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "leonida-launcher" +version = "0.1.0" +dependencies = [ + "eframe", + "image", + "rfd", + "serde_json", + "winresource", +] + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "bitflags 2.13.2", + "libc", + "plain", + "redox_syscall 0.9.5", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "litrs" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b614978e47ce529faee66579f2b2fe19c94aa96d910a6a9a8043b2b02d8175" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memmap2" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b0ca1155a9ecc25aa12e8313a119f32edf0255fea2f44839c4ac0a12b2ac157" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metal" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +dependencies = [ + "bitflags 2.13.2", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", + "paste", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "naga" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.13.2", + "cfg_aliases 0.1.1", + "codespan-reporting", + "hexf-parse", + "indexmap", + "log", + "rustc-hash 1.1.0", + "spirv", + "termcolor", + "thiserror 1.0.69", + "unicode-xid", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys 0.6.0+11769913", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.5.0+25.2.9519653" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases 0.2.2", + "libc", + "memoffset", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d5490aaf8f1d7cf7688dfa9b0ce07900e168852c45cd2c03f534dfd27cfd0b" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "libc", + "objc2 0.5.3", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation 0.2.2", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-contacts", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "dispatch", + "libc", + "objc2 0.5.3", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "orbclient" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747" +dependencies = [ + "libc", + "libredox", +] + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6c2123f4708bbd422630a6dae7c03f678b1ce1f1c99e4c4b3beac69c8174cc9" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "358938fd6df944c1e44bb328b60fb275f13c804aac47ba26a1165d45a3f87756" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752" + +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.6", + "windows-sys 0.61.2", +] + +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" + +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + +[[package]] +name = "quick-xml" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "redox_syscall" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "580c875845b41ecb1564ad1ae4703044cef774145e3d7a94dc2b3fa7c97868fd" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + +[[package]] +name = "rfd" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2bee61e6cffa4635c72d7d81a84294e28f0930db0ddcb0f66d10244674ebed" +dependencies = [ + "ashpd", + "block2 0.6.2", + "dispatch2", + "js-sys", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "pollster", + "raw-window-handle", + "urlencoding", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "serde_spanned" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c187e0a369471c550af028cba56d4f4fa2a489ad28151ae95a4d340a2a8b782" +dependencies = [ + "serde_core", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.16.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3244542535d5de959d90ec55d1b5ff0fd2bb7b1310223907d5f11932847f7b59" + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.13.2", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.44", + "thiserror 1.0.69", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" +dependencies = [ + "bitflags 2.13.2", + "calloop 0.14.5", + "calloop-wayland-source 0.4.1", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 1.1.6", + "thiserror 2.0.21", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-experimental", + "wayland-protocols-misc", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-clipboard" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" +dependencies = [ + "libc", + "smithay-client-toolkit 0.20.0", + "wayland-backend", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "spirv" +version = "0.3.0+sdk-1.3.268.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix 1.1.6", + "windows-sys 0.61.2", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "tinystr" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.54.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" +dependencies = [ + "pin-project-lite", +] + +[[package]] +name = "toml" +version = "1.2.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b1f26e9485c1fa43ee89fe76e9f3fb9e2e52bb227f8594b4d687496b83d073" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime", + "toml_parser", + "toml_writer", + "winnow", +] + +[[package]] +name = "toml_datetime" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.21+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88497dab46de5bf343ec66b05c251e48c6213f3e9170c70a70a823f7abe886a4" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.1.7+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb28d6e049a9766c3bd91a8326e6179f5b132dec87906bb97018ef7a2f3431a" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.2.0+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + +[[package]] +name = "type-map" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" +dependencies = [ + "rustc-hash 2.1.3", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset", + "tempfile", + "windows-sys 0.61.2", +] + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + +[[package]] +name = "utf8_iter" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] + +[[package]] +name = "utf_types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" + +[[package]] +name = "uuid" +version = "1.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64" +dependencies = [ + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42e295b7452c4604982280d8586001fcad9b8b201cac67bca9771e7a7475403" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" +dependencies = [ + "cfg-if", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.10", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wayland-backend" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" +dependencies = [ + "cc", + "downcast-rs", + "rustix 1.1.6", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" +dependencies = [ + "bitflags 2.13.2", + "rustix 1.1.6", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.13.2", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" +dependencies = [ + "rustix 1.1.6", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-experimental" +version = "20250721.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-misc" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0" +dependencies = [ + "proc-macro2", + "quick-xml 0.41.0", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webbrowser" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73e91ccd4698f2647d6137e8eb17a3f1dcfd63810be9029fb2398f507279b95b" +dependencies = [ + "jni", + "log", + "ndk-context", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "url", + "web-sys", +] + +[[package]] +name = "wgpu" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" +dependencies = [ + "arrayvec", + "cfg_aliases 0.1.1", + "document-features", + "js-sys", + "log", + "parking_lot", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" +dependencies = [ + "arrayvec", + "bit-vec", + "bitflags 2.13.2", + "cfg_aliases 0.1.1", + "document-features", + "indexmap", + "log", + "naga", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle", + "rustc-hash 1.1.0", + "smallvec", + "thiserror 1.0.69", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-hal" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bitflags 2.13.2", + "cfg_aliases 0.1.1", + "core-graphics-types", + "glow 0.13.1", + "glutin_wgl_sys", + "gpu-alloc", + "gpu-allocator", + "gpu-descriptor", + "hassle-rs", + "js-sys", + "khronos-egl", + "libc", + "libloading", + "log", + "metal", + "naga", + "ndk-sys 0.5.0+25.2.9519653", + "objc", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle", + "renderdoc-sys", + "rustc-hash 1.1.0", + "smallvec", + "thiserror 1.0.69", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "winapi", +] + +[[package]] +name = "wgpu-types" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" +dependencies = [ + "bitflags 2.13.2", + "js-sys", + "web-sys", +] + +[[package]] +name = "widestring" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core 0.52.0", + "windows-targets", +] + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winit" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.13.2", + "block2 0.5.1", + "bytemuck", + "calloop 0.13.0", + "cfg_aliases 0.2.2", + "concurrent-queue", + "core-foundation", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "smithay-client-toolkit 0.19.2", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" +dependencies = [ + "memchr", +] + +[[package]] +name = "winresource" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bc6d36480b829272a5bdabf08e6dca8004761c1da7e35efef800540c66221b" +dependencies = [ + "toml", + "version_check", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix 1.1.6", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + +[[package]] +name = "xcursor" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23" + +[[package]] +name = "xdg-home" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.13.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xml-rs" +version = "0.8.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" + +[[package]] +name = "yoke" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", + "synstructure", +] + +[[package]] +name = "zbus" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix", + "ordered-stream", + "rand 0.8.8", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "windows-sys 0.52.0", + "xdg-home", + "zbus_macros 4.4.0", + "zbus_names 3.0.0", + "zvariant 4.2.0", +] + +[[package]] +name = "zbus" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "libc", + "ordered-stream", + "rustix 1.1.6", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow", + "zbus_macros 5.19.0", + "zbus_names 4.3.5", + "zvariant 5.15.1", +] + +[[package]] +name = "zbus-lockstep" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca2c5dceb099bddaade154055c926bb8ae507a18756ba1d8963fd7b51d8ed1d" +dependencies = [ + "zbus_xml", + "zvariant 4.2.0", +] + +[[package]] +name = "zbus-lockstep-macros" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709ab20fc57cb22af85be7b360239563209258430bccf38d8b979c5a2ae3ecce" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "zbus-lockstep", + "zbus_xml", + "zvariant 4.2.0", +] + +[[package]] +name = "zbus_macros" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", + "zvariant_utils 2.1.0", +] + +[[package]] +name = "zbus_macros" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.10", + "zbus_names 4.3.5", + "zvariant 5.15.1", + "zvariant_utils 4.2.0", +] + +[[package]] +name = "zbus_names" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +dependencies = [ + "serde", + "static_assertions", + "zvariant 4.2.0", +] + +[[package]] +name = "zbus_names" +version = "4.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812a12be4ead7a59e18ea8f047d08add0066b73bc62fc1467066a2472ae088dd" +dependencies = [ + "serde", + "winnow", + "zvariant 5.15.1", +] + +[[package]] +name = "zbus_xml" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3f374552b954f6abb4bd6ce979e6c9b38fb9d0cd7cc68a7d796e70c9f3a233" +dependencies = [ + "quick-xml 0.30.0", + "serde", + "static_assertions", + "zbus_names 3.0.0", + "zvariant 4.2.0", +] + +[[package]] +name = "zcheapstr" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da34e7164b75d803c3197b86e6cf61b874106fbd472c5082575a8bc5fbd0907" +dependencies = [ + "serde", +] + +[[package]] +name = "zerocopy" +version = "0.8.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32bc8a75f879cd6fe53a6bedf3c28f0e1b914c77424fc2be9e2ec85d7d25aff5" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bfd2644ea1681f60cf95029ff18aa8ad1cc3f7b8fe37286f8e473bb29f816b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "zlib-rs" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa76918995d776d9dd34d371030be228d021137449771493d56e29f77e4148ac" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zvariant" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" +dependencies = [ + "endi", + "enumflags2", + "serde", + "static_assertions", + "zvariant_derive 4.2.0", +] + +[[package]] +name = "zvariant" +version = "5.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bf6d6cd6a4b601acb64cfb8284cdc643fcfa75ef26ae3c46ec8aa4e8a1fbb7" +dependencies = [ + "endi", + "enumflags2", + "serde", + "url", + "winnow", + "zcheapstr", + "zvariant_derive 5.15.1", + "zvariant_utils 4.2.0", +] + +[[package]] +name = "zvariant_derive" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", + "zvariant_utils 2.1.0", +] + +[[package]] +name = "zvariant_derive" +version = "5.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2672456ba1cb54b5eaec136e63135b3c7495fb938e53b28a62e633496d486d" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.10", + "zvariant_utils 4.2.0", +] + +[[package]] +name = "zvariant_utils" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zvariant_utils" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad0294361a320b694a328460dc73add56c306150f5cb6bfafc44446120008a3" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 3.0.10", + "winnow", +] diff --git a/builder/Cargo.toml b/builder/Cargo.toml new file mode 100644 index 0000000000..c164327966 --- /dev/null +++ b/builder/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "leonida-launcher" +version = "0.1.0" +edition = "2021" +description = "Builds, mods and starts the port" +license = "GPL-3.0-or-later" +publish = false + +[features] +# Draws every screen with made-up data to PNG files (LEONIDA_SHOTS=), for design review. Never in a release. +shots = [] + +[dependencies] +eframe = { version = "0.29", default-features = false, features = ["default_fonts", "glow", "wayland", "x11", "accesskit"] } +rfd = "0.15" +serde_json = "1" +image = { version = "0.25", default-features = false, features = ["png"] } + +# Not limited to Windows hosts: build.rs also embeds the icon when cross-building for Windows. +[build-dependencies] +winresource = "0.1" + +[profile.release] +opt-level = 2 +lto = "thin" +strip = true + +# macOS: `cargo install cargo-bundle && cargo bundle --release` makes the .app with the icon. +[package.metadata.bundle] +name = "Leonida" +identifier = "org.leonida.launcher" +icon = ["../assets/logo.png"] diff --git a/builder/build.rs b/builder/build.rs new file mode 100644 index 0000000000..cd58d0e473 --- /dev/null +++ b/builder/build.rs @@ -0,0 +1,14 @@ +// Embeds assets/logo.ico into leonida-launcher.exe so Explorer, the taskbar and shortcuts show the icon. +// The target is asked, not the host, so a Windows build made on Linux or macOS gets it too (that needs llvm-rc for +// MSVC targets, or a MinGW windres). +fn main() { + println!("cargo:rerun-if-changed=../assets/logo.ico"); + if std::env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("windows") { + return; + } + let mut res = winresource::WindowsResource::new(); + res.set_icon("../assets/logo.ico"); + res.set("ProductName", "Leonida"); + res.set("FileDescription", "Leonida"); + res.compile().expect("could not embed assets/logo.ico"); +} diff --git a/builder/fonts/Inter-Bold.ttf b/builder/fonts/Inter-Bold.ttf new file mode 100644 index 0000000000..9fb9b751e5 Binary files /dev/null and b/builder/fonts/Inter-Bold.ttf differ diff --git a/builder/fonts/Inter-LICENSE.txt b/builder/fonts/Inter-LICENSE.txt new file mode 100644 index 0000000000..9b2ca37b3f --- /dev/null +++ b/builder/fonts/Inter-LICENSE.txt @@ -0,0 +1,92 @@ +Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION AND CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/builder/fonts/Inter-Regular.ttf b/builder/fonts/Inter-Regular.ttf new file mode 100644 index 0000000000..b7aaca8de1 Binary files /dev/null and b/builder/fonts/Inter-Regular.ttf differ diff --git a/builder/fonts/Inter-SemiBold.ttf b/builder/fonts/Inter-SemiBold.ttf new file mode 100644 index 0000000000..47f8ab1d68 Binary files /dev/null and b/builder/fonts/Inter-SemiBold.ttf differ diff --git a/builder/src/backend.rs b/builder/src/backend.rs new file mode 100644 index 0000000000..38b5d2129f --- /dev/null +++ b/builder/src/backend.rs @@ -0,0 +1,326 @@ +// Runs make_game.py and turns its log into stage states. No UI in here. +use std::io::{BufRead, BufReader, Read}; +use std::path::{Path, PathBuf}; +use std::process::{Command, Stdio}; +use std::sync::mpsc::{channel, Receiver}; +use std::sync::{Arc, Mutex}; +use std::time::Duration; + +pub const STAGES: [(&str, &str, &str); 5] = [ + ("check", "Check game files", "Every file is there and the right size"), + ("shaders", "Translate shaders", "RDNA2 to SPIR-V, the longest step"), + ("assets", "Export assets", "Models, textures and audio"), + ("runtime", "Build the runtime", "The loader and its libraries"), + ("pipelines", "Test pipelines", "Every shader, on this GPU"), +]; +const MAX_LOG: usize = 20_000; + +#[derive(Clone, Copy, PartialEq, Debug)] +pub enum State { + Waiting, + Running, + Done, + Skipped, + Failed, +} + +pub enum Msg { + Line(String), + Done(Option), +} + +pub struct Build { + pub rx: Receiver, + pid: u32, + alive: Arc>, +} + +/// What the log has said so far. +pub struct Progress { + pub state: [State; 5], + pub percent: [Option; 5], + pub detail: [String; 5], + pub log: Vec, + pub error: String, +} + +impl Progress { + pub fn new(selected: &[bool; 5]) -> Self { + Self { + state: selected.map(|on| if on { State::Waiting } else { State::Skipped }), + percent: [None; 5], + detail: Default::default(), + log: vec![], + error: String::new(), + } + } + + pub fn line(&mut self, raw: String) { + // "12:34:56 shaders: 10/40 (25%), ~3 min left" + let text = match raw.split_once(" ") { + Some((t, rest)) if t.len() == 8 && t.as_bytes()[2] == b':' => rest, + _ => raw.as_str(), + }; + if let Some(e) = text.strip_prefix("ERROR: ") { + self.error = e.to_string(); + } + for (i, (key, ..)) in STAGES.iter().enumerate() { + let Some(rest) = text.strip_prefix(key) else { continue }; + let Some(colon) = rest.find(':') else { continue }; + // "shaders:" and a progress label such as "shaders translate:", but not "runtime, pipelines: left out" + let label = &rest[..colon]; + if label.starts_with(',') || rest.contains("left out") { + if rest.contains("left out") { + self.state[i] = State::Skipped; + } + continue; + } + if !(label.is_empty() || label.starts_with(' ')) { + continue; + } + let body = rest[colon + 1..].trim(); + if self.state[i] != State::Failed { + self.state[i] = State::Running; + } + self.percent[i] = body.find('(').and_then(|p| body[p + 1..].split_once("%)")).and_then(|(n, _)| n.parse().ok()); + self.detail[i] = body.to_string(); + let done = match *key { + "check" => body.starts_with("all files present"), + "runtime" => body.starts_with("built") || body.starts_with("using the build"), + _ => body == "done", + }; + if done { + self.state[i] = State::Done; + self.percent[i] = None; + } + } + if self.log.len() >= MAX_LOG { + self.log.drain(..MAX_LOG / 4); + } + self.log.push(raw); + } + + pub fn finish(&mut self, ok: bool) { + for s in &mut self.state { + *s = match (*s, ok) { + (State::Running, true) => State::Done, + (State::Waiting, true) => State::Skipped, + (State::Running, false) => State::Failed, + (s, _) => s, + }; + } + } + + /// (finished, total) over the stages this build runs. + pub fn count(&self) -> (usize, usize) { + let n = |f: fn(&State) -> bool| self.state.iter().filter(|s| f(s)).count(); + (n(|s| *s == State::Done), n(|s| *s != State::Skipped)) + } +} + +pub fn find_root() -> Option { + let exe = std::env::current_exe().ok(); + [exe, std::env::current_dir().ok()] + .into_iter() + .flatten() + .find_map(|p| p.ancestors().find(|d| d.join("make_game.py").is_file()).map(Path::to_path_buf)) +} + +pub fn quiet(cmd: &mut Command) -> &mut Command { + #[cfg(windows)] + { + use std::os::windows::process::CommandExt; + cmd.creation_flags(0x0800_0000); // CREATE_NO_WINDOW + } + cmd.stdin(Stdio::null()) +} + +pub fn find_python() -> Option> { + let mut list: Vec> = vec![]; + let names: &[&[&str]] = if cfg!(windows) { + &[&["py", "-3.14"], &["py", "-3.13"], &["py", "-3.12"], &["py", "-3"], &["python"]] + } else { + &[&["python3.14"], &["python3.13"], &["python3.12"], &["python3"], &["python"]] + }; + // An app opened from Finder has a bare PATH, so look where Homebrew and python.org install too. + let dirs: &[&str] = if cfg!(target_os = "macos") { &["", "/opt/homebrew/bin/", "/usr/local/bin/"] } else { &[""] }; + for dir in dirs { + for n in names { + let mut c: Vec = n.iter().map(|s| s.to_string()).collect(); + c[0] = format!("{dir}{}", c[0]); + list.push(c); + } + } + list.into_iter().find(|c| { + quiet(Command::new(&c[0]).args(&c[1..])) + .args(["-c", "import sys; sys.exit(0 if sys.version_info >= (3, 12) else 1)"]) + .stdout(Stdio::null()) + .stderr(Stdio::null()) + .status() + .is_ok_and(|s| s.success()) + }) +} + +pub fn python(py: &[String], root: &Path) -> Command { + let mut c = Command::new(&py[0]); + quiet(&mut c).args(&py[1..]).args(["-I", "-u", "-X", "utf8"]).current_dir(root); + c +} + +/// make_game.py's own default output folder (iCloud and redirected Documents are its business), and whether it can +/// build the runtime here: off Windows that takes a cross-build. +pub fn defaults(py: &[String], root: &Path) -> Option<(String, bool)> { + let code = "import os, sys; sys.path.insert(0, sys.argv[1]); import make_game; print(make_game.default_out()); \ + print(int(os.name == 'nt' or not make_game.cross_build_missing()))"; + let o = python(py, root).args(["-c", code]).arg(root).output().ok()?; + parse_defaults(&String::from_utf8_lossy(&o.stdout)) +} + +fn parse_defaults(text: &str) -> Option<(String, bool)> { + let (out, runtime) = text.trim().rsplit_once('\n')?; + Some((out.trim().to_string(), runtime.trim() == "1")) +} + +/// `make_game.py --find`: (folder, title and version) of each copy on this computer. +pub fn find_games(py: &[String], root: &Path) -> Vec<(String, String)> { + let Ok(o) = python(py, root).arg("make_game.py").arg("--find").output() else { return vec![] }; + parse_find(&String::from_utf8_lossy(&o.stdout)) +} + +fn parse_find(text: &str) -> Vec<(String, String)> { + text.lines() + .filter(|l| !l.starts_with("not usable: ")) + .filter_map(|l| l.trim_end().strip_suffix(')')?.rsplit_once(" (")) + .map(|(d, v)| (d.to_string(), v.to_string())) + .collect() +} + +pub fn start(py: &[String], root: &Path, args: &[String], wake: impl Fn() + Send + Clone + 'static) -> std::io::Result { + let mut cmd = python(py, root); + cmd.arg("make_game.py").args(args).stdout(Stdio::piped()).stderr(Stdio::piped()); + #[cfg(unix)] + { + use std::os::unix::process::CommandExt; + cmd.process_group(0); // so Cancel reaches the compilers it starts + } + let mut child = cmd.spawn()?; + let pid = child.id(); + let alive = Arc::new(Mutex::new(true)); + let (tx, rx) = channel(); + let pump = |r: Box| { + let (tx, wake) = (tx.clone(), wake.clone()); + std::thread::spawn(move || { + let mut r = BufReader::new(r); + let mut buf = vec![]; + while r.read_until(b'\n', &mut buf).is_ok_and(|n| n > 0) { + let line = String::from_utf8_lossy(&buf).trim_end().to_string(); + buf.clear(); + if !line.is_empty() { + let _ = tx.send(Msg::Line(line)); + wake(); + } + } + }) + }; + let out = pump(Box::new(child.stdout.take().unwrap())); + let err = pump(Box::new(child.stderr.take().unwrap())); + let flag = alive.clone(); + std::thread::spawn(move || { + let _ = out.join(); + let _ = err.join(); + let code = child.wait().ok().and_then(|s| s.code()); + *flag.lock().unwrap() = false; + let _ = tx.send(Msg::Done(code)); + wake(); + }); + Ok(Build { rx, pid, alive }) +} + +impl Build { + /// make_game.py treats the interrupt as Ctrl+C, so the next run resumes. + pub fn cancel(&self, now: bool) { + kill_tree(self.pid, self.alive.clone(), now); + } +} + +/// Stops a process group (a tree on Windows): an interrupt first, then by force, or a terminate at once. +pub fn kill_tree(pid: u32, alive: Arc>, now: bool) { + let stop = move |sig: &str| { + if !*alive.lock().unwrap() { + return; + } + let mut c = if cfg!(windows) { + let mut c = Command::new("taskkill"); + c.args(["/F", "/T", "/PID", &pid.to_string()]); + c + } else { + let mut c = Command::new("/bin/kill"); + c.args([sig, "--", &format!("-{pid}")]); + c + }; + let _ = quiet(&mut c).stdout(Stdio::null()).stderr(Stdio::null()).status(); + }; + if now { + return stop("-TERM"); + } + std::thread::spawn(move || { + stop("-INT"); + std::thread::sleep(Duration::from_secs(8)); + stop("-KILL"); + }); +} + +pub fn open_folder(path: &str) { + let tool = if cfg!(windows) { "explorer" } else if cfg!(target_os = "macos") { "open" } else { "xdg-open" }; + let _ = Command::new(tool).arg(path).spawn(); +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn log_lines_drive_the_stages() { + let mut p = Progress::new(&[true; 5]); + p.line("12:00:00 check: all files present. ok".into()); + p.line("12:00:01 shaders translate: 10/40 (25%), ~3 min left".into()); + p.line("12:00:02 assets: done".into()); + p.line("12:00:03 runtime: left out, the cross-build needs xwin".into()); + assert_eq!(p.state, [State::Done, State::Running, State::Done, State::Skipped, State::Waiting]); + assert_eq!(p.percent[1], Some(25)); + assert_eq!(p.count(), (2, 4)); + p.line("ERROR: no space".into()); + p.finish(false); + assert_eq!(p.state[1], State::Failed); + assert_eq!(p.error, "no space"); + } + + #[test] + fn find_output_keeps_folders_with_brackets() { + let t = "/games/a (copy) (Game 1.0)\nnot usable: /x (packaged)\n1 found\n"; + assert_eq!(parse_find(t), vec![("/games/a (copy)".to_string(), "Game 1.0".to_string())]); + } + + #[test] + fn asks_make_game_for_its_defaults() { + assert_eq!(parse_defaults("/a b/Leonida\r\n0\r\n"), Some(("/a b/Leonida".into(), false))); + assert!(defaults(&find_python().unwrap(), &find_root().unwrap()).is_some()); + } + + #[cfg(unix)] + #[test] + fn cancel_stops_the_build() { + let dir = std::env::temp_dir().join(format!("leonida-builder-test-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + std::fs::write(dir.join("make_game.py"), "import subprocess\nprint('up')\nsubprocess.run(['sleep', '60'])\n").unwrap(); + let py = find_python().unwrap(); + let b = start(&py, &dir, &[], || {}).unwrap(); + assert!(matches!(b.rx.recv_timeout(Duration::from_secs(10)), Ok(Msg::Line(_)))); + b.cancel(false); + let end = std::time::Instant::now() + Duration::from_secs(7); + let stopped = std::iter::from_fn(|| b.rx.recv_timeout(end.saturating_duration_since(std::time::Instant::now())).ok()) + .any(|m| matches!(m, Msg::Done(c) if c != Some(0))); + assert!(stopped); + std::fs::remove_dir_all(&dir).unwrap(); + } +} diff --git a/builder/src/home.rs b/builder/src/home.rs new file mode 100644 index 0000000000..a4d3315130 --- /dev/null +++ b/builder/src/home.rs @@ -0,0 +1,312 @@ +// The Play, Mods and Settings pages. +use super::*; +use crate::play::{self, Port}; + +fn ago(then: u64) -> String { + match play::now().saturating_sub(then) { + _ if then == 0 => "Never".into(), + 0..=59 => "Just now".into(), + s @ 60..=3599 => format!("{} min ago", s / 60), + s @ 3600..=86399 => format!("{} h ago", s / 3600), + s if s < 172_800 => "Yesterday".into(), + s => format!("{} days ago", s / 86400), + } +} + +fn chip(ui: &Ui, p: Pos2, label: &str, color: Color32) { + let g = ui.painter().layout_no_wrap(label.into(), semi(12.0), color); + let rect = Rect::from_min_size(p, vec2(g.size().x + 38.0, 28.0)); + ui.painter().rect(rect, 14.0, color.gamma_multiply(0.13), Stroke::new(1.0_f32, color.gamma_multiply(0.35))); + ui.painter().circle_filled(pos2(rect.left() + 15.0, rect.center().y), 3.5, color); + ui.painter().galley(pos2(rect.left() + 26.0, rect.center().y - g.size().y / 2.0), g, color); +} + +pub fn toggle(ui: &mut Ui, rect: Rect, id: &str, label: &str, on: bool, enabled: bool) -> bool { + let resp = hit(ui, rect, id, label, enabled); + resp.widget_info(|| egui::WidgetInfo::selected(egui::WidgetType::Checkbox, enabled, on, label)); + let t = ui.ctx().animate_bool(resp.id, on); + let c = Rect::from_center_size(rect.center(), vec2(40.0, 24.0)); + ui.painter().rect_filled(c, 12.0, mix(Color32::from_rgb(58, 54, 68), PINK, t)); + ui.painter().circle_filled(pos2(c.left() + 12.0 + 16.0 * t, c.center().y), 9.0, Color32::WHITE); + resp.clicked() +} + +fn log_view(ui: &mut Ui, body: Rect, log: &[String], empty: &str) { + ui.painter().rect(body, 12.0, Color32::from_black_alpha(120), Stroke::new(1.0_f32, glass(20))); + if log.is_empty() { + text(ui, body.center(), Align2::CENTER_CENTER, empty, reg(13.0), FAINT); + } + let mut child = ui.new_child(egui::UiBuilder::new().max_rect(body.shrink(12.0))); + let area = egui::ScrollArea::both().stick_to_bottom(true).auto_shrink([false, false]); + area.show_rows(&mut child, 14.0, log.len(), |ui, rows| { + for l in &log[rows] { + let ink = if l.contains("ERROR") { BAD } else if l.contains("WARNING") { ORANGE } else { SOFT }; + ui.add(egui::Label::new(egui::RichText::new(l).font(FontId::monospace(12.0)).color(ink)).extend()); + } + }); +} + +impl App { + pub fn save(&mut self, key: &str, value: impl ToString) { + if let Err(e) = self.config.set(key, value) { + self.play_note = format!("Settings couldn't be saved: {e}"); + } + } + + pub fn poll_game(&mut self) { + if let Some((code, secs)) = self.game.as_ref().and_then(|g| g.ended().map(|c| (c, g.started.elapsed().as_secs()))) { + self.game = None; + let total = self.config.num("seconds") + secs; + self.save("seconds", total); + self.save("last", play::now()); + self.play_note = match code { + _ if self.stopping => "Stopped.".into(), + Some(0) => String::new(), + Some(127) if !cfg!(windows) => "Wine wasn't found. Install it, or choose it in Settings.".into(), + Some(c) => format!("Closed after {} with code {c}. The log says more.", clock(secs)), + None => format!("Closed unexpectedly after {}. The log says more.", clock(secs)), + }; + self.stopping = false; + } + if let Some(m) = self.mods_rx.as_ref().and_then(|r| r.try_recv().ok()) { + self.mods_rx = None; + self.mods = m; + } + } + + fn play(&mut self, ctx: &egui::Context) { + let o = play::Options { + keyboard: self.config.on("keyboard"), + splash: !self.config.on("no_splash"), + diagnostics: self.config.on("diagnostics"), + wine: self.config.get("wine").into(), + }; + let c = ctx.clone(); + let run = play::command(std::path::Path::new(self.out.trim()), &o) + .ok_or_else(|| std::io::Error::other("game_path.txt is missing")) + .and_then(|cmd| play::start(cmd, &self.log_path, move || c.request_repaint())); + self.play_note.clear(); + match run { + Ok(g) => self.game = Some(g), + Err(e) => self.play_note = format!("It couldn't start: {e}"), + } + } + + pub fn load_mods(&mut self, args: Vec, ctx: &egui::Context) { + let (Some(py), Some(root)) = (self.python.clone(), self.root.clone()) else { return }; + if self.mods_rx.is_some() { + return; + } + let (tx, rx) = channel(); + self.mods_rx = Some(rx); + let (out, c) = (self.out.trim().to_string(), ctx.clone()); + std::thread::spawn(move || { + let _ = tx.send(play::mods(&py, &root, &out, &args)); + c.request_repaint(); + }); + } + + pub fn home_page(&mut self, ui: &mut Ui) { + let running = self.game.is_some(); + let port = self.port.clone(); + let c = pos2(690.0, 250.0); + // A slow breath, only while the game runs, so an idle launcher draws nothing. + let beat = if running { + ui.ctx().request_repaint_after(std::time::Duration::from_millis(33)); + (ui.input(|i| i.time) * 1.6).sin() as f32 + } else { + 0.0 + }; + glow(ui, c, 300.0 + 14.0 * beat, Color32::from_rgba_unmultiplied(240, 70, 150, 70)); + glow(ui, c + vec2(90.0, 60.0), 220.0, Color32::from_rgba_unmultiplied(255, 150, 80, 36)); + self.logo_at(ui, c + vec2(0.0, 5.0 * beat), 400.0); + + let (label, color) = match (&port, running) { + (_, true) => ("Running", GO), + (Port::Ready, _) => ("Ready to start", GO), + (Port::Missing(_), _) => ("File missing", BAD), + _ if self.build.is_some() => ("Building", PINK_HOVER), + _ => ("Not built yet", ORANGE), + }; + chip(ui, pos2(64.0, 116.0), label, color); + text(ui, pos2(62.0, 188.0), Align2::LEFT_CENTER, "Leonida", bold(58.0), INK); + let sub = match (&port, running) { + (_, true) => format!("Running for {}.", clock(self.game.as_ref().map_or(0, |g| g.started.elapsed().as_secs()))), + (Port::Missing(f), _) => format!("{f} is missing, so there is nothing to start. Check your game files, then build again."), + (Port::NotBuilt, _) => "Build the port from your own copy of the game, once. Then start it here.".into(), + _ => "An early port: it isn't playable yet. Start it to see how far it gets.".into(), + }; + let g = ui.painter().layout(sub, reg(15.0), SOFT, 350.0); + ui.painter().galley(pos2(64.0, 226.0), g, SOFT); + + let main = r(64.0, 296.0, 190.0, 56.0); + if running { + if button(ui, main, if self.stopping { "Stopping" } else { "Stop" }, false, !self.stopping) { + self.stopping = true; + if let Some(g) = &self.game { + g.stop(); + } + } + } else if port == Port::Ready { + if button(ui, main, "Play", true, self.build.is_none()) { + self.play(ui.ctx()); + } + } else if button(ui, main, if self.build.is_some() { "See the build" } else { "Build the game" }, true, true) { + self.tab = Tab::Build; + } + let has = std::path::Path::new(self.out.trim()).is_dir(); + if button(ui, r(266.0, 296.0, 130.0, 56.0), "Open folder", false, has) { + backend::open_folder(self.out.trim()); + } + let g = ui.painter().layout(self.play_note.clone(), reg(13.0), ORANGE, 350.0); + ui.painter().galley(pos2(64.0, 366.0), g, ORANGE); + + let on = self.mods.list.iter().filter(|m| m.enabled).count(); + let time = match self.config.num("seconds") { 0 => "None yet".into(), s => clock(s) }; + let last = if running { "Now".into() } else { ago(self.config.num("last")) }; + let cards = [("Last started", last), ("Time running", time), ("Mods on", format!("{on} of {}", self.mods.list.len()))]; + for (i, (k, v)) in cards.iter().enumerate() { + let x = 64.0 + 281.0 * i as f32; + card(ui, r(x, 434.0, 270.0, 76.0)); + text(ui, pos2(x + 18.0, 458.0), Align2::LEFT_CENTER, k, semi(12.0), SOFT); + line(ui, pos2(x + 18.0, 484.0), 234.0, v, bold(17.0), INK); + } + line(ui, pos2(64.0, 546.0), 640.0, &elide_home(&self.out), reg(13.0), FAINT); + let (go, _) = link(ui, pos2(838.0, 546.0), "Show log", PINK_HOVER); + if go { + self.tab = Tab::Log; + } + if running { + ui.ctx().request_repaint_after(std::time::Duration::from_secs(1)); + } + } + + pub fn log_page(&mut self, ui: &mut Ui) { + text(ui, pos2(64.0, 100.0), Align2::LEFT_CENTER, "Game log", bold(24.0), INK); + text(ui, pos2(64.0, 128.0), Align2::LEFT_CENTER, "From the last start. It can quote the game, so don't post it publicly.", reg(14.0), SOFT); + if self.log_read.is_none_or(|t| t.elapsed().as_millis() > 700) { + self.log = play::tail(&self.log_path); + self.log_read = Some(std::time::Instant::now()); + } + log_view(ui, r(64.0, 156.0, 832.0, 350.0), &self.log, "Nothing has been started yet"); + if self.game.is_some() { + ui.ctx().request_repaint_after(std::time::Duration::from_millis(750)); + } + if button(ui, r(786.0, 524.0, 110.0, 44.0), "Back", false, true) { + self.tab = Tab::Home; + } + } + + pub fn mods_page(&mut self, ui: &mut Ui) { + text(ui, pos2(64.0, 100.0), Align2::LEFT_CENTER, "Mods", bold(24.0), INK); + text(ui, pos2(64.0, 128.0), Align2::LEFT_CENTER, "Changes apply the next time you start. Your game files are never touched.", reg(14.0), SOFT); + let busy = self.mods_rx.is_some(); + let usable = self.port != Port::NotBuilt && self.python.is_some() && !busy; + if busy { + spinner(ui, pos2(748.0, 112.0), 9.0); + } + if button(ui, r(776.0, 92.0, 120.0, 40.0), "Add a mod", true, usable) { + let pick = rfd::FileDialog::new().set_title("Choose a mod package").add_filter("Mod packages", &["zip", "leonidamod"]).pick_file(); + if let Some(p) = pick { + self.load_mods(vec!["install".into(), "--disable".into(), p.display().to_string()], ui.ctx()); + } + } + let body = r(64.0, 156.0, 832.0, 350.0); + card(ui, body); + if self.mods.list.is_empty() { + self.logo_at(ui, body.center() - vec2(0.0, 52.0), 90.0); + let (a, b) = if self.port == Port::NotBuilt { + ("Build the game first", "Mods are kept next to the finished build.") + } else { + ("No mods yet", "Add a .zip or .leonidamod package to get started.") + }; + text(ui, body.center() + vec2(0.0, 14.0), Align2::CENTER_CENTER, a, semi(16.0), INK); + text(ui, body.center() + vec2(0.0, 38.0), Align2::CENTER_CENTER, b, reg(13.0), SOFT); + } + let mut change = None; + let mut child = ui.new_child(egui::UiBuilder::new().max_rect(body.shrink(6.0))); + egui::ScrollArea::vertical().auto_shrink([false, false]).show(&mut child, |ui| { + ui.spacing_mut().item_spacing = Vec2::ZERO; + for m in &self.mods.list { + let (rect, _) = ui.allocate_exact_size(vec2(ui.available_width(), 60.0), Sense::hover()); + let y = rect.center().y; + line(ui, pos2(rect.left() + 16.0, y - 9.0), 640.0, &m.name, semi(14.0), INK); + let (note, ink) = if m.note.is_empty() { (&m.folder, SOFT) } else { (&m.note, ORANGE) }; + line(ui, pos2(rect.left() + 16.0, y + 11.0), 640.0, note, reg(12.0), ink); + let sw = Rect::from_center_size(pos2(rect.right() - 36.0, y), vec2(48.0, 32.0)); + if toggle(ui, sw, &m.folder, &m.name, m.enabled, usable) { + change = Some(vec![if m.enabled { "disable" } else { "enable" }.to_string(), m.folder.clone()]); + } + } + }); + if let Some(a) = change { + self.load_mods(a, ui.ctx()); + } + line(ui, pos2(64.0, 546.0), 830.0, &self.mods.error, reg(13.0), ORANGE); + } + + pub fn settings_page(&mut self, ui: &mut Ui) { + text(ui, pos2(64.0, 100.0), Align2::LEFT_CENTER, "Settings", bold(24.0), INK); + text(ui, pos2(64.0, 128.0), Align2::LEFT_CENTER, "Saved as you change them.", reg(14.0), SOFT); + self.label(ui, 64.0, 168.0, "Game folder"); + if self.folder_field(ui, r(64.0, 184.0, 730.0, 40.0)) { + self.port_checked = None; + } + let rows = [ + ("keyboard", false, "Keyboard as a controller", "The game reads gamepads only; this maps your keys to one"), + ("no_splash", true, "Splash screen", "Show the package's splash while the game starts"), + ("diagnostics", false, "Graphics diagnostics", "Validation and device-loss reports in the log; slower, needs the Vulkan layers"), + ]; + card(ui, r(64.0, 248.0, 832.0, 180.0)); + for (i, (key, inverted, name, what)) in rows.iter().enumerate() { + let mid = 278.0 + 60.0 * i as f32; + if i > 0 { + ui.painter().hline(82.0..=878.0, mid - 30.0, Stroke::new(1.0_f32, glass(12))); + } + text(ui, pos2(84.0, mid - 9.0), Align2::LEFT_CENTER, name, semi(14.0), INK); + text(ui, pos2(84.0, mid + 11.0), Align2::LEFT_CENTER, what, reg(12.0), SOFT); + let on = self.config.on(key) != *inverted; + if toggle(ui, Rect::from_center_size(pos2(850.0, mid), vec2(48.0, 32.0)), key, name, on, true) { + let v = on == *inverted; + self.save(key, v as u8); + } + } + if !cfg!(windows) { + self.label(ui, 64.0, 456.0, "Wine command"); + let field = r(64.0, 472.0, 730.0, 40.0); + ui.painter().rect(field, 10.0, Color32::from_black_alpha(60), Stroke::new(1.0_f32, glass(26))); + let mut wine = self.config.get("wine").to_string(); + let edit = egui::TextEdit::singleline(&mut wine).frame(false).font(reg(14.0)) + .vertical_align(egui::Align::Center).hint_text("wine"); + if ui.put(field.shrink2(vec2(10.0, 4.0)), edit).changed() { + self.save("wine", wine); + } + if button(ui, r(804.0, 472.0, 92.0, 40.0), "Browse", false, true) { + if let Some(p) = rfd::FileDialog::new().set_title("Choose Wine").pick_file() { + self.save("wine", p.display()); + } + } + } + line(ui, pos2(64.0, 546.0), 830.0, &self.play_note, reg(13.0), ORANGE); + } + + /// The output folder field with its Change button; true when it changed. + pub fn folder_field(&mut self, ui: &mut Ui, field: Rect) -> bool { + let before = self.out.clone(); + ui.painter().rect(field, 10.0, Color32::from_black_alpha(60), Stroke::new(1.0_f32, glass(26))); + let locked = self.build.is_some() || self.game.is_some(); + let edit = egui::TextEdit::singleline(&mut self.out).frame(false).font(reg(14.0)).vertical_align(egui::Align::Center); + ui.add_enabled_ui(!locked, |ui| ui.put(field.shrink2(vec2(10.0, 4.0)), edit)); + if button(ui, r(field.right() + 10.0, field.top(), 92.0, 40.0), "Change", false, !locked) { + if let Some(p) = rfd::FileDialog::new().set_title("Choose where the game goes").pick_folder() { + self.out = p.display().to_string(); + } + } + if self.out == before { + return false; + } + let v = self.out.trim().to_string(); + self.save("out", v); + true + } +} diff --git a/builder/src/main.rs b/builder/src/main.rs new file mode 100644 index 0000000000..6f2ec28294 --- /dev/null +++ b/builder/src/main.rs @@ -0,0 +1,859 @@ +// Leonida: a launcher that builds the port with make_game.py, manages its mods and starts it. +#![cfg_attr(all(not(debug_assertions), windows), windows_subsystem = "windows")] +mod backend; +mod home; +mod play; + +use backend::{Build, Msg, Progress, State, STAGES}; +use eframe::egui::{ + self, pos2, vec2, Align2, Color32, FontFamily, FontId, Pos2, Rect, Response, Sense, Shape, Stroke, Ui, Vec2, +}; +use std::path::PathBuf; +use std::sync::mpsc::{channel, Receiver}; + +const ASSETS: usize = 2; +const RUNTIME: usize = 3; +/// What running the port takes. The asset export is 370 GB that only the asset tools read, and the pipeline test is +/// hours; both stay one click away. +const RUN_STEPS: [bool; 5] = [true, true, false, true, false]; + +const SIZE: Vec2 = vec2(960.0, 600.0); +const PAGE: Color32 = Color32::from_rgb(19, 18, 24); +const INK: Color32 = Color32::from_rgb(240, 238, 244); +const SOFT: Color32 = Color32::from_rgb(166, 161, 178); +const FAINT: Color32 = Color32::from_rgb(133, 127, 147); +const PINK: Color32 = Color32::from_rgb(238, 62, 140); +const PINK_HOVER: Color32 = Color32::from_rgb(250, 88, 160); +const ORANGE: Color32 = Color32::from_rgb(255, 152, 84); +const PURPLE: Color32 = Color32::from_rgb(150, 82, 210); +const GO: Color32 = Color32::from_rgb(95, 190, 145); +const BAD: Color32 = Color32::from_rgb(238, 116, 108); + +fn glass(a: u8) -> Color32 { + Color32::from_rgba_premultiplied(a, a, a, a) +} +fn reg(s: f32) -> FontId { + FontId::new(s, FontFamily::Proportional) +} +fn semi(s: f32) -> FontId { + FontId::new(s, FontFamily::Name("semi".into())) +} +fn bold(s: f32) -> FontId { + FontId::new(s, FontFamily::Name("bold".into())) +} +fn mix(a: Color32, b: Color32, t: f32) -> Color32 { + let m = |x: u8, y: u8| (x as f32 + (y as f32 - x as f32) * t.clamp(0.0, 1.0)) as u8; + Color32::from_rgb(m(a.r(), b.r()), m(a.g(), b.g()), m(a.b(), b.b())) +} +fn sunset(t: f32) -> Color32 { + if t < 0.5 { mix(PURPLE, PINK, t * 2.0) } else { mix(PINK, ORANGE, t * 2.0 - 1.0) } +} + +#[derive(Clone, Copy, PartialEq)] +enum Tab { + Home, + Mods, + Build, + Settings, + Log, +} + +#[derive(Clone, Copy, PartialEq)] +enum Page { + Files, + Building, + Ready, + Failed, +} + +struct Found { + python: Option>, + defaults: Option<(String, bool)>, + games: Vec<(String, String)>, +} + +struct App { + logo: egui::TextureHandle, + root: Option, + python: Option>, + searching: Option>, + games: Vec<(String, String)>, + chosen: Option, + out: String, + default_out: String, + jobs: usize, + stages: [bool; 5], + page: Page, + check_only: bool, + show_log: bool, + cancelled: bool, + progress: Progress, + build: Option, + started: std::time::Instant, + took: u64, + note: String, + tab: Tab, + config: play::Config, + log_path: PathBuf, + log: Vec, + log_read: Option, + port: play::Port, + port_checked: Option, + game: Option, + stopping: bool, + play_note: String, + mods: play::Mods, + mods_rx: Option>, + #[cfg(feature = "shots")] + shot: usize, +} + +impl App { + fn new(cc: &eframe::CreationContext<'_>) -> Self { + let ctx = &cc.egui_ctx; + let mut f = egui::FontDefinitions::default(); + let fallback = f.families[&FontFamily::Proportional].clone(); + for (name, bytes) in [ + ("regular", include_bytes!("../fonts/Inter-Regular.ttf").as_slice()), + ("semi", include_bytes!("../fonts/Inter-SemiBold.ttf")), + ("bold", include_bytes!("../fonts/Inter-Bold.ttf")), + ] { + f.font_data.insert(name.into(), egui::FontData::from_static(bytes)); + let family = if name == "regular" { FontFamily::Proportional } else { FontFamily::Name(name.into()) }; + f.families.insert(family, std::iter::once(name.to_string()).chain(fallback.clone()).collect()); + } + ctx.set_fonts(f); + ctx.set_theme(egui::Theme::Dark); + let mut v = egui::Visuals::dark(); + v.override_text_color = Some(INK); + v.selection.bg_fill = PINK.gamma_multiply(0.45); + ctx.set_visuals(v); + + // The mark is off-centre in a square of empty space: crop to it. + let logo = image::load_from_memory(include_bytes!("../../assets/logo.png")) + .expect("assets/logo.png") + .crop_imm(0, 145, 1024, 740) + .resize(512, 512, image::imageops::FilterType::Lanczos3) + .to_rgba8(); + let size = [logo.width() as usize, logo.height() as usize]; + let logo = ctx.load_texture("logo", egui::ColorImage::from_rgba_unmultiplied(size, &logo), egui::TextureOptions::LINEAR); + + let dir = play::config_dir(); + let config = play::Config::load(dir.join("launcher.conf")); + let root = backend::find_root(); + let (tx, rx) = channel(); + let (r, c) = (root.clone(), ctx.clone()); + std::thread::spawn(move || { + let python = backend::find_python(); + let (defaults, games) = match (&python, &r) { + (Some(p), Some(r)) => (backend::defaults(p, r), backend::find_games(p, r)), + _ => (None, vec![]), + }; + let _ = tx.send(Found { python, defaults, games }); + c.request_repaint(); + }); + Self { + logo, + root, + python: None, + searching: Some(rx), + games: vec![], + chosen: None, + out: config.get("out").into(), + default_out: String::new(), + jobs: (std::thread::available_parallelism().map_or(2, |n| n.get()) / 2).max(1), + stages: RUN_STEPS, + page: Page::Files, + check_only: false, + show_log: false, + cancelled: false, + progress: Progress::new(&[true; 5]), + build: None, + started: std::time::Instant::now(), + took: 0, + note: String::new(), + tab: Tab::Home, + config, + log_path: dir.join("game.log"), + log: vec![], + log_read: None, + port: play::Port::NotBuilt, + port_checked: None, + game: None, + stopping: false, + play_note: String::new(), + mods: play::Mods::default(), + mods_rx: None, + #[cfg(feature = "shots")] + shot: 0, + } + } + + fn poll(&mut self, ctx: &egui::Context) { + self.poll_game(); + if self.port_checked.is_none_or(|t| t.elapsed().as_secs() >= 2) { + self.port = play::port(&self.out); + self.port_checked = Some(std::time::Instant::now()); + } + if let Some(f) = self.searching.as_ref().and_then(|r| r.try_recv().ok()) { + self.searching = None; + self.python = f.python; + let (out, runtime) = f.defaults.unwrap_or_default(); + self.default_out = out; + if !runtime { + self.stages[RUNTIME] = false; // it can't be built here; asking for it by name would stop the build + } + if self.out.is_empty() { + self.out = self.default_out.clone(); + } + for g in f.games { + if !self.games.iter().any(|(d, _)| *d == g.0) { + self.games.push(g); + } + } + if self.games.len() == 1 { + self.chosen = Some(0); + } + self.port_checked = None; + self.port = play::port(&self.out); + if self.port != play::Port::NotBuilt { + self.load_mods(vec![], ctx); + } + if self.root.is_none() { + self.note = "make_game.py wasn't found. Keep this app inside the Leonida folder.".into(); + } else if self.python.is_none() { + self.note = "Python 3.12 or newer is needed. Run Build.bat once to install it, or get it from python.org.".into(); + } + } + let Some(b) = &self.build else { return }; + let mut end = None; + while let Ok(m) = b.rx.try_recv() { + match m { + Msg::Line(l) => self.progress.line(l), + Msg::Done(c) => end = Some(c), + } + } + if let Some(code) = end { + let ok = code == Some(0) && !self.cancelled; + self.build = None; + self.took = self.started.elapsed().as_secs(); + self.progress.finish(ok); + self.port_checked = None; + self.load_mods(vec![], ctx); + self.page = match (ok, self.cancelled) { + (true, _) => Page::Ready, + (_, true) => Page::Files, + _ => Page::Failed, + }; + if self.cancelled { + self.note = "Stopped. Build again to pick up where it left off.".into(); + } + } + } + + fn add_game(&mut self, dir: String) { + let i = self.games.iter().position(|(d, _)| *d == dir).unwrap_or_else(|| { + self.games.push((dir, "Chosen by you".into())); + self.games.len() - 1 + }); + self.chosen = Some(i); + } + + fn start(&mut self, check_only: bool, ctx: &egui::Context) { + let (Some(root), Some(py), Some(i)) = (&self.root, &self.python, self.chosen) else { return }; + let mut args: Vec = ["--no-tui", "--game", &self.games[i].0, "--jobs"].map(String::from).into(); + args.push(self.jobs.to_string()); + let out = self.out.trim(); + if !out.is_empty() && out != self.default_out { + args.extend(["--out".into(), out.into()]); + } + let mut run = self.stages; + run[0] = true; // make_game.py always checks the files + if check_only { + args.push("--check".into()); + run = [true, false, false, false, false]; + } else if run != [true; 5] { + // Left out when everything is on: make_game.py then skips what this system can't build. + let list: Vec<_> = STAGES.iter().zip(run).filter(|(_, on)| *on).map(|(s, _)| s.0).collect(); + args.extend(["--stages".into(), list.join(",")]); + } + self.progress = Progress::new(&run); + let c = ctx.clone(); + match backend::start(py, root, &args, move || c.request_repaint()) { + Ok(b) => { + self.build = Some(b); + self.page = Page::Building; + self.check_only = check_only; + self.cancelled = false; + self.show_log = false; + self.note.clear(); + self.started = std::time::Instant::now(); + } + Err(e) => self.note = format!("The build couldn't start: {e}"), + } + } +} + +// ---- drawing ---- + +fn r(x: f32, y: f32, w: f32, h: f32) -> Rect { + Rect::from_min_size(pos2(x, y), vec2(w, h)) +} + +fn text(ui: &Ui, p: Pos2, a: Align2, s: &str, f: FontId, c: Color32) -> Rect { + ui.painter().text(p, a, s, f, c) +} + +/// One line, cut with an ellipsis at `w`. +fn line(ui: &Ui, p: Pos2, w: f32, s: &str, f: FontId, c: Color32) { + let mut job = egui::text::LayoutJob::simple_singleline(s.into(), f, c); + job.wrap = egui::text::TextWrapping::truncate_at_width(w); + let g = ui.fonts(|x| x.layout_job(job)); + ui.painter().galley(p - vec2(0.0, g.size().y / 2.0), g, c); +} + +fn card(ui: &Ui, rect: Rect) { + ui.painter().rect(rect, 12.0, glass(9), Stroke::new(1.0_f32, glass(20))); +} + +fn glow(ui: &Ui, c: Pos2, radius: f32, color: Color32) { + let mut m = egui::Mesh::default(); + m.colored_vertex(c, color); + for i in 0..=64 { + let a = i as f32 / 64.0 * std::f32::consts::TAU; + m.colored_vertex(c + radius * vec2(a.cos(), a.sin()), Color32::TRANSPARENT); + if i > 0 { + m.add_triangle(0, i, i + 1); + } + } + ui.painter().add(Shape::mesh(m)); +} + +fn arc(ui: &Ui, c: Pos2, rad: f32, width: f32, from: f32, len: f32, color: impl Fn(f32) -> Color32) { + if len <= 0.0 { + return; + } + let at = |t: f32| { + let a = (from + t * len - 0.25) * std::f32::consts::TAU; + c + rad * vec2(a.cos(), a.sin()) + }; + let n = (len * 120.0).ceil().max(2.0) as usize; + for i in 0..n { + let (a, b) = (i as f32 / n as f32, (i as f32 + 1.3) / n as f32); + ui.painter().line_segment([at(a), at(b.min(1.0))], Stroke::new(width, color(a))); + } + for t in [0.0, 1.0] { + ui.painter().circle_filled(at(t), width / 2.0, color(t)); + } +} + +fn tick(ui: &Ui, c: Pos2, s: f32, stroke: Stroke) { + let p = [c + vec2(-s, 0.0), c + vec2(-s * 0.3, s * 0.7), c + vec2(s, -s * 0.7)]; + ui.painter().add(Shape::line(p.to_vec(), stroke)); +} + +fn hit(ui: &mut Ui, rect: Rect, id: &str, label: &str, enabled: bool) -> Response { + let mut resp = ui.interact(rect, ui.id().with(id), if enabled { Sense::click() } else { Sense::hover() }); + resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, enabled, label)); + // egui drops `hovered` for a pressed widget when another one under it could start a drag. + resp.hovered |= enabled && resp.is_pointer_button_down_on() && resp.contains_pointer(); + if enabled && resp.has_focus() { + ui.painter().rect_stroke(rect.expand(3.0), 12.0, Stroke::new(1.5_f32, PINK_HOVER)); + } + if enabled { resp.on_hover_cursor(egui::CursorIcon::PointingHand) } else { resp } +} + +fn button(ui: &mut Ui, rect: Rect, label: &str, primary: bool, enabled: bool) -> bool { + let resp = hit(ui, rect, label, label, enabled); + let t = ui.ctx().animate_bool(resp.id, enabled && resp.hovered()); + let (fill, stroke, ink) = match (primary, enabled) { + (true, true) => (mix(PINK, PINK_HOVER, t), Color32::TRANSPARENT, Color32::WHITE), + (_, true) => (glass((10.0 + 14.0 * t) as u8), glass(34), INK), + _ => (glass(8), glass(14), FAINT), + }; + ui.painter().rect(rect, 10.0, fill, Stroke::new(1.0_f32, stroke)); + text(ui, rect.center(), Align2::CENTER_CENTER, label, semi(14.0), ink); + resp.clicked() +} + +fn link(ui: &mut Ui, p: Pos2, label: &str, color: Color32) -> (bool, f32) { + let g = ui.painter().layout_no_wrap(label.into(), semi(13.0), color); + let rect = Rect::from_min_size(p - vec2(0.0, g.size().y / 2.0), g.size()); + let resp = hit(ui, rect.expand2(vec2(2.0, 5.0)), label, label, true); + if resp.hovered() { + ui.painter().hline(rect.x_range(), rect.bottom(), Stroke::new(1.0_f32, color)); + } + ui.painter().galley(rect.min, g, color); + (resp.clicked(), rect.width()) +} + +fn spinner(ui: &Ui, c: Pos2, rad: f32) { + let t = (ui.input(|i| i.time) * 0.9).fract() as f32; + ui.painter().circle_stroke(c, rad, Stroke::new(2.0_f32, glass(26))); + arc(ui, c, rad, 2.0, t, 0.28, |_| PINK_HOVER); + ui.ctx().request_repaint_after(std::time::Duration::from_millis(33)); +} + +fn clock(s: u64) -> String { + match s { + 0..=59 => format!("{s} s"), + 60..=3599 => format!("{} min {:02} s", s / 60, s % 60), + _ => format!("{} h {:02} min", s / 3600, s / 60 % 60), + } +} + +fn elide_home(p: &str) -> String { + let home = std::env::var(if cfg!(windows) { "USERPROFILE" } else { "HOME" }).unwrap_or_default(); + match p.strip_prefix(&home) { + Some(rest) if !home.is_empty() && rest.starts_with(['/', '\\']) => format!("~{rest}"), + _ => p.into(), + } +} + +impl App { + fn chrome(&mut self, ui: &mut Ui) { + let full = ui.max_rect(); + ui.painter().rect_filled(full, 0.0, PAGE); + glow(ui, pos2(90.0, 20.0), 420.0, Color32::from_rgba_unmultiplied(150, 60, 200, 34)); + glow(ui, pos2(900.0, 620.0), 460.0, Color32::from_rgba_unmultiplied(255, 90, 120, 26)); + // macOS draws its window buttons over the content: the whole strip moves the window. + // Either side of the tabs, so pressing a tab can't start moving the window. + for (id, strip) in [("bar1", r(0.0, 0.0, 280.0, 64.0)), ("bar2", r(680.0, 0.0, SIZE.x - 680.0, 64.0))] { + let bar = ui.interact(strip, ui.id().with(id), Sense::drag()); + if cfg!(target_os = "macos") && bar.drag_started() { + ui.ctx().send_viewport_cmd(egui::ViewportCommand::StartDrag); + } + } + let x = if cfg!(target_os = "macos") { 92.0 } else { 28.0 }; + self.logo_at(ui, pos2(x + 18.0, 32.0), 36.0); + text(ui, pos2(x + 46.0, 32.0), Align2::LEFT_CENTER, "Leonida", bold(15.0), INK); + + let tabs = [(Tab::Home, "Play"), (Tab::Mods, "Mods"), (Tab::Build, "Build"), (Tab::Settings, "Settings")]; + let now = tabs.iter().position(|t| t.0 == self.tab).unwrap_or(0); + let w = 96.0; + let pill = Rect::from_center_size(pos2(SIZE.x / 2.0, 32.0), vec2(w * 4.0 + 8.0, 40.0)); + ui.painter().rect(pill, 20.0, glass(10), Stroke::new(1.0_f32, glass(22))); + let slide = ui.ctx().animate_value_with_time(ui.id().with("pill"), now as f32, 0.18); + ui.painter().rect_filled(r(pill.left() + 4.0 + slide * w, pill.top() + 4.0, w, 32.0), 16.0, glass(26)); + for (i, (tab, name)) in tabs.iter().enumerate() { + let rect = r(pill.left() + 4.0 + w * i as f32, pill.top() + 4.0, w, 32.0); + let resp = hit(ui, rect, &format!("tab{name}"), name, true); + let ink = if i == now || resp.hovered() { INK } else { SOFT }; + text(ui, rect.center(), Align2::CENTER_CENTER, name, semi(13.0), ink); + if *tab == Tab::Build && self.build.is_some() && i != now { + ui.painter().circle_filled(pos2(rect.right() - 16.0, rect.center().y), 3.0, PINK_HOVER); + } + if resp.clicked() { + self.tab = *tab; + } + } + } + + fn logo_at(&self, ui: &Ui, c: Pos2, w: f32) { + let s = self.logo.size_vec2(); + let rect = Rect::from_center_size(c, vec2(w, w * s.y / s.x)); + ui.painter().image(self.logo.id(), rect, Rect::from_min_max(pos2(0.0, 0.0), pos2(1.0, 1.0)), Color32::WHITE); + } + + fn label(&self, ui: &Ui, x: f32, y: f32, s: &str) { + text(ui, pos2(x, y), Align2::LEFT_CENTER, s, semi(12.0), SOFT); + } + + fn files_page(&mut self, ui: &mut Ui) { + text(ui, pos2(64.0, 100.0), Align2::LEFT_CENTER, "Build your game", bold(24.0), INK); + let sub = "Pick your game files and where the game goes. Leonida does the rest."; + text(ui, pos2(64.0, 128.0), Align2::LEFT_CENTER, sub, reg(14.0), SOFT); + + self.label(ui, 64.0, 168.0, "Found on this computer"); + let list = r(64.0, 184.0, 832.0, 112.0); + card(ui, list); + if self.games.is_empty() { + let busy = self.searching.is_some(); + let x = if busy { spinner(ui, pos2(96.0, 240.0), 9.0); 122.0 } else { 88.0 }; + let (a, b) = if busy { + ("Looking for your game files", "Downloads, Desktop, Documents and the top of every drive") + } else { + ("No game files found", "Browse to the folder that holds MicrosoftGame.Config, or drop it on this window") + }; + text(ui, pos2(x, 230.0), Align2::LEFT_CENTER, a, semi(14.0), INK); + text(ui, pos2(x, 251.0), Align2::LEFT_CENTER, b, reg(13.0), SOFT); + } + let mut child = ui.new_child(egui::UiBuilder::new().max_rect(list.shrink(6.0))); + egui::ScrollArea::vertical().auto_shrink([false, false]).show(&mut child, |ui| { + ui.spacing_mut().item_spacing = Vec2::ZERO; + for (i, (dir, what)) in self.games.iter().enumerate() { + let (rect, _) = ui.allocate_exact_size(vec2(ui.available_width(), 50.0), Sense::hover()); + let on = self.chosen == Some(i); + let resp = hit(ui, rect, &format!("game{i}"), what, true); + if on || resp.hovered() { + ui.painter().rect_filled(rect, 8.0, if on { PINK.gamma_multiply(0.16) } else { glass(8) }); + } + let c = pos2(rect.left() + 22.0, rect.center().y); + ui.painter().circle_stroke(c, 8.0, Stroke::new(1.5_f32, if on { PINK_HOVER } else { FAINT })); + if on { + ui.painter().circle_filled(c, 4.0, PINK_HOVER); + } + let w = rect.width() - 60.0; + line(ui, pos2(rect.left() + 44.0, c.y - 9.0), w, what, semi(14.0), INK); + line(ui, pos2(rect.left() + 44.0, c.y + 10.0), w, &elide_home(dir), reg(12.0), SOFT); + if resp.clicked() { + self.chosen = Some(i); + } + } + }); + text(ui, pos2(64.0, 316.0), Align2::LEFT_CENTER, "Not listed?", reg(13.0), SOFT); + let (browse, w) = link(ui, pos2(138.0, 316.0), "Browse", PINK_HOVER); + text(ui, pos2(146.0 + w, 316.0), Align2::LEFT_CENTER, "or drop the folder on this window", reg(13.0), FAINT); + if browse { + if let Some(p) = rfd::FileDialog::new().set_title("Choose your game folder").pick_folder() { + self.add_game(p.display().to_string()); + } + } + + self.label(ui, 64.0, 356.0, "Put the game in"); + self.folder_field(ui, r(64.0, 372.0, 538.0, 40.0)); + self.label(ui, 728.0, 356.0, "Parallel jobs"); + let box_ = r(728.0, 372.0, 168.0, 40.0); + ui.painter().rect(box_, 10.0, glass(9), Stroke::new(1.0_f32, glass(26))); + text(ui, box_.center(), Align2::CENTER_CENTER, &self.jobs.to_string(), semi(14.0), INK); + for (x, s, name) in [(728.0, "-", "Fewer jobs"), (856.0, "+", "More jobs")] { + let rect = r(x, 372.0, 40.0, 40.0); + let resp = hit(ui, rect, name, name, true); + let ink = if resp.hovered() { INK } else { SOFT }; + let c = rect.center(); + ui.painter().hline(c.x - 5.0..=c.x + 5.0, c.y, Stroke::new(1.6_f32, ink)); + if s == "+" { + ui.painter().vline(c.x, c.y - 5.0..=c.y + 5.0, Stroke::new(1.6_f32, ink)); + } + if resp.clicked() { + self.jobs = if s == "+" { (self.jobs + 1).min(128) } else { (self.jobs - 1).max(1) }; + } + } + + self.label(ui, 64.0, 444.0, "Steps to run"); + let mut x = 64.0; + for i in 1..5 { + let name = if i == ASSETS { "Export assets, 370 GB" } else { STAGES[i].1 }; + let g = ui.painter().layout_no_wrap(name.into(), semi(13.0), INK); + let rect = r(x, 460.0, g.size().x + 46.0, 36.0); + let resp = hit(ui, rect, &format!("stage{i}"), name, true); + let on = self.stages[i]; + let (fill, edge) = if on { (PINK.gamma_multiply(0.18), PINK.gamma_multiply(0.6)) } else { (glass(8), glass(24)) }; + ui.painter().rect(rect, 18.0, fill, Stroke::new(1.0_f32, if resp.hovered() { PINK_HOVER } else { edge })); + let c = pos2(rect.left() + 20.0, rect.center().y); + if on { tick(ui, c, 5.0, Stroke::new(2.0_f32, PINK_HOVER)) } else { ui.painter().circle_stroke(c, 4.5, Stroke::new(1.5_f32, FAINT)); } + ui.painter().galley_with_override_text_color(pos2(rect.left() + 33.0, rect.center().y - g.size().y / 2.0), g, if on { INK } else { SOFT }); + if resp.clicked() { + self.stages[i] = !on; + } + x = rect.right() + 10.0; + } + + let ready = self.root.is_some() && self.python.is_some() && self.chosen.is_some() && self.searching.is_none() && self.game.is_none(); + let any = self.stages[1..].iter().any(|s| *s); + let (msg, ink) = if !self.note.is_empty() { + (self.note.as_str(), ORANGE) + } else if !any { + ("Choose at least one step, or just check the files.", SOFT) + } else if self.chosen.is_none() && self.searching.is_none() { + ("Choose your game files to continue.", SOFT) + } else { + (if self.stages[ASSETS] { "Needs about 400 GB and takes hours. You can stop and resume." } else { "Needs about 30 GB and takes a while. You can stop and resume." }, SOFT) + }; + let g = ui.painter().layout(msg.into(), reg(13.0), ink, 480.0); + ui.painter().galley(pos2(64.0, 546.0 - g.size().y / 2.0), g, ink); + if button(ui, r(578.0, 524.0, 140.0, 44.0), "Check files", false, ready) { + self.start(true, ui.ctx()); + } + if button(ui, r(728.0, 524.0, 168.0, 44.0), "Build the game", true, ready && any) { + self.start(false, ui.ctx()); + } + } + + fn building_page(&mut self, ui: &mut Ui) { + let failed = self.page == Page::Failed; + let (done, total) = self.progress.count(); + let c = pos2(116.5, 152.0); + let part: f32 = self.progress.state.iter().zip(self.progress.percent).map(|(s, p)| match s { + State::Done => 1.0, + State::Running => p.unwrap_or(0) as f32 / 100.0 * 0.9, + _ => 0.0, + }).sum::() / total.max(1) as f32; + ui.painter().circle_stroke(c, 48.0, Stroke::new(9.0_f32, glass(18))); + let p = ui.ctx().animate_value_with_time(ui.id().with("ring"), part, 0.4); + arc(ui, c, 48.0, 9.0, 0.0, p, |t| if failed { BAD } else { sunset(t) }); + text(ui, c - vec2(0.0, 7.0), Align2::CENTER_CENTER, &format!("{done} of {total}"), bold(18.0), INK); + text(ui, c + vec2(0.0, 14.0), Align2::CENTER_CENTER, "steps", reg(12.0), SOFT); + + let title = match (failed, self.cancelled, self.check_only) { + (true, ..) => "The build stopped", + (_, true, _) => "Stopping", + (_, _, true) => "Checking your files", + _ => "Building your game", + }; + text(ui, pos2(194.0, 136.0), Align2::LEFT_CENTER, title, bold(24.0), INK); + let sub = if failed { + if self.progress.error.is_empty() { "Open the log below to see what happened.".into() } else { self.progress.error.clone() } + } else { + format!("{} so far. You can keep using your computer.", clock(self.started.elapsed().as_secs())) + }; + let mut job = egui::text::LayoutJob::simple(sub, reg(14.0), if failed { BAD } else { SOFT }, 700.0); + job.wrap.max_rows = 2; + let g = ui.fonts(|f| f.layout_job(job)); + ui.painter().galley(pos2(194.0, 156.0), g, SOFT); + if !failed { + ui.ctx().request_repaint_after(std::time::Duration::from_secs(1)); + } + + let body = r(64.0, 224.0, 832.0, 282.0); + if self.show_log { + ui.painter().rect(body, 12.0, Color32::from_black_alpha(90), Stroke::new(1.0_f32, glass(20))); + let mut child = ui.new_child(egui::UiBuilder::new().max_rect(body.shrink(12.0))); + let log = &self.progress.log; + let area = egui::ScrollArea::both().stick_to_bottom(true).auto_shrink([false, false]); + area.show_rows(&mut child, 14.0, log.len(), |ui, rows| { + for l in &log[rows] { + let ink = if l.contains("ERROR") { BAD } else if l.contains("WARNING") { ORANGE } else { SOFT }; + let t = egui::RichText::new(l).font(FontId::monospace(12.0)).color(ink); + ui.add(egui::Label::new(t).extend()); + } + }); + } else { + card(ui, body); + for (i, (_, name, what)) in STAGES.iter().enumerate() { + let y = body.top() + 1.0 + 56.0 * i as f32; + let mid = y + 28.0; + if i > 0 { + ui.painter().hline(82.0..=878.0, y, Stroke::new(1.0_f32, glass(12))); + } + let dot = pos2(94.0, mid); + let s = self.progress.state[i]; + match s { + State::Done => { + ui.painter().circle_filled(dot, 10.0, GO.gamma_multiply(0.22)); + tick(ui, dot, 4.5, Stroke::new(2.0_f32, GO)); + } + State::Running => spinner(ui, dot, 9.0), + State::Failed => { + ui.painter().circle_filled(dot, 10.0, BAD.gamma_multiply(0.22)); + for d in [vec2(3.5, 3.5), vec2(3.5, -3.5)] { + ui.painter().line_segment([dot - d, dot + d], Stroke::new(2.0_f32, BAD)); + } + } + State::Waiting => { ui.painter().circle_stroke(dot, 9.0, Stroke::new(1.5_f32, glass(40))); } + State::Skipped => { ui.painter().hline(88.0..=100.0, mid, Stroke::new(1.5_f32, FAINT)); } + } + let quiet = matches!(s, State::Waiting | State::Skipped); + text(ui, pos2(120.0, mid - 9.0), Align2::LEFT_CENTER, name, semi(14.0), if quiet { FAINT } else { INK }); + let d = match s { + State::Running | State::Failed if !self.progress.detail[i].is_empty() => &self.progress.detail[i], + _ => *what, + }; + line(ui, pos2(120.0, mid + 10.0), 560.0, d, reg(12.0), if quiet { FAINT } else { SOFT }); + let right = match (s, self.progress.percent[i]) { + (State::Running, Some(p)) => format!("{p}%"), + (State::Running, _) => "Working".into(), + (State::Done, _) => "Done".into(), + (State::Failed, _) => "Stopped".into(), + (State::Skipped, _) => "Not run".into(), + _ => String::new(), + }; + let ink = match s { State::Done => GO, State::Failed => BAD, State::Running => INK, _ => FAINT }; + text(ui, pos2(878.0, mid), Align2::RIGHT_CENTER, &right, semi(13.0), ink); + } + } + if link(ui, pos2(64.0, 546.0), if self.show_log { "Hide log" } else { "Show log" }, PINK_HOVER).0 { + self.show_log = !self.show_log; + } + if failed { + if button(ui, r(618.0, 524.0, 110.0, 44.0), "Back", false, true) { + self.page = Page::Files; + } + if button(ui, r(738.0, 524.0, 158.0, 44.0), "Try again", true, true) { + self.start(self.check_only, ui.ctx()); + } + } else if button(ui, r(786.0, 524.0, 110.0, 44.0), "Cancel", false, !self.cancelled) { + self.cancelled = true; + if let Some(b) = &self.build { + b.cancel(false); + } + } + } + + fn ready_page(&mut self, ui: &mut Ui) { + let x = SIZE.x / 2.0; + glow(ui, pos2(x, 240.0), 250.0, Color32::from_rgba_unmultiplied(240, 70, 150, 60)); + self.logo_at(ui, pos2(x, 230.0), 230.0); + let (title, sub) = if self.check_only { + ("Your files are good", "Everything the build needs is there.".to_string()) + } else { + ("Your build is finished", format!("Built in {}. It's in {}", clock(self.took), elide_home(&self.out))) + }; + text(ui, pos2(x, 362.0), Align2::CENTER_CENTER, title, bold(26.0), INK); + let g = ui.painter().layout(sub, reg(14.0), SOFT, 700.0); + ui.painter().galley(pos2(x - g.size().x / 2.0, 386.0), g, SOFT); + if self.check_only { + if button(ui, r(x - 90.0, 450.0, 180.0, 46.0), "Continue", true, true) { + self.page = Page::Files; + } + } else { + if button(ui, r(x - 175.0, 450.0, 180.0, 46.0), "Continue", true, true) { + (self.tab, self.page) = (Tab::Home, Page::Files); + } + if button(ui, r(x + 15.0, 450.0, 160.0, 46.0), "Build again", false, true) { + self.page = Page::Files; + } + } + } + + #[cfg(feature = "shots")] + fn shots(&mut self, ctx: &egui::Context) { + let Some(dir) = std::env::var_os("LEONIDA_SHOTS").map(PathBuf::from) else { return }; + let n = self.shot / 30; + if self.shot % 30 == 0 { + (self.searching, self.python, self.note) = (None, Some(vec!["python3".into()]), String::new()); + self.out = "/Users/you/Leonida".into(); + self.games = vec![("/Users/you/Games/Leonida".into(), "Example game 1.0.2.1".into()), ("/Volumes/Games/Copy".into(), "Example game 1.0.2.1".into())]; + self.chosen = Some(0); + self.progress = Progress::new(&[true; 5]); + for l in ["12:00:00 check: all files present", "12:00:01 shaders translate: 620/1000 (62%), ~31 min left", "12:00:02 assets: texture pool 3"] { + self.progress.line(l.into()); + } + + self.took = 5120; + self.config = play::Config::default(); + for (k, v) in [("seconds", 8_040), ("last", play::now() - 7_300), ("keyboard", 1)] { + let _ = self.config.set(k, v); + } + self.port = play::Port::Ready; + let m = |folder: &str, name: &str, enabled| play::Mod { folder: folder.into(), name: name.into(), enabled, note: String::new() }; + self.mods.list = vec![m("example_one", "Example mod", true), m("example_two", "Another example", false)]; + self.page = Page::Files; + self.play_note.clear(); + match n { + 0 => self.port = play::Port::NotBuilt, + 1 => self.tab = Tab::Home, + 2 => self.play_note = "Closed after 42 s with code 3. The log says more.".into(), + 3 => self.tab = Tab::Mods, + 4 => self.tab = Tab::Build, + 5 => self.page = Page::Building, + 6 => self.tab = Tab::Settings, + 7 => { + self.log = vec!["[rt] example line".into()]; + self.log_read = None; + self.log_path = PathBuf::new(); + self.tab = Tab::Log; + } + _ => return ctx.send_viewport_cmd(egui::ViewportCommand::Close), + } + } + self.port_checked = Some(std::time::Instant::now()); + if self.shot % 30 == 24 { + ctx.send_viewport_cmd(egui::ViewportCommand::Screenshot); + } + for e in ctx.input(|i| i.events.clone()) { + if let egui::Event::Screenshot { image: im, .. } = e { + let bytes: Vec = im.pixels.iter().flat_map(|p| p.to_array()).collect(); + let _ = image::save_buffer(dir.join(format!("{n}.png")), &bytes, im.size[0] as u32, im.size[1] as u32, image::ColorType::Rgba8); + } + } + self.shot += 1; + ctx.request_repaint_after(std::time::Duration::from_millis(30)); + } +} + +impl eframe::App for App { + fn update(&mut self, ctx: &egui::Context, _: &mut eframe::Frame) { + self.poll(ctx); + #[cfg(feature = "shots")] + self.shots(ctx); + if self.tab == Tab::Build && self.page == Page::Files { + let dropped = ctx.input(|i| i.raw.dropped_files.iter().find_map(|f| f.path.clone())); + if let Some(p) = dropped { + let dir = if p.is_dir() { Some(p) } else { p.parent().map(PathBuf::from) }; + if let Some(d) = dir { + self.add_game(d.display().to_string()); + } + } + } + egui::CentralPanel::default().frame(egui::Frame::none()).show(ctx, |ui| { + self.chrome(ui); + match (self.tab, self.page) { + (Tab::Home, _) => self.home_page(ui), + (Tab::Log, _) => self.log_page(ui), + (Tab::Mods, _) => self.mods_page(ui), + (Tab::Settings, _) => self.settings_page(ui), + (_, Page::Files) => self.files_page(ui), + (_, Page::Building | Page::Failed) => self.building_page(ui), + (_, Page::Ready) => self.ready_page(ui), + } + }); + } + + fn on_exit(&mut self, _gl: Option<&eframe::glow::Context>) { + if let Some(b) = &self.build { + b.cancel(true); + } + } +} + +fn main() -> eframe::Result<()> { + let mut vp = egui::ViewportBuilder::default() + .with_inner_size(SIZE) + .with_resizable(false) + .with_maximize_button(false); + if cfg!(target_os = "macos") { + vp = vp.with_fullsize_content_view(true).with_titlebar_shown(false).with_title_shown(false); + } + if let Ok(img) = image::load_from_memory(include_bytes!("../../assets/logo.png")) { + let rgba = img.resize(256, 256, image::imageops::FilterType::Lanczos3).to_rgba8(); + let (width, height) = rgba.dimensions(); + vp = vp.with_icon(egui::IconData { rgba: rgba.into_raw(), width, height }); + } + let options = eframe::NativeOptions { viewport: vp, centered: true, ..Default::default() }; + eframe::run_native("Leonida", options, Box::new(|cc| Ok(Box::new(App::new(cc))))) +} + +#[cfg(test)] +mod tests { + use super::*; + + /// The cursor on each frame while the pointer hovers, presses, holds and releases on a button. + fn cursors(at: Pos2) -> Vec { + let ctx = egui::Context::default(); + let press = |pressed| egui::Event::PointerButton { + pos: at, + button: egui::PointerButton::Primary, + pressed, + modifiers: Default::default(), + }; + let move_ = || vec![egui::Event::PointerMoved(at)]; + let steps = [move_(), vec![], vec![], vec![press(true)], vec![], vec![], vec![press(false)], vec![], vec![]]; + let mut out = vec![]; + for (i, events) in steps.into_iter().enumerate() { + let input = egui::RawInput { + screen_rect: Some(Rect::from_min_size(pos2(0.0, 0.0), SIZE)), + time: Some(i as f64 * 0.05), + events, + ..Default::default() + }; + let o = ctx.run(input, |ctx| { + egui::CentralPanel::default().frame(egui::Frame::none()).show(ctx, |ui| { + ui.interact(r(0.0, 0.0, SIZE.x, 64.0), ui.id().with("bar"), Sense::drag()); + hit(ui, r(400.0, 16.0, 96.0, 32.0), "tab", "tab", true); + hit(ui, r(64.0, 296.0, 190.0, 56.0), "button", "button", true); + }); + }); + out.push(o.platform_output.cursor_icon); + } + out + } + + #[test] + fn the_hand_stays_while_clicking() { + for at in [pos2(440.0, 32.0), pos2(150.0, 320.0)] { + let c = cursors(at); + assert!(c[2..].iter().all(|c| *c == egui::CursorIcon::PointingHand), "{at:?}: {c:?}"); + } + } +} diff --git a/builder/src/play.rs b/builder/src/play.rs new file mode 100644 index 0000000000..9ac2d2215f --- /dev/null +++ b/builder/src/play.rs @@ -0,0 +1,346 @@ +// Starting the built port, the launcher's own settings, and the mod manager's command line. No UI in here. +#[cfg(windows)] +use crate::backend::quiet; +use crate::backend::{kill_tree, python}; +use std::collections::BTreeMap; +use std::fs; +use std::io::{Read, Seek, SeekFrom}; +use std::path::{Path, PathBuf}; +use std::process::{Command, Stdio}; +use std::sync::mpsc::{channel, Receiver}; +use std::sync::{Arc, Mutex}; +use std::time::{Instant, SystemTime, UNIX_EPOCH}; + +pub fn now() -> u64 { + SystemTime::now().duration_since(UNIX_EPOCH).map_or(0, |d| d.as_secs()) +} + +pub fn config_dir() -> PathBuf { + let var = |n| std::env::var_os(n).filter(|v| !v.is_empty()).map(PathBuf::from); + let home = || var("HOME").unwrap_or_default(); + if cfg!(windows) { + var("APPDATA").unwrap_or_default().join("Leonida Launcher") + } else if cfg!(target_os = "macos") { + home().join("Library/Application Support/Leonida Launcher") + } else { + var("XDG_CONFIG_HOME").unwrap_or_else(|| home().join(".config")).join("leonida-launcher") + } +} + +/// `key=value` lines. Unknown keys are kept, so an older launcher doesn't drop a newer one's settings. +#[derive(Default)] +pub struct Config { + path: PathBuf, + map: BTreeMap, +} + +impl Config { + pub fn load(path: PathBuf) -> Self { + let text = fs::read_to_string(&path).unwrap_or_default(); + let map = text.lines().filter_map(|l| l.split_once('=')).map(|(k, v)| (k.into(), v.into())).collect(); + Self { path, map } + } + pub fn get(&self, k: &str) -> &str { + self.map.get(k).map_or("", String::as_str) + } + pub fn num(&self, k: &str) -> u64 { + self.get(k).parse().unwrap_or(0) + } + pub fn on(&self, k: &str) -> bool { + self.get(k) == "1" + } + pub fn set(&mut self, k: &str, v: impl ToString) -> std::io::Result<()> { + self.map.insert(k.into(), v.to_string().replace(['\n', '\r'], " ")); + if self.path.as_os_str().is_empty() { + return Ok(()); // in memory only + } + if let Some(d) = self.path.parent() { + fs::create_dir_all(d)?; + } + let text: String = self.map.iter().map(|(k, v)| format!("{k}={v}\n")).collect(); + let part = self.path.with_extension("part"); + fs::write(&part, text)?; + fs::rename(part, &self.path) + } +} + +#[derive(Clone, PartialEq, Debug)] +pub enum Port { + NotBuilt, + /// Built, but this file is missing. + Missing(String), + Ready, +} + +const EXE: &str = "game_scarlett_master.exe"; // tools/leonida_mods.py, EXPECTED_EXE + +fn game_dir(out: &Path) -> Option { + let s = fs::read_to_string(out.join("game_path.txt")).ok()?; + let s = s.trim_end_matches(['\r', '\n']); + (!s.is_empty()).then(|| s.into()) +} + +fn starter(out: &Path) -> PathBuf { + out.join(if cfg!(windows) { "gta6rt.exe" } else { "gta6rt.sh" }) +} + +pub fn port(out: &str) -> Port { + if out.trim().is_empty() { + return Port::NotBuilt; + } + let out = Path::new(out.trim()); + if !starter(out).is_file() || !out.join("gta6rt.exe").is_file() { + return Port::NotBuilt; + } + match game_dir(out) { + None => Port::Missing("game_path.txt".into()), + Some(d) if !d.join(EXE).is_file() => Port::Missing(EXE.into()), + Some(_) => Port::Ready, + } +} + +pub struct Options { + pub keyboard: bool, + pub splash: bool, + pub diagnostics: bool, + pub wine: String, +} + +/// The documented start (docs/boot.md, section 2). On Linux and macOS gta6rt.sh finds Wine and adds the overlay itself. +pub fn command(out: &Path, o: &Options) -> Option { + let game = game_dir(out)?; + let mut c = Command::new(starter(out)); + c.arg("--run"); + if cfg!(windows) { + c.arg(game.join(EXE)).arg("--game-dir").arg(&game); + c.arg("--overlay").arg(out.join("overlay")).arg("--mods").arg(out.join("mods")); + } else if !o.wine.trim().is_empty() { + c.env("WINE", o.wine.trim()); + } + if std::env::var_os("LEONIDA_D3D12").is_none() { + c.env("LEONIDA_D3D12", "vulkan"); + } + if o.keyboard { + c.env("LEONIDA_KEYBOARD_PAD", "1"); + } + if !o.splash { + c.env("LEONIDA_PACKAGE_SPLASH", "0"); + } + if o.diagnostics { + c.env("LEONIDA_DEVICE_FAULT", "1").env("LEONIDA_VK_VALIDATION", "1"); + } + c.current_dir(out); + Some(c) +} + +pub struct Game { + pub started: Instant, + done: Receiver>, + pid: u32, + alive: Arc>, +} + +/// Its output goes to a file, so the game carries on when the launcher is closed. +pub fn start(mut c: Command, log: &Path, wake: impl Fn() + Send + 'static) -> std::io::Result { + if let Some(d) = log.parent() { + fs::create_dir_all(d)?; + } + let f = fs::File::create(log)?; + c.stdin(Stdio::null()).stdout(f.try_clone()?).stderr(f); + #[cfg(unix)] + { + use std::os::unix::process::CommandExt; + c.process_group(0); + } + #[cfg(windows)] + quiet(&mut c); + let mut child = c.spawn()?; + let (pid, alive) = (child.id(), Arc::new(Mutex::new(true))); + let (tx, done) = channel(); + let flag = alive.clone(); + std::thread::spawn(move || { + let code = child.wait().ok().and_then(|s| s.code()); + *flag.lock().unwrap() = false; + let _ = tx.send(code); + wake(); + }); + Ok(Game { started: Instant::now(), done, pid, alive }) +} + +impl Game { + pub fn ended(&self) -> Option> { + self.done.try_recv().ok() + } + pub fn stop(&self) { + kill_tree(self.pid, self.alive.clone(), false); + } +} + +/// The last part of the log, as lines. +pub fn tail(log: &Path) -> Vec { + const MAX: u64 = 128 * 1024; + let read = || -> std::io::Result> { + let mut f = fs::File::open(log)?; + let n = f.metadata()?.len(); + f.seek(SeekFrom::Start(n.saturating_sub(MAX)))?; + let mut b = vec![]; + f.take(MAX).read_to_end(&mut b)?; + Ok(b) + }; + String::from_utf8_lossy(&read().unwrap_or_default()).lines().map(String::from).collect() +} + +#[derive(Clone, Debug, PartialEq)] +pub struct Mod { + pub folder: String, + pub name: String, + pub enabled: bool, + pub note: String, +} + +#[derive(Default)] +pub struct Mods { + pub list: Vec, + pub error: String, +} + +/// Runs `leonida_mods.py ` (none: nothing), then reads the list again. +pub fn mods(py: &[String], root: &Path, out: &str, args: &[String]) -> Mods { + let tool = |args: &[String]| { + let mut c = python(py, root); + c.arg(root.join("tools").join("leonida_mods.py")).args(["--port", out]).args(args).output() + }; + let fault = |o: std::io::Result| match o { + Ok(o) if o.status.success() => Ok(o), + Ok(o) => { + let e = String::from_utf8_lossy(&o.stderr); + let e = e.trim().lines().last().unwrap_or("The mod manager stopped."); + Err(e.trim_start_matches("ERROR: ").to_string()) + } + Err(e) => Err(e.to_string()), + }; + let mut error = String::new(); + if !args.is_empty() { + error = fault(tool(args)).err().unwrap_or_default(); + } + match fault(tool(&["list".into(), "--json".into()])) { + Ok(o) => { + let mut m = parse_mods(&String::from_utf8_lossy(&o.stdout)); + if !error.is_empty() { + m.error = error; + } + m + } + Err(e) => Mods { list: vec![], error: if error.is_empty() { e } else { error } }, + } +} + +fn parse_mods(text: &str) -> Mods { + let Ok(v) = serde_json::from_str::(text) else { + return Mods { list: vec![], error: "The mod list couldn't be read.".into() }; + }; + let s = |v: &serde_json::Value| v.as_str().unwrap_or_default().to_string(); + let list = v["mods"].as_array().into_iter().flatten().map(|m| Mod { + folder: s(&m["folder"]), + name: s(&m["name"]), + enabled: m["enabled"].as_bool().unwrap_or(false), + note: s(&m["warnings"][0]), + }); + Mods { list: list.collect(), error: s(&v["errors"][0]) } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn folder(name: &str) -> PathBuf { + let d = std::env::temp_dir().join(format!("leonida-launcher-{name}-{}", std::process::id())); + let _ = fs::remove_dir_all(&d); + fs::create_dir_all(&d).unwrap(); + d + } + + fn build(d: &Path) { + fs::write(d.join("gta6rt.exe"), "").unwrap(); + fs::write(d.join("gta6rt.sh"), "#!/bin/sh\necho \"$1 $WINE $LEONIDA_D3D12 $LEONIDA_KEYBOARD_PAD\"\nsleep \"${NAP:-0}\"\nexit 7\n").unwrap(); + fs::write(d.join("game_path.txt"), d.join("game").to_str().unwrap()).unwrap(); + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + fs::set_permissions(d.join("gta6rt.sh"), fs::Permissions::from_mode(0o755)).unwrap(); + } + } + + fn options() -> Options { + Options { keyboard: true, splash: true, diagnostics: false, wine: "my-wine".into() } + } + + #[test] + fn port_states() { + let d = folder("port"); + let s = d.to_str().unwrap(); + assert_eq!(port(s), Port::NotBuilt); + build(&d); + assert_eq!(port(s), Port::Missing(EXE.into())); + fs::create_dir(d.join("game")).unwrap(); + fs::write(d.join("game").join(EXE), "").unwrap(); + assert_eq!(port(s), Port::Ready); + fs::remove_dir_all(d).unwrap(); + } + + #[cfg(unix)] + #[test] + fn runs_the_port_and_reports_its_exit() { + let d = folder("run"); + build(&d); + let log = d.join("logs").join("game.log"); + let g = start(command(&d, &options()).unwrap(), &log, || {}).unwrap(); + assert_eq!(g.done.recv_timeout(std::time::Duration::from_secs(10)).unwrap(), Some(7)); + assert!(tail(&log)[0].starts_with("--run my-wine")); + assert!(tail(&log)[0].ends_with(" 1")); + fs::remove_dir_all(d).unwrap(); + } + + #[cfg(unix)] + #[test] + fn stop_ends_the_whole_tree() { + let d = folder("stop"); + build(&d); + let mut c = command(&d, &options()).unwrap(); + c.env("NAP", "60"); + let g = start(c, &d.join("game.log"), || {}).unwrap(); + std::thread::sleep(std::time::Duration::from_millis(300)); + g.stop(); + assert!(g.done.recv_timeout(std::time::Duration::from_secs(12)).is_ok()); + fs::remove_dir_all(d).unwrap(); + } + + #[test] + fn settings_survive_a_reload() { + let d = folder("conf"); + let p = d.join("a").join("launcher.conf"); + let mut c = Config::load(p.clone()); + c.set("out", "/a=b/c").unwrap(); + c.set("out", "/a=b/d").unwrap(); + assert_eq!(Config::load(p).get("out"), "/a=b/d"); + fs::remove_dir_all(d).unwrap(); + } + + #[test] + fn reads_the_mod_managers_own_output() { + let root = crate::backend::find_root().unwrap(); + let py = crate::backend::find_python().unwrap(); + let d = folder("mods"); + build(&d); + let out = d.to_str().unwrap(); + let src = root.join("mods").join("first_person").display().to_string(); + let m = mods(&py, &root, out, &["install".into(), "--enable".into(), src]); + assert_eq!(m.error, ""); + assert_eq!(m.list.len(), 1); + assert!(m.list[0].enabled); + let m = mods(&py, &root, out, &["disable".into(), m.list[0].folder.clone()]); + assert!(!m.list[0].enabled, "{}", m.error); + assert_ne!(mods(&py, &root, out, &["enable".into(), "nope".into()]).error, ""); + fs::remove_dir_all(d).unwrap(); + } +}