fix: compiling on windows requires cosmic-icons in project root

* fix: compiling on windows requires cosmic-icons in project root

crabtime provides crabtime::WORKSPACE_PATH to refer to the
CARGO_MANIFEST_DIR of the top level crate being built, which means when
building libcosmic directly, crabtime::WORKSPACE_PATH will work, but
when building it as a dependency of another crate,
crabtime::WORKSPACE_PATH will no longer refer to the path to libcosmic.

I don't think there's a good workaround, since when in the context of
crabtime, CARGO_MANIFEST_DIR refers to the path to the crate generated
by crabtime rather than to libcosmic.

This replaces crabtime with a simple build.rs script that generates a
file in OUT_DIR.

* fix: do not generate icon bundle for unix targets

---------

Co-authored-by: Michael Aaron Murphy <michael@mmurphy.dev>
This commit is contained in:
Kyle Scheuing 2025-12-04 11:31:47 -05:00 committed by GitHub
parent 18182e5f97
commit 80875d5962
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 57 additions and 45 deletions

View file

@ -107,8 +107,6 @@ cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-c
chrono = "0.4.42"
cosmic-config = { path = "cosmic-config" }
cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true }
# Compile-time generation of code
crabtime = "1.1.4"
# Internationalization
i18n-embed = { version = "0.16.0", features = [
"fluent-system",