smmdb 1.4.2

A utility library for Super Mario Maker and Super Mario Maker 2 to read and manipulate game files.
extern crate protobuf_codegen_pure;

use protobuf_codegen_pure::{Codegen, Customize};
use std::fs::create_dir;
use std::path::Path;

const OUT_DIR: &str = "src/proto";

fn main() {
    if !Path::new(OUT_DIR).exists() {
        create_dir(OUT_DIR).expect("Creating proto out dir failed");
    }
    Codegen::new()
        .out_dir(OUT_DIR)
        .inputs(&[
            "proto/SMMCourse.proto",
            "proto/SMM2Course.proto",
            "proto/Sound.proto",
            "proto/Tile.proto",
        ])
        .include("proto")
        .customize(Customize {
            serde_derive: Some(true),
            carllerche_bytes_for_bytes: Some(true),
            ..Default::default()
        })
        .run()
        .expect("protoc failed");
}