Skip to content

Commit

Permalink
use new dialogical build script api
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamby777 committed Feb 14, 2024
1 parent f70026a commit 28c29b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
4 changes: 4 additions & 0 deletions pets-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ libdx = "2.1.1"
num_enum = "0.7.1"
ribbons = "0.1.0"
serde = {version = "1.0.188", features = ["derive"] }

[build-dependencies]
dialogical = "*"

15 changes: 1 addition & 14 deletions pets-lib/build.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
use std::env;
use std::path::PathBuf;
use std::process::Command;

fn main() {
println!("cargo:rerun-if-changed=./dg/src");
println!("cargo:rerun-if-changed=build.rs");

let dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let dir = PathBuf::from(&dir);

let dg_dir = dir.join("dg");

Command::new("dg")
.args(&["src/main.dg", "-o", "packed.dgc"])
.current_dir(&dg_dir)
.status()
.unwrap();
dialogical::compile("dg/src/main.dg", "dg/packed.dgc").unwrap();
}

0 comments on commit 28c29b2

Please sign in to comment.