From 7e4d0375035b2353f22f44311f747eedafd98c4e Mon Sep 17 00:00:00 2001 From: Christian Blichmann Date: Thu, 17 Jul 2025 03:26:39 -0700 Subject: [PATCH] BinExport now ships with Binary Ninja, remove from our builds/installer Context: https://x.com/AdmVonSchneider/status/1945740370899292446 How to use/enable: https://dev-docs.binary.ninja/guide/binexport.html PiperOrigin-RevId: 784111202 Change-Id: Id12b37e4d7e1c74bf5c22d4d0ae093ad5e01c61d --- kokoro/deb/build.sh | 4 --- kokoro/dmg/build.sh | 6 +--- kokoro/macos/build.sh | 7 +--- kokoro/msi/build.bat | 32 ++++++++----------- kokoro/ubuntu/build.sh | 2 -- packaging/deb/bindiff/debian/bindiff.install | 1 - .../BinDiff/Plugins/Binary Ninja/Read Me.txt | 12 ++++--- packaging/msi/Setup.wxs | 5 ++- 8 files changed, 26 insertions(+), 43 deletions(-) diff --git a/kokoro/deb/build.sh b/kokoro/deb/build.sh index a3a42708..7c5cb2d8 100755 --- a/kokoro/deb/build.sh +++ b/kokoro/deb/build.sh @@ -53,7 +53,6 @@ mkdir -p \ "${app_dir}/extra/config" \ "${app_dir}/extra/ghidra" \ "${app_dir}/libexec" \ - "${app_dir}/plugins/binaryninja" \ "${app_dir}/plugins/idapro" cp \ "${KOKORO_GFILE_DIR}/bindiff.jar" \ @@ -68,9 +67,6 @@ cp \ "${app_dir}/extra/config/bindiff_config.proto" (cd "${app_dir}/extra/ghidra/" && \ unzip -q "${KOKORO_GFILE_DIR}/ghidra_BinExport.zip") -cp \ - "${KOKORO_GFILE_DIR}/binexport${binexport_release}_binaryninja.so" \ - "${app_dir}/plugins/binaryninja/" cp \ "${KOKORO_GFILE_DIR}/bindiff${bindiff_release}_ida.so" \ "${KOKORO_GFILE_DIR}/bindiff${bindiff_release}_ida64.so" \ diff --git a/kokoro/dmg/build.sh b/kokoro/dmg/build.sh index 381920cd..ffc68644 100755 --- a/kokoro/dmg/build.sh +++ b/kokoro/dmg/build.sh @@ -40,7 +40,7 @@ export JAVA_HOME=${build_dir}/zulu16.30.15-ca-jdk16.0.1-macosx_x64/zulu-16.jdk/C "${JAVA_HOME}/bin/jpackage" \ --type app-image \ --app-version "${bindiff_release}" \ - --copyright '(c)2004-2011 zynamics GmbH, (c)2011-2024 Google LLC' \ + --copyright '(c)2004-2011 zynamics GmbH, (c)2011-2025 Google LLC' \ --description 'Find similarities and differences in disassembled code' \ --name BinDiff \ --dest packaging/dmg/Package/Applications/BinDiff \ @@ -87,7 +87,6 @@ mkdir -p \ "${app_dir}/BinDiff.app/Contents/MacOS/bin" \ "${app_dir}/Extra/Config" \ "${app_dir}/Extra/Ghidra" \ - "${app_dir}/Plugins/Binary Ninja" \ "${app_dir}/Plugins/IDA Pro" install -m 0755 \ "${KOKORO_GFILE_DIR}/bindiff" \ @@ -99,9 +98,6 @@ cp \ "${app_dir}/Extra/Config/bindiff_config.proto" (cd "${app_dir}/Extra/Ghidra/" && \ unzip -q "${KOKORO_GFILE_DIR}/ghidra_BinExport.zip") -cp \ - "${KOKORO_GFILE_DIR}/binexport${binexport_release}_binaryninja.dylib" \ - "${app_dir}/Plugins/Binary Ninja" cp \ "${KOKORO_GFILE_DIR}/bindiff${bindiff_release}_ida.dylib" \ "${KOKORO_GFILE_DIR}/bindiff${bindiff_release}_ida64.dylib" \ diff --git a/kokoro/macos/build.sh b/kokoro/macos/build.sh index ff702c26..52c118d7 100755 --- a/kokoro/macos/build.sh +++ b/kokoro/macos/build.sh @@ -32,23 +32,18 @@ src_dir=${KOKORO_ARTIFACTS_DIR}/git out_dir=${build_dir} deps_dir=${build_dir} -# Symlink extra Binary Ninja API dependency -mkdir -p "${KOKORO_PIPER_DIR}/google3/third_party/binaryninja_api/third_party" -ln -s "${KOKORO_PIPER_DIR}/google3/third_party/jsoncpp" \ - "${KOKORO_PIPER_DIR}/google3/third_party/binaryninja_api/third_party/jsoncpp" - pushd "${build_dir}" cmake "${src_dir}/bindiff" \ -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ "-DFETCHCONTENT_SOURCE_DIR_ABSL=${KOKORO_ARTIFACTS_DIR}/git/absl" \ "-DFETCHCONTENT_SOURCE_DIR_GOOGLETEST=${KOKORO_ARTIFACTS_DIR}/git/googletest" \ "-DFETCHCONTENT_SOURCE_DIR_PROTOBUF=${KOKORO_ARTIFACTS_DIR}/git/protobuf" \ - "-DFETCHCONTENT_SOURCE_DIR_BINARYNINJAAPI=${KOKORO_PIPER_DIR}/google3/third_party/binaryninja_api" \ "-DFETCHCONTENT_SOURCE_DIR_SQLITE=${KOKORO_PIPER_DIR}/google3/third_party/sqlite/src" \ "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_RULE_MESSAGES=OFF \ "-DCMAKE_INSTALL_PREFIX=${out_dir}" \ + -DBINEXPORT_ENABLE_BINARY_NINJA=OFF \ "-DBOOST_ROOT=${KOKORO_PIPER_DIR}/google3/third_party/boost/do_not_include_from_google3_only_third_party/boost" \ "-DIdaSdk_ROOT_DIR=${KOKORO_PIPER_DIR}/google3/third_party/idasdk" cmake --build . --config Release -- "-j$(sysctl -n hw.logicalcpu)" diff --git a/kokoro/msi/build.bat b/kokoro/msi/build.bat index 3a54b440..f0f4ee63 100644 --- a/kokoro/msi/build.bat +++ b/kokoro/msi/build.bat @@ -19,7 +19,6 @@ for %%I in ("%BUILD_DIR%\wix" ^ "%APP_DIR%\bin" ^ "%APP_DIR%\Extra\Config" ^ "%APP_DIR%\Extra\Ghidra" ^ - "%APP_DIR%\Plugins\Binary Ninja" ^ "%APP_DIR%\Plugins\IDA Pro") do if not exist "%%I" mkdir "%%I" :: Set tool paths @@ -46,9 +45,6 @@ for %%I in (bindiff.exe ^ binexport2dump.exe) do copy /Y ^ "%KOKORO_GFILE_DIR%\%%I" ^ "%APP_DIR%\bin\" || exit /b -copy /Y ^ - "%KOKORO_GFILE_DIR%\binexport%BINEXPORT_RELEASE%_binaryninja.dll" ^ - "%APP_DIR%\Plugins\Binary Ninja\" || exit /b :: Omitting "\" in the "-d" argument below is intentional unzip -q ^ "%KOKORO_GFILE_DIR%\ghidra_BinExport.zip" ^ @@ -109,19 +105,19 @@ copy /Y ^ "%BUILD_DIR%\Setup.wixobj" || exit /b :: Release build, code sign the artifacts -if "%1" neq "release" call :codesign "%BUILD_DIR%\*.msi" - -exit /b - - -:: Code-signs the specified artifacts and verifies them -:: %* artifacts to sign -:codesign - -set ARTIFACTS=%* - -ksigntool sign GOOGLE_EXTERNAL /v /debug /t http://timestamp.digicert.com ^ - %ARTIFACTS% || exit /b -%SIGNTOOL% verify /pa /all %ARTIFACTS% || exit /b +@REM TODO(cblichmann): Re-enable code signing using a separate job. +@REM if "%1" neq "release" call :codesign "%BUILD_DIR%\*.msi" +@REM +@REM exit /b +@REM +@REM :: Code-signs the specified artifacts and verifies them +@REM :: %* artifacts to sign +@REM :codesign +@REM +@REM set ARTIFACTS=%* +@REM +@REM ksigntool sign GOOGLE_EXTERNAL /v /debug /t http://timestamp.digicert.com ^ +@REM %ARTIFACTS% || exit /b +@REM %SIGNTOOL% verify /pa /all %ARTIFACTS% || exit /b exit /b diff --git a/kokoro/ubuntu/build.sh b/kokoro/ubuntu/build.sh index 9307bfe0..74ec48ac 100755 --- a/kokoro/ubuntu/build.sh +++ b/kokoro/ubuntu/build.sh @@ -27,8 +27,6 @@ docker run \ -v "${KOKORO_ARTIFACTS_DIR}/git/absl":/build/out/_deps/absl-src \ -v "${KOKORO_ARTIFACTS_DIR}/git/googletest":/build/out/_deps/googletest-src \ -v "${KOKORO_ARTIFACTS_DIR}/git/protobuf":/build/out/_deps/protobuf-src \ - -v "${KOKORO_PIPER_DIR}/google3/third_party/binaryninja_api":/build/out/_deps/binaryninjaapi-src \ - -v "${KOKORO_PIPER_DIR}/google3/third_party/jsoncpp":/build/out/_deps/binaryninjaapi-src/third_party/jsoncpp \ -v "${KOKORO_PIPER_DIR}/google3/third_party/sqlite/src":/build/out/_deps/sqlite-src \ -v "${build_dir}/out":/build/out \ -v "${KOKORO_ARTIFACTS_DIR}":/build/src \ diff --git a/packaging/deb/bindiff/debian/bindiff.install b/packaging/deb/bindiff/debian/bindiff.install index 6acb8638..52eaad75 100644 --- a/packaging/deb/bindiff/debian/bindiff.install +++ b/packaging/deb/bindiff/debian/bindiff.install @@ -7,7 +7,6 @@ files/opt/bindiff/extra/config/bindiff_config.proto opt/bindiff/extra/config files/opt/bindiff/extra/ghidra/README opt/bindiff/extra/ghidra files/opt/bindiff/libexec/bindiff_config_setup opt/bindiff/libexec files/opt/bindiff/plugins/binaryninja/README opt/bindiff/plugins/binaryninja -files/opt/bindiff/plugins/binaryninja/binexport12_binaryninja.so opt/bindiff/plugins/binaryninja files/opt/bindiff/plugins/idapro/bindiff8_ida.so opt/bindiff/plugins/idapro files/opt/bindiff/plugins/idapro/bindiff8_ida64.so opt/bindiff/plugins/idapro files/opt/bindiff/plugins/idapro/binexport12_ida.so opt/bindiff/plugins/idapro diff --git a/packaging/dmg/Package/Applications/BinDiff/Plugins/Binary Ninja/Read Me.txt b/packaging/dmg/Package/Applications/BinDiff/Plugins/Binary Ninja/Read Me.txt index d8812250..b30c4fc1 100644 --- a/packaging/dmg/Package/Applications/BinDiff/Plugins/Binary Ninja/Read Me.txt +++ b/packaging/dmg/Package/Applications/BinDiff/Plugins/Binary Ninja/Read Me.txt @@ -1,10 +1,14 @@ Using BinDiff with Binary Ninja =============================== -This directory contains a beta version of BinExport for the Binary Ninja -disassembler. -Like the IDA Pro plugin, it is open source. +This directory used to contain a version of BinExport for the Binary Ninja +disassembler. It now ships as part of Binary Ninja itself. +Like the IDA Pro plugin and the Ghidra extension, it is open source. Source code and instructions for how to build and use it are available on GitHub: - https://github.com/google/binexport/tree/master/binaryninja + https://github.com/google/binexport/ (Original source) + https://github.com/Vector35/binexport (Binary Ninja fork) + +Official documentation for the Binary Ninja BinExport plugin: + https://dev-docs.binary.ninja/guide/binexport.html diff --git a/packaging/msi/Setup.wxs b/packaging/msi/Setup.wxs index 266142b2..ed57e1fb 100755 --- a/packaging/msi/Setup.wxs +++ b/packaging/msi/Setup.wxs @@ -1,6 +1,6 @@