generated from ElnuDev/rust-project
Adjust demo to be runnable in workspace
This commit is contained in:
parent
4430accee7
commit
e8e5f4eef5
1 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,13 @@
|
|||
fn main() {
|
||||
renrs_gui::run("demo.rpy".into());
|
||||
use std::env;
|
||||
|
||||
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(())
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue