Skip to content

Commit 524add6

Browse files
fix: linux no longer embed libsciter.so
1 parent a885f41 commit 524add6

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

src/main.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,37 +1145,6 @@ fn main() {
11451145
}
11461146

11471147
println!("CeleMod v{} ({})", env!("VERSION"), env!("GIT_HASH"));
1148-
// Linux: extract embedded libsciter.so at startup
1149-
#[cfg(target_os = "linux")]
1150-
{
1151-
use std::io::Write;
1152-
1153-
let lib_name = "libsciter.so";
1154-
let exe_dir = std::env::current_exe()
1155-
.unwrap()
1156-
.parent()
1157-
.unwrap()
1158-
.to_path_buf();
1159-
let lib_path = exe_dir.join(lib_name);
1160-
1161-
if !lib_path.exists() &&
1162-
/* we should not extract if in appimage, since it has the library bundled in a different way */ std::env::var("APPIMAGE").is_err() {
1163-
println!("Extracting {}...", lib_name);
1164-
let lib_bytes = include_bytes_zstd::include_bytes_zstd!("resources/libsciter.so", 19);
1165-
let mut file = std::fs::File::create(&lib_path).expect("Failed to create libsciter.so");
1166-
file.write_all(&lib_bytes)
1167-
.expect("Failed to write libsciter.so");
1168-
1169-
// Set library file permissions
1170-
#[cfg(unix)]
1171-
{
1172-
use std::os::unix::fs::PermissionsExt;
1173-
std::fs::set_permissions(&lib_path, std::fs::Permissions::from_mode(0o755))
1174-
.expect("Failed to set permissions");
1175-
}
1176-
println!("{} extracted successfully", lib_name);
1177-
}
1178-
}
11791148

11801149
// windows only
11811150
#[cfg(windows)]

0 commit comments

Comments
 (0)