From 6152e987c6e2250ce21ff4506023ebd43c336253 Mon Sep 17 00:00:00 2001 From: chyyran Date: Sat, 14 Jan 2023 17:43:58 -0500 Subject: [PATCH] build: fix strip _capi script --- librashader-capi/post_build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librashader-capi/post_build.rs b/librashader-capi/post_build.rs index 3e15d7e..7fcb14f 100644 --- a/librashader-capi/post_build.rs +++ b/librashader-capi/post_build.rs @@ -18,7 +18,6 @@ pub fn main() { let bytes = buf.into_inner().expect("Unable to extract bytes"); let string = String::from_utf8(bytes).expect("Unable to create string"); - // let string = string.replace("CHD_ERROR_", "CHDERR_"); File::create(PathBuf::from(env::var("CRATE_OUT_DIR").unwrap()).join("librashader.h")) .expect("Unable to open file") .write_all(string.as_bytes()) @@ -29,6 +28,7 @@ pub fn main() { let artifacts = &["liblibrashader_capi.so", "liblibrashader_capi.a"]; for artifact in artifacts { let ext = artifact.strip_prefix("lib").unwrap(); + let ext = ext.replace("_capi", ""); fs::rename(PathBuf::from(env::var("CRATE_OUT_DIR").unwrap()).join(artifact), PathBuf::from(env::var("CRATE_OUT_DIR").unwrap()).join(ext)).unwrap(); } }