feat: add build.rs
This commit is contained in:
@@ -3,10 +3,9 @@ name = "sciter"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
build = "build.rs"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sciter-rs = "0.5.56"
|
sciter-rs = "0.5.56"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
12
__gui/sciter/build.rs
Normal file
12
__gui/sciter/build.rs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
use std::process::Command;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let packfolder_cmd = "packfolder";
|
||||||
|
let mut cmd = Command::new(packfolder_cmd);
|
||||||
|
cmd.args(&["assets/", "src/assets.rc", "-binary"]);
|
||||||
|
|
||||||
|
let exit_status = cmd.status().expect("Invoke packfolder failed");
|
||||||
|
if !exit_status.success() {
|
||||||
|
panic!("Invoke packfolder return status is not success: {:?}", exit_status.code());
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user