Skip to content

Commit

Permalink
fix linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Nov 2, 2023
1 parent e6d0c16 commit 518801b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion bindings.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#define AUXMOS "auxmos"
#define AUXMOS (__detect_auxmos())

/proc/__detect_auxmos()
if (world.system_type == UNIX)
return "libauxmos"
else
return "auxmos"

/proc/finalize_gas_refs()
return call_ext(AUXMOS, "byond:finalize_gas_refs_ffi")()
Expand Down
8 changes: 7 additions & 1 deletion crates/byondapi-binds/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ pub fn generate_bindings() {
_ = std::fs::remove_file("./bindings.dm");
let mut file = std::fs::File::create("./bindings.dm").unwrap();
file.write_all(
r#"#define AUXMOS "auxmos"
r#"#define AUXMOS (__detect_auxmos())
/proc/__detect_auxmos()
if (world.system_type == UNIX)
return "libauxmos"
else
return "auxmos"
"#
.as_bytes(),
Expand Down

0 comments on commit 518801b

Please sign in to comment.