From 28c29b2415fe7ee34642418942dfaf12c6810b38 Mon Sep 17 00:00:00 2001 From: Cherry Date: Wed, 14 Feb 2024 03:17:33 -0500 Subject: [PATCH] use new dialogical build script api --- pets-lib/Cargo.toml | 4 ++++ pets-lib/build.rs | 15 +-------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/pets-lib/Cargo.toml b/pets-lib/Cargo.toml index c821d96e..7eff6168 100644 --- a/pets-lib/Cargo.toml +++ b/pets-lib/Cargo.toml @@ -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 = "*" + diff --git a/pets-lib/build.rs b/pets-lib/build.rs index c9d45097..79d235f0 100644 --- a/pets-lib/build.rs +++ b/pets-lib/build.rs @@ -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(); }