Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 
Fix build macro and increment build number. (#433)
  • Loading branch information
hulto authored Jan 10, 2024
1 parent 3fa2947 commit 468f485
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 8 deletions.
2 changes: 1 addition & 1 deletion implants/golem/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "golem"
version = "0.0.3"
version = "0.0.4"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion implants/imix/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "imix"
version = "0.0.3"
version = "0.0.4"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion implants/lib/c2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "c2"
version = "0.0.3"
version = "0.0.4"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion implants/lib/eldritch/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "eldritch"
version = "0.0.3"
version = "0.0.4"
edition = "2021"

[features]
Expand Down
11 changes: 11 additions & 0 deletions implants/lib/eldritch/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,18 @@ fn build_bin_reflective_loader() {
assert!(test_dll_path.is_file());
}

#[cfg(windows)]
const HOST_FAMILY: &str = "windows";

#[cfg(unix)]
const HOST_FAMILY: &str = "unix";

fn set_host_family() {
println!("cargo:rustc-cfg=host_family=\"{}\"", HOST_FAMILY);
}

fn main() {
set_host_family();
#[cfg(target_os = "windows")]
build_bin_create_file_dll();
#[cfg(target_os = "windows")]
Expand Down
19 changes: 16 additions & 3 deletions implants/lib/eldritch/src/sys/dll_reflect_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,27 @@ use {
},
};

#[cfg(not(windows))]
#[cfg(all(host_family = "windows", target_os = "windows"))]
macro_rules! win_target {
() => {
r"x86_64-pc-windows-msvc"
};
}
#[cfg(all(host_family = "unix", target_os = "windows"))]
macro_rules! win_target {
() => {
r"x86_64-pc-windows-gnu"
};
}

#[cfg(host_family="unix")]
macro_rules! sep {
() => {
"/"
};
}

#[cfg(windows)]
#[cfg(host_family="windows")]
macro_rules! sep {
() => {
r#"\"#
Expand All @@ -54,7 +67,7 @@ const LOADER_BYTES: &[u8] = include_bytes!(concat!(
sep!(),
"target",
sep!(),
"x86_64-pc-windows-msvc",
win_target!(),
sep!(),
"release",
sep!(),
Expand Down
2 changes: 1 addition & 1 deletion tavern/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main

// Version of Tavern being run
const Version = "v0.0.3"
const Version = "v0.0.4"

0 comments on commit 468f485

Please sign in to comment.