foxtrot
foxtrot copied to clipboard
Built target only works when the current directory is the Foxtrot directory - hard-coded specific file names
The two gui files model.rs and backdrop.rs have hard-coded file names in std::fs::read calls. This means that the gui target will only run when the current directory is Foxtrot.
A simple change (from someone who has never programmed in Rust until today!) is to change the line in gui/src/backdrop.rs
std::fs::read("gui/src/backdrop.wgsl")
to
std::fs::read(concat!(env!("CARGO_MANIFEST_DIR"), "/src/backdrop.wgsl"))
and similar in model.rs
Once this is done, the gui target can be executed from any folder - e.g the one where the step files are