make it possible to build without simulator SDL lib, to make crosscompile possible
This commit is contained in:
@@ -15,11 +15,12 @@ reqwest = { version = "0.12", default-features = false, features = ["http2","ru
|
|||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0.219", features = ["derive"] }
|
||||||
serde_json = "1.0.143"
|
serde_json = "1.0.143"
|
||||||
bincode = "2.0.1"
|
bincode = "2.0.1"
|
||||||
embedded-graphics-simulator = "0.7.0"
|
|
||||||
|
|
||||||
|
|
||||||
|
embedded-graphics-simulator = { version = "0.7.0", optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["simulator"] # use simulator by default
|
default = ["simulator"]
|
||||||
simulator = []
|
simulator = ["embedded-graphics-simulator"] # enable only for simulator builds
|
||||||
epaper = []
|
epaper = []
|
||||||
paper-png = []
|
paper-png = []
|
||||||
1
build_aarch_epaper.sh
Normal file
1
build_aarch_epaper.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
cargo build --release --no-default-features --features=epaper --target=aarch64-unknown-linux-gnu
|
||||||
@@ -47,8 +47,13 @@ mod epaper;
|
|||||||
#[cfg(feature = "epaper")]
|
#[cfg(feature = "epaper")]
|
||||||
pub use epaper::EPaper;
|
pub use epaper::EPaper;
|
||||||
|
|
||||||
mod image_sim;
|
|
||||||
mod simulator;
|
|
||||||
|
|
||||||
pub use image_sim::ImageSimulator;
|
#[cfg(feature = "simulator")]
|
||||||
|
mod simulator;
|
||||||
|
#[cfg(feature = "simulator")]
|
||||||
pub use simulator::Simulator;
|
pub use simulator::Simulator;
|
||||||
|
|
||||||
|
#[cfg(feature = "paper-png")]
|
||||||
|
mod image_sim;
|
||||||
|
#[cfg(feature = "paper-png")]
|
||||||
|
pub use image_sim::ImageSimulator;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ fn main() {
|
|||||||
let display = display::Simulator::new();
|
let display = display::Simulator::new();
|
||||||
|
|
||||||
#[cfg(feature = "epaper")]
|
#[cfg(feature = "epaper")]
|
||||||
let display = display::EPaper::new();
|
let display = display::EPaper::new().unwrap();
|
||||||
|
|
||||||
let mut app = app::App::new(98685373, display);
|
let mut app = app::App::new(98685373, display);
|
||||||
app.init();
|
app.init();
|
||||||
|
|||||||
Reference in New Issue
Block a user