Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/r2plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,35 @@ jobs:
- name: Test if r2plugin is available
run: |
r2 -q -c La~hbc -c Lb~hbc -c Lc~hbc -- | grep -E "(core|arch|bin).*hbc"

meson-r2git:
name: Test unified r2plugin with Meson
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install build dependencies
run: sudo apt-get update -y && sudo apt-get install -y build-essential meson ninja-build pkg-config

- name: Build radare2 from git with Meson
run: |
git clone --depth=1 https://github.com/radareorg/radare2.git
cd radare2

# Clone r2hermes into the plugins directory and configure XPS
cp -f ../r2plugin/config.mk libr/xps/config.mk
git clone .. libr/xps/p/r2hermes
make -C libr/xps/p/r2hermes include/hbc/version.h
make -C libr/xps/p/r2hermes
make -C libr/xps

# Build radare2 with meson
meson setup b --prefix=/usr
meson compile -C b
sudo meson install -C b

- name: Test if r2plugin is available
run: |
r2 -q -c La~hbc -c Lb~hbc -c Lc~hbc -- | grep -E "(core|arch|bin).*hbc"
8 changes: 5 additions & 3 deletions r2plugin/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ configure_file(
install: true,
)

# Include directories
# Register plugins in the static plugin lists
core_plugins += ['r2hermes']

# Include directories (relative to this meson.build file location)
include_dirs = include_directories(join_paths('..', 'include'))
r_core_additional_inc += include_dirs
r_core_additional_inc += ['../xps/p/r2hermes/include']

# Library source files
lib_utils_src = files(
Expand Down Expand Up @@ -56,7 +58,7 @@ lib_opcodes_src = files(
lib_core_src = files(
'../src/lib/hbc.c',
'../src/lib/r2.c',
'../src/r2/core_hbc.c',
'../src/r2/core_hbc_one.c',
)

lib_src = lib_utils_src + lib_parsers_src + lib_disasm_src + lib_decompile_src + lib_opcodes_src + lib_core_src
Expand Down
3 changes: 3 additions & 0 deletions r2plugin/r2plugins.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifdef R2_CORE_H
#include "core/deps.h"
#endif
#ifdef R2_ARCH_H
#include "arch/deps.h"
#endif
Expand Down
Loading