4 Commits
Author SHA1 Message Date
pancake 3e12922ba0 Release 0.3.6 2026-09-08 13:30:40 +02:00
pancake 42b606ae7f Build the debian package in the ci 2026-09-08 13:30:06 +02:00
pancake 507994deda Add dist/debian 2026-09-08 13:26:00 +02:00
pancakeandClaude Opus 5 ce97e96eda Ship the r2 plugin in the windows zip and strip the binaries before packaging
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EUoqrdf1quwjg3MsThyq1B
2026-09-08 11:50:25 +02:00
11 changed files with 170 additions and 11 deletions

No files matched your search

+48
View File
@@ -30,12 +30,46 @@ jobs:
run: r2r test/db/extras
- name: Package Linux build
run: make -C dist/linux
- name: Verify Linux package
run: |
tar tzvf dist/linux/r2flutter-linux-x86_64.tar.gz
tar tzf dist/linux/r2flutter-linux-x86_64.tar.gz | grep -q 'bin/r2flutter$'
tar tzf dist/linux/r2flutter-linux-x86_64.tar.gz | grep -q 'plugins/core_flutter.so$'
- name: Upload Linux package
uses: actions/upload-artifact@v7
with:
name: r2flutter-linux-x86_64
path: dist/linux/r2flutter-linux-x86_64.tar.gz
if-no-files-found: error
- name: Package Debian build
run: make -C dist/debian
- name: Verify Debian package
shell: bash
run: |
shopt -s nullglob
packages=(dist/debian/r2flutter_*_amd64.deb)
test "${#packages[@]}" -eq 1
package="${packages[0]}"
version="$(./configure -qV)"
test "$(dpkg-deb --field "${package}" Package)" = r2flutter
test "$(dpkg-deb --field "${package}" Version)" = "${version}"
test "$(dpkg-deb --field "${package}" Architecture)" = amd64
test "$(dpkg-deb --field "${package}" Depends)" = radare2
contents="$(dpkg-deb --contents "${package}")"
printf '%s\n' "${contents}"
grep -E '^-.+ root/root .+ \./usr/local/bin/r2flutter$' <<< "${contents}"
plugin=".$(r2 -H R2_LIBR_PLUGINS)/core_flutter.so"
grep -Fq "${plugin}" <<< "${contents}"
make user-uninstall
sudo dpkg --force-depends --install "${package}"
test "$(r2flutter -V)" = "r2flutter ${version}"
test "$(r2 -q -c 'r2flutter -V' --)" = "r2flutter ${version}"
- name: Upload Debian package
uses: actions/upload-artifact@v7
with:
name: r2flutter-debian-amd64
path: dist/debian/r2flutter_*_amd64.deb
if-no-files-found: error
meson-linux24:
name: Meson build on Linux
@@ -75,6 +109,11 @@ jobs:
run: r2r test/db/extras
- name: Package macOS build
run: make -C dist/macos
- name: Verify macOS package
run: |
tar tzvf dist/macos/r2flutter-macos.tar.gz
tar tzf dist/macos/r2flutter-macos.tar.gz | grep -q 'bin/r2flutter$'
tar tzf dist/macos/r2flutter-macos.tar.gz | grep -q 'plugins/core_flutter.dylib$'
- name: Upload macOS package
uses: actions/upload-artifact@v7
with:
@@ -104,6 +143,14 @@ jobs:
- name: Build and package r2flutter
shell: pwsh
run: ./dist/windows/build.ps1
- name: Verify Windows package
shell: pwsh
run: |
Expand-Archive -Path dist/windows/r2flutter-windows-x86_64.zip -DestinationPath check-zip -Force
Get-ChildItem -Recurse check-zip | Select-Object -ExpandProperty FullName
$root = 'check-zip/r2flutter-windows-x86_64'
if (-not (Test-Path "$root/bin/r2flutter.exe")) { throw 'missing r2flutter.exe' }
if (-not (Test-Path "$root/plugins/core_flutter.dll")) { throw 'missing core_flutter.dll' }
- name: Upload Windows package
uses: actions/upload-artifact@v7
with:
@@ -199,5 +246,6 @@ jobs:
generate_release_notes: false
files: |
release-artifacts/r2flutter-linux-x86_64/r2flutter-linux-x86_64.tar.gz
release-artifacts/r2flutter-debian-amd64/r2flutter_*_amd64.deb
release-artifacts/r2flutter-macos/r2flutter-macos.tar.gz
release-artifacts/r2flutter-windows-x86_64/r2flutter-windows-x86_64.zip
Vendored
+5 -5
View File
@@ -127,12 +127,12 @@ done
: ${INSTALL_PROGRAM_STRIP:=${INSTALL} -m 755 -s}
: ${INSTALL_MAN:=${INSTALL} -m 444}
: ${INSTALL_LIB:=${INSTALL} -m 755 -c}
PKGNAME='r2flutter' ; VERSION='0.3.4' ; VERSION_MAJOR=0; VERSION_MINOR=3; VERSION_PATCH=4; VERSION_NUMBER=00304; CONTACT_MAIL="[email protected]" ; CONTACT_NAME="pancake" ; CONTACT="pancake <[email protected]>" ;
PKGNAME='r2flutter' ; VERSION='0.3.6' ; VERSION_MAJOR=0; VERSION_MINOR=3; VERSION_PATCH=6; VERSION_NUMBER=00306; CONTACT_MAIL="[email protected]" ; CONTACT_NAME="pancake" ; CONTACT="pancake <[email protected]>" ;
}
show_usage() {
cat <<EOF2
'configure' configures r2flutter-0.3.4 to adapt to many kinds of systems.
'configure' configures r2flutter-0.3.6 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
@@ -214,10 +214,10 @@ ocho() {
show_version() {
if [ "$QUIET" = 1 ]; then
echo "0.3.4"
echo "0.3.6"
exit 0
fi
echo "r2flutter-0.3.4 configuration script done with acr v2.2.8.
echo "r2flutter-0.3.6 configuration script done with acr v2.2.8.
The 'Free Software Foundation' message is only for autodetection.
Originally written by pancake <nopcode.org>."
exit 0
@@ -246,7 +246,7 @@ case $flag in
show_version ; ;;
-r|--r|--report)
echo "PKGNAME: r2flutter"
echo "VERSION: 0.3.4"
echo "VERSION: 0.3.6"
echo "AUTHOR: pancake"
echo "EMAIL: [email protected]"
echo "LANGS: c"
+1 -1
View File
@@ -1,5 +1,5 @@
PKGNAME r2flutter
VERSION 0.3.4
VERSION 0.3.6
CONTACT pancake ; [email protected]
LANG_C!
+36
View File
@@ -0,0 +1,36 @@
# r2flutter binary release
This package contains:
* `bin/r2flutter` — the standalone command line tool
* `plugins/core_flutter.{so,dylib,dll}` — the radare2 core plugin
## Installing
Copy the tool anywhere in your `$PATH` and drop the plugin into the radare2
plugin directory reported by r2:
```sh
r2 -H R2_USER_PLUGINS # per user, no root needed
r2 -H R2_LIBR_PLUGINS # system wide
```
For example:
```sh
mkdir -p "$(r2 -H R2_USER_PLUGINS)"
cp plugins/core_flutter.* "$(r2 -H R2_USER_PLUGINS)"
cp bin/r2flutter /usr/local/bin
```
On Windows the plugin directory is usually `%HOMEPATH%\.local\share\radare2\plugins`.
## Checking the installation
```sh
r2 -qc 'Lc~r2flutter' --
r2flutter -V
```
The plugin must match the radare2 version it was built against, otherwise r2
refuses to load it.
+13
View File
@@ -0,0 +1,13 @@
PACKAGE=r2flutter
VERSION?=$(shell ../../configure -qV)
DEPENDS=radare2
SECTION=user/shell
PRIORITY=optional
MAINTAINER=pancake <[email protected]>
# arch
UNAMEM=$(shell uname -m)
ifeq ($(UNAMEM),x86_64)
ARCH?=amd64
else
ARCH?=arm64
endif
+30
View File
@@ -0,0 +1,30 @@
include ./CONFIG
PWD=$(shell pwd)
all: deb
deb:
$(MAKE) root
$(MAKE) build
root:
rm -rf root
$(MAKE) -C ../.. install DESTDIR=$(PWD)/root
build:
mkdir -p root/DEBIAN
echo "Package: $(PACKAGE)" > root/DEBIAN/control
echo "Version: $(VERSION)" >> root/DEBIAN/control
echo "Section: $(SECTION)" >> root/DEBIAN/control
echo "Priority: $(PRIORITY)" >> root/DEBIAN/control
echo "Architecture: $(ARCH)" >> root/DEBIAN/control
echo "Depends: $(DEPENDS)" >> root/DEBIAN/control
echo "Maintainer: $(MAINTAINER)" >> root/DEBIAN/control
echo "Description: r2flutter plugin for radare2" >> root/DEBIAN/control
dpkg-deb --root-owner-group --build root $(PACKAGE)_$(VERSION)_$(ARCH).deb
clean:
rm -rf root *.deb
.PHONY: all deb root build clean
+4
View File
@@ -1,11 +1,15 @@
ROOT := $(CURDIR)/r2flutter-linux-x86_64
ARCHIVE := $(CURDIR)/r2flutter-linux-x86_64.tar.gz
STRIP ?= strip
all:
rm -rf $(ROOT) $(ARCHIVE)
mkdir -p $(ROOT)/bin $(ROOT)/plugins
cp ../../bin/r2flutter $(ROOT)/bin/
cp ../../src/r2/core_flutter.so $(ROOT)/plugins/
cp ../README.md $(ROOT)/
$(STRIP) --strip-all $(ROOT)/bin/r2flutter
$(STRIP) --strip-unneeded $(ROOT)/plugins/core_flutter.so
tar -C $(CURDIR) -czf $(ARCHIVE) r2flutter-linux-x86_64
clean:
+6
View File
@@ -1,11 +1,17 @@
ROOT := $(CURDIR)/r2flutter-macos
ARCHIVE := $(CURDIR)/r2flutter-macos.tar.gz
STRIP ?= strip
all:
rm -rf $(ROOT) $(ARCHIVE)
mkdir -p $(ROOT)/bin $(ROOT)/plugins
cp ../../bin/r2flutter $(ROOT)/bin/
cp ../../src/r2/core_flutter.dylib $(ROOT)/plugins/
cp ../README.md $(ROOT)/
$(STRIP) -x $(ROOT)/bin/r2flutter
$(STRIP) -x $(ROOT)/plugins/core_flutter.dylib
codesign -f -s - $(ROOT)/bin/r2flutter
codesign -f -s - $(ROOT)/plugins/core_flutter.dylib
tar -C $(CURDIR) -czf $(ARCHIVE) r2flutter-macos
clean:
+5 -2
View File
@@ -7,6 +7,9 @@ $root = 'dist/windows/r2flutter-windows-x86_64'
$archive = 'dist/windows/r2flutter-windows-x86_64.zip'
Remove-Item -Recurse -Force $root -ErrorAction SilentlyContinue
Remove-Item -Force $archive -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Force $root | Out-Null
Copy-Item build-windows/r2flutter.exe $root/
New-Item -ItemType Directory -Force $root/bin | Out-Null
New-Item -ItemType Directory -Force $root/plugins | Out-Null
Copy-Item build-windows/r2flutter.exe $root/bin/
Copy-Item build-windows/core_flutter.dll $root/plugins/
Copy-Item dist/README.md $root/
Compress-Archive -Path $root -DestinationPath $archive -Force
+2 -2
View File
@@ -1,9 +1,9 @@
#ifndef R2FLUTTER_VERSION_H
#define R2FLUTTER_VERSION_H
#define R2FLUTTER_VERSION "0.3.4"
#define R2FLUTTER_VERSION "0.3.6"
#define R2FLUTTER_VERSION_MAJOR 0
#define R2FLUTTER_VERSION_MINOR 3
#define R2FLUTTER_VERSION_PATCH 4
#define R2FLUTTER_VERSION_PATCH 6
#endif
+20 -1
View File
@@ -1,7 +1,7 @@
project(
'r2flutter',
'c',
version : '0.3.4',
version : '0.3.6',
meson_version : '>=0.56.0',
default_options : ['warning_level=2', 'werror=false']
)
@@ -12,10 +12,16 @@ r2 = find_program('r2', required: true)
r2_cflags_res = run_command(r2, '-H', 'R2_CFLAGS', check: true)
r2_ldflags_res = run_command(r2, '-H', 'R2_LDFLAGS', check: true)
r2_libs_res = run_command(r2, '-H', 'R2_LIBS', check: true)
r2_plugdir_res = run_command(r2, '-H', 'R2_LIBR_PLUGINS', check: false)
r2_compile_args = r2_cflags_res.stdout().strip().split()
r2_link_args = r2_ldflags_res.stdout().strip().split() + r2_libs_res.stdout().strip().split()
r2_plugdir = r2_plugdir_res.stdout().strip()
if r2_plugdir == ''
r2_plugdir = join_paths(get_option('prefix'), get_option('libdir'), 'radare2', 'last')
endif
# r2 -H always reports gcc style flags, msvc needs its own spelling for them
if cc.get_argument_syntax() == 'msvc'
msvc_link_args = []
@@ -84,4 +90,17 @@ r2flutter_cli = executable(
install: true,
)
# The radare2 core plugin, loaded by r2 as core_flutter.{so,dylib,dll}
core_flutter = shared_module(
'core_flutter',
'src/r2/core_flutter.c',
'src/r2/flutter_analysis.c',
name_prefix: '',
include_directories: r2flutter_inc,
link_with: r2flutter_static,
dependencies: r_core_dep,
install: true,
install_dir: r2_plugdir,
)
test('r2flutter-version', r2flutter_cli, args: ['-V'])