mirror of
https://github.com/RustySamovar/RustySamovar.git
synced 2024-11-22 02:45:34 +00:00
59 lines
1.5 KiB
Rust
59 lines
1.5 KiB
Rust
use std::io::Result;
|
|
|
|
fn main() -> Result<()> {
|
|
let proto_dir = "protobuf";
|
|
|
|
let protos = vec![
|
|
"packet_header",
|
|
|
|
"GetPlayerTokenReq",
|
|
"GetPlayerTokenRsp",
|
|
"PlayerLoginReq",
|
|
"OpenStateUpdateNotify",
|
|
"StoreWeightLimitNotify",
|
|
"PlayerStoreNotify",
|
|
"AvatarDataNotify",
|
|
"PlayerEnterSceneNotify",
|
|
"PlayerLoginRsp",
|
|
"GetPlayerSocialDetailReq",
|
|
"GetPlayerSocialDetailRsp",
|
|
"EnterSceneReadyReq",
|
|
"EnterSceneReadyRsp",
|
|
"SceneInitFinishReq",
|
|
"EnterScenePeerNotify",
|
|
"WorldDataNotify",
|
|
"WorldPlayerInfoNotify",
|
|
"ScenePlayerInfoNotify",
|
|
"PlayerEnterSceneInfoNotify",
|
|
"PlayerGameTimeNotify",
|
|
"SceneTimeNotify",
|
|
"SceneDataNotify",
|
|
"HostPlayerNotify",
|
|
"SceneTeamUpdateNotify",
|
|
"SceneInitFinishRsp",
|
|
"EnterSceneDoneReq",
|
|
"SceneEntityAppearNotify",
|
|
"EnterSceneDoneRsp",
|
|
"PostEnterSceneReq",
|
|
"PostEnterSceneRsp",
|
|
|
|
"WorldPlayerRTTNotify",
|
|
"PingReq",
|
|
"PingRsp",
|
|
"PlayerDataNotify",
|
|
|
|
"EnterWorldAreaReq",
|
|
"EnterWorldAreaRsp",
|
|
|
|
];
|
|
|
|
let protos: Vec<String> = protos.iter().map(|&x| format!("{}/{}.proto", proto_dir, x)).collect();
|
|
|
|
let ret = prost_build::compile_protos(&protos, &[format!("{}/", proto_dir)]);
|
|
|
|
match ret {
|
|
Ok(_) => return Ok(()),
|
|
Err(e) => panic!("{}", e),
|
|
}
|
|
}
|