From e34fc97a3179fc78376de52c603e7184d9d86479 Mon Sep 17 00:00:00 2001 From: reversedcodes Date: Wed, 19 Aug 2026 22:26:22 +0200 Subject: [PATCH 1/4] feat: align plugin metadata with HCLI plugin manager Declare macOS support as arm64 to match the macos-latest (Apple Silicon) runner, and narrow idaVersions to the tested 9.0-9.3 range. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/build.yml | 4 ++-- ida-plugin.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6fb97a..0df5420 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: artifact: windows-x64 binary: build/ida_plugins/ida_discord_rpc.dll - os: macos-latest - artifact: macos-x64 + artifact: macos-arm64 binary: build/ida_plugins/ida_discord_rpc.dylib runs-on: ${{ matrix.os }} steps: @@ -71,7 +71,7 @@ jobs: cp assets/ida-discord.png pkg/assets/ cp dist/ida_discord_rpc-linux-x64/ida_discord_rpc.so pkg/ cp dist/ida_discord_rpc-windows-x64/ida_discord_rpc.dll pkg/ - cp dist/ida_discord_rpc-macos-x64/ida_discord_rpc.dylib pkg/ + cp dist/ida_discord_rpc-macos-arm64/ida_discord_rpc.dylib pkg/ cd pkg && zip -r "../ida_discord_rpc-${GITHUB_REF_NAME}.zip" . && cd .. unzip -l ida_discord_rpc-*.zip diff --git a/ida-plugin.json b/ida-plugin.json index 0df94cb..9a05748 100644 --- a/ida-plugin.json +++ b/ida-plugin.json @@ -5,8 +5,8 @@ "name": "IDA-Discord-RPC", "entryPoint": "ida_discord_rpc", "version": "1.1.0", - "idaVersions": ["9.0", "9.1", "9.2", "9.3", "9.4"], - "platforms": ["windows-x86_64", "linux-x86_64", "macos-x86_64"], + "idaVersions": ["9.0", "9.1", "9.2", "9.3"], + "platforms": ["windows-x86_64", "linux-x86_64", "macos-aarch64"], "description": "IDA Discord RPC integrates Discord Rich Presence into IDA, displaying real-time information about your reverse engineering activity directly in your Discord profile: current function, view, file, debugging status and more - all configurable from a settings dialog.", "license": "Apache-2.0", "logoPath": "assets/ida-discord.png", From 1d5ec4c730d6a64c773e2fecce17b3ab1d6e8795 Mon Sep 17 00:00:00 2001 From: reversedcodes Date: Wed, 19 Aug 2026 22:30:55 +0200 Subject: [PATCH 2/4] feat: ship a universal macOS dylib for Intel and Apple Silicon The IDA SDK provides a separate import library per macOS architecture, so a single multi-architecture build cannot link. Build one tree per arch and merge them with lipo instead. FindIdaSDK now derives the macOS library directory from CMAKE_OSX_ARCHITECTURES when set, since CMAKE_SYSTEM_PROCESSOR stays at the host arch during a cross build and would select the wrong slice. A multi-architecture request fails with a message pointing at the lipo route. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/build.yml | 27 ++++++++++++++++++++++++--- cmake/FindIdaSDK.cmake | 15 ++++++++++++++- ida-plugin.json | 2 +- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0df5420..0968e68 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,12 +19,15 @@ jobs: - os: ubuntu-latest artifact: linux-x64 binary: build/ida_plugins/ida_discord_rpc.so + cmake_args: '' - os: windows-latest artifact: windows-x64 binary: build/ida_plugins/ida_discord_rpc.dll + cmake_args: '' - os: macos-latest - artifact: macos-arm64 + artifact: macos-universal binary: build/ida_plugins/ida_discord_rpc.dylib + cmake_args: '-DCMAKE_OSX_ARCHITECTURES=arm64' runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -41,10 +44,28 @@ jobs: - if: runner.os == 'Windows' uses: ilammy/msvc-dev-cmd@v1 - - run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release + - run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }} - run: cmake --build build + - if: runner.os == 'macOS' + run: | + cmake -S . -B build-x64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=x86_64 + cmake --build build-x64 + lipo -create \ + build/ida_plugins/ida_discord_rpc.dylib \ + build-x64/ida_plugins/ida_discord_rpc.dylib \ + -output ida_discord_rpc-universal.dylib + mv ida_discord_rpc-universal.dylib build/ida_plugins/ida_discord_rpc.dylib + archs=$(lipo -archs build/ida_plugins/ida_discord_rpc.dylib) + echo "universal dylib architectures: $archs" + for want in arm64 x86_64; do + case " $archs " in + *" $want "*) ;; + *) echo "::error::missing $want slice in universal dylib"; exit 1 ;; + esac + done + - uses: actions/upload-artifact@v4 with: name: ida_discord_rpc-${{ matrix.artifact }} @@ -71,7 +92,7 @@ jobs: cp assets/ida-discord.png pkg/assets/ cp dist/ida_discord_rpc-linux-x64/ida_discord_rpc.so pkg/ cp dist/ida_discord_rpc-windows-x64/ida_discord_rpc.dll pkg/ - cp dist/ida_discord_rpc-macos-arm64/ida_discord_rpc.dylib pkg/ + cp dist/ida_discord_rpc-macos-universal/ida_discord_rpc.dylib pkg/ cd pkg && zip -r "../ida_discord_rpc-${GITHUB_REF_NAME}.zip" . && cd .. unzip -l ida_discord_rpc-*.zip diff --git a/cmake/FindIdaSDK.cmake b/cmake/FindIdaSDK.cmake index f83eb20..9cca7ae 100644 --- a/cmake/FindIdaSDK.cmake +++ b/cmake/FindIdaSDK.cmake @@ -3,7 +3,18 @@ if(WIN32) set(_idasdk_libdir "x64_win_vc_64") set(_idasdk_platform_def "__NT__") elseif(APPLE) - if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64") + set(_idasdk_mac_arch "${CMAKE_SYSTEM_PROCESSOR}") + if(CMAKE_OSX_ARCHITECTURES) + list(LENGTH CMAKE_OSX_ARCHITECTURES _idasdk_mac_arch_count) + if(_idasdk_mac_arch_count GREATER 1) + message(FATAL_ERROR + "The IDA SDK ships a separate import library per macOS architecture, " + "so a multi-architecture build cannot link. Configure one build tree " + "per architecture and merge the resulting dylibs with lipo.") + endif() + set(_idasdk_mac_arch "${CMAKE_OSX_ARCHITECTURES}") + endif() + if(_idasdk_mac_arch MATCHES "arm64|aarch64") set(_idasdk_libdir "arm64_mac_clang_64") else() set(_idasdk_libdir "x64_mac_clang_64") @@ -75,6 +86,8 @@ endif() mark_as_advanced(IdaSDK_INCLUDE_DIR IdaSDK_LIBRARY) +unset(_idasdk_mac_arch) +unset(_idasdk_mac_arch_count) unset(_idasdk_libdir) unset(_idasdk_platform_def) unset(_idasdk_hints) diff --git a/ida-plugin.json b/ida-plugin.json index 9a05748..7743957 100644 --- a/ida-plugin.json +++ b/ida-plugin.json @@ -6,7 +6,7 @@ "entryPoint": "ida_discord_rpc", "version": "1.1.0", "idaVersions": ["9.0", "9.1", "9.2", "9.3"], - "platforms": ["windows-x86_64", "linux-x86_64", "macos-aarch64"], + "platforms": ["windows-x86_64", "linux-x86_64", "macos-x86_64", "macos-aarch64"], "description": "IDA Discord RPC integrates Discord Rich Presence into IDA, displaying real-time information about your reverse engineering activity directly in your Discord profile: current function, view, file, debugging status and more - all configurable from a settings dialog.", "license": "Apache-2.0", "logoPath": "assets/ida-discord.png", From feff6a8e2dcaf84d207965c7ea539698a2925f10 Mon Sep 17 00:00:00 2001 From: reversedcodes Date: Wed, 19 Aug 2026 22:32:32 +0200 Subject: [PATCH 3/4] docs: document HCLI plugin manager installation Co-Authored-By: Claude Opus 5 (1M context) --- readme.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/readme.md b/readme.md index 1d38e11..37ed343 100644 --- a/readme.md +++ b/readme.md @@ -22,6 +22,42 @@ IDA Discord RPC is a plugin for IDA that displays your current activity as Disco ## Installation +### Using HCLI (recommended) + +The plugin ships [IDA plugin metadata](ida-plugin.json), so the [Hex-Rays CLI](https://hcli.docs.hex-rays.com/) plugin manager can install it, place the right binary for your platform and keep it updated: + +```bash +hcli plugin install IDA-Discord-RPC@https://github.com/reversedcodes/IDA-RPC +``` + +Once the plugin is listed in the Hex-Rays plugin repository, the short form works as well: + +```bash +hcli plugin install IDA-Discord-RPC +``` + +Managing the installation: + +```bash +hcli plugin status +hcli plugin upgrade IDA-Discord-RPC +hcli plugin uninstall IDA-Discord-RPC +``` + +If HCLI is not installed yet, on macOS and Linux: + +```bash +curl -LsSf https://hcli.docs.hex-rays.com/install | sh +``` + +On Windows, in PowerShell: + +```powershell +iwr -useb https://hcli.docs.hex-rays.com/install.ps1 | iex +``` + +### Manual + Download the ZIP from the [latest release](https://github.com/reversedcodes/IDA-RPC/releases) and copy the binary for your OS into your IDA plugins directory: | OS | Plugins directory | From 5176e9c50162fc3e3cd52b7454f3b468bba6d2e7 Mon Sep 17 00:00:00 2001 From: reversedcodes Date: Wed, 19 Aug 2026 22:34:21 +0200 Subject: [PATCH 4/4] fix: declare IDA 9.4 support again Co-Authored-By: Claude Opus 5 (1M context) --- ida-plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ida-plugin.json b/ida-plugin.json index 7743957..92b7aff 100644 --- a/ida-plugin.json +++ b/ida-plugin.json @@ -5,7 +5,7 @@ "name": "IDA-Discord-RPC", "entryPoint": "ida_discord_rpc", "version": "1.1.0", - "idaVersions": ["9.0", "9.1", "9.2", "9.3"], + "idaVersions": ["9.0", "9.1", "9.2", "9.3", "9.4"], "platforms": ["windows-x86_64", "linux-x86_64", "macos-x86_64", "macos-aarch64"], "description": "IDA Discord RPC integrates Discord Rich Presence into IDA, displaying real-time information about your reverse engineering activity directly in your Discord profile: current function, view, file, debugging status and more - all configurable from a settings dialog.", "license": "Apache-2.0",