update gui dep to resolve mem leak (#394)

This commit is contained in:
Sijie.Sun
2024-10-08 09:21:47 +08:00
committed by GitHub
parent b31996230d
commit a08a8e7f4c
5 changed files with 1478 additions and 1551 deletions

View File

@@ -46,8 +46,8 @@ impl WindowsBuild {
fn download_protoc() -> PathBuf {
println!("cargo:info=use exist protoc: {:?}", "k");
let out_dir = Self::get_cargo_target_dir().unwrap();
let fname = out_dir.join("protoc");
let out_dir = Self::get_cargo_target_dir().unwrap().join("protobuf");
let fname = out_dir.join("bin/protoc.exe");
if fname.exists() {
println!("cargo:info=use exist protoc: {:?}", fname);
return fname;
@@ -65,10 +65,7 @@ impl WindowsBuild {
.map(zip::ZipArchive::new)
.unwrap()
.unwrap();
let protoc_zipped_file = content.by_name("bin/protoc.exe").unwrap();
let mut content = protoc_zipped_file;
copy(&mut content, &mut File::create(&fname).unwrap()).unwrap();
content.extract(out_dir).unwrap();
fname
}