Skip to content

Commit

Permalink
use .so for plugin dir
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft committed Jun 12, 2024
1 parent 5760049 commit 1bb1f51
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dc/wireshark/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ impl Test {
let so = so();
sh.copy_file(
format!("target/{profile}/libwireshark_dcquic.{so}"),
format!("target/wireshark/plugins/4.2/epan/libwireshark_dcquic.{so}"),
// wireshark always looks for `.so` regardless of platform
"target/wireshark/plugins/4.2/epan/libdcquic.so",
)?;

cmd!(
Expand Down Expand Up @@ -189,10 +190,9 @@ impl Install {
Build::default().run(sh)?;

let dir = if cfg!(target_os = "macos") {
// TODO this will likely require `sudo` - any way to work around that?
"/Applications/Wireshark.app/Contents/PlugIns/wireshark/4-2/epan/"
"~/.local/lib/wireshark/plugins/4-2/epan"
} else if cfg!(target_os = "linux") {
"~/.local/lib/wireshark/plugins/4.2/epan/"
"~/.local/lib/wireshark/plugins/4.2/epan"
} else {
todo!("OS is currently unsupported")
};
Expand All @@ -201,7 +201,8 @@ impl Install {
let so = so();
sh.copy_file(
format!("target/release/libwireshark_dcquic.{so}"),
format!("{dir}/dcquic.{so}"),
// wireshark always looks for `.so`, regardless of platform
format!("{dir}/libdcquic.so"),
)?;

Ok(())
Expand Down

0 comments on commit 1bb1f51

Please sign in to comment.