Adjust demo to be runnable in workspace

This commit is contained in:
Elnu 2023-05-29 16:24:44 -07:00
parent 4430accee7
commit e8e5f4eef5

View file

@ -1,3 +1,13 @@
fn main() { use std::env;
renrs_gui::run("demo.rpy".into());
fn main() -> Result<(), std::io::Error> {
let mut path = env::current_exe()?; // /target/debug/renrs-demo
path.pop(); // /target/debug
path.pop(); // /target
path.pop(); // /
path.push("demo/demo.rpy"); // /demo/demo.rpy
renrs_gui::run(path);
Ok(())
} }