From 1a0cde336694a1d0eaede0ebdfe5c4e6f40db341 Mon Sep 17 00:00:00 2001 From: Andreas Olsson Date: Sun, 25 Aug 2024 13:19:12 +0200 Subject: [PATCH] Build on MacOS --- packages/desktop/src/providers/config.rs | 5 ++++- packages/desktop/src/providers/provider_ref.rs | 5 ++++- packages/desktop/src/providers/variables.rs | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/desktop/src/providers/config.rs b/packages/desktop/src/providers/config.rs index 0abb5668..2c0e23a0 100644 --- a/packages/desktop/src/providers/config.rs +++ b/packages/desktop/src/providers/config.rs @@ -2,10 +2,12 @@ use serde::Deserialize; #[cfg(windows)] use super::komorebi::KomorebiProviderConfig; +#[cfg(windows)] +use super::language::LanguageProviderConfig; use super::{ battery::BatteryProviderConfig, cpu::CpuProviderConfig, host::HostProviderConfig, ip::IpProviderConfig, - language::LanguageProviderConfig, memory::MemoryProviderConfig, + memory::MemoryProviderConfig, network::NetworkProviderConfig, weather::WeatherProviderConfig, }; @@ -21,5 +23,6 @@ pub enum ProviderConfig { Memory(MemoryProviderConfig), Network(NetworkProviderConfig), Weather(WeatherProviderConfig), + #[cfg(windows)] Language(LanguageProviderConfig), } diff --git a/packages/desktop/src/providers/provider_ref.rs b/packages/desktop/src/providers/provider_ref.rs index 9d3b1fa4..de902aad 100644 --- a/packages/desktop/src/providers/provider_ref.rs +++ b/packages/desktop/src/providers/provider_ref.rs @@ -7,9 +7,11 @@ use tracing::info; #[cfg(windows)] use super::komorebi::KomorebiProvider; +#[cfg(windows)] +use super::language::LanguageProvider; use super::{ battery::BatteryProvider, config::ProviderConfig, cpu::CpuProvider, - host::HostProvider, ip::IpProvider, language::LanguageProvider, + host::HostProvider, ip::IpProvider, memory::MemoryProvider, network::NetworkProvider, provider::Provider, provider_manager::SharedProviderState, variables::ProviderVariables, weather::WeatherProvider, @@ -169,6 +171,7 @@ impl ProviderRef { ProviderConfig::Weather(config) => { Box::new(WeatherProvider::new(config)) } + #[cfg(windows)] ProviderConfig::Language(config) => { Box::new(LanguageProvider::new(config)) } diff --git a/packages/desktop/src/providers/variables.rs b/packages/desktop/src/providers/variables.rs index dac081c1..393dc392 100644 --- a/packages/desktop/src/providers/variables.rs +++ b/packages/desktop/src/providers/variables.rs @@ -2,9 +2,11 @@ use serde::Serialize; #[cfg(windows)] use super::komorebi::KomorebiVariables; +#[cfg(windows)] +use super::language::LanguageVariables; use super::{ battery::BatteryVariables, cpu::CpuVariables, host::HostVariables, - ip::IpVariables, language::LanguageVariables, memory::MemoryVariables, + ip::IpVariables, memory::MemoryVariables, network::NetworkVariables, weather::WeatherVariables, };