From cc608e6f3ba5aa34e389c8952a90f4b63549e545 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Sat, 23 Apr 2022 15:45:42 +1000 Subject: [PATCH 1/4] update to support IDA7.7 --- .github/workflows/ci-linux.yml | 16 ++++++++++++++++ .github/workflows/ci-macos.yml | 20 +++++++++++++++++++- .github/workflows/ci-windows.yml | 17 +++++++++++++++++ src/main.cpp | 4 +++- 4 files changed, 55 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 0c6f040b..42a9facf 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -77,6 +77,12 @@ jobs: cmake -S . -B build_x64_7.6 -DIDASDK_ROOT_DIR="../IDA_SDKs/idasdk76" -DSTATICLIB=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" cmake --build build_x64_7.6 --config Release --parallel 2 + - name: Build Ponce IDA 7.7 + run: | + unzip ../IDA_SDKs/idasdk77.zip -d ../IDA_SDKs + cmake -S . -B build_x64_7.7 -DIDASDK_ROOT_DIR="../IDA_SDKs/idasdk77" -DSTATICLIB=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" + cmake --build build_x64_7.7 --config Release --parallel 2 + - uses: actions/upload-artifact@master with: @@ -147,6 +153,16 @@ jobs: with: name: Ponce_ida76 path: build_x64_7.6/Ponce.so + + - uses: actions/upload-artifact@master + with: + name: Ponce_ida77 + path: build_x64_7.7/Ponce64.so + + - uses: actions/upload-artifact@master + with: + name: Ponce_ida77 + path: build_x64_7.7/Ponce.so release: runs-on: ubuntu-latest diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index a26b8537..67eea5d9 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -76,6 +76,13 @@ jobs: cmake -S . -B build_x64_7.6 -DUSE_CLANG=ON -DIDASDK_ROOT_DIR="../IDA_SDKs/idasdk76" -DSTATICLIB=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" cmake --build build_x64_7.6 --config Release --parallel 2 + - name: Build Ponce IDA 7.7 + run: | + unzip ../IDA_SDKs/idasdk77.zip -d ../IDA_SDKs + cmake -S . -B build_x64_7.7 -DUSE_CLANG=ON -DIDASDK_ROOT_DIR="../IDA_SDKs/idasdk77" -DSTATICLIB=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" + cmake --build build_x64_7.7 --config Release --parallel 2 + + - uses: actions/upload-artifact@master with: name: Ponce_ida70 @@ -144,8 +151,19 @@ jobs: - uses: actions/upload-artifact@master with: name: Ponce_ida76 - path: build_x64_7.6/Ponce.dylib + path: build_x64_7.6/Ponce.dylib + + - uses: actions/upload-artifact@master + with: + name: Ponce_ida77 + path: build_x64_7.7/Ponce64.dylib + - uses: actions/upload-artifact@master + with: + name: Ponce_ida77 + path: build_x64_7.7/Ponce.dylib + + release: runs-on: ubuntu-latest if: github.event_name == 'release' diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index cbdfee45..feab8bcf 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -76,6 +76,13 @@ jobs: cmake -S . -B build_x64_7.6 -DIDASDK_ROOT_DIR="..\IDA_SDKs\idasdk76" -DSTATICLIB=ON -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -A x64 -DVCPKG_TARGET_TRIPLET="x64-windows-static" -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" cmake --build build_x64_7.6 --config Release --parallel 2 + - name: Build Ponce IDA 7.7 + run: | + powershell Expand-Archive -Force ..\IDA_SDKs\idasdk77.zip ..\IDA_SDKs + cmake -S . -B build_x64_7.7 -DIDASDK_ROOT_DIR="..\IDA_SDKs\idasdk77" -DSTATICLIB=ON -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -A x64 -DVCPKG_TARGET_TRIPLET="x64-windows-static" -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" + cmake --build build_x64_7.7 --config Release --parallel 2 + + - uses: actions/upload-artifact@master with: name: Ponce_ida70 @@ -146,6 +153,16 @@ jobs: name: Ponce_ida76 path: build_x64_7.6/Release/Ponce.dll + - uses: actions/upload-artifact@master + with: + name: Ponce_ida77 + path: build_x64_7.7/Release/Ponce64.dll + + - uses: actions/upload-artifact@master + with: + name: Ponce_ida77 + path: build_x64_7.7/Release/Ponce.dll + release: runs-on: ubuntu-latest diff --git a/src/main.cpp b/src/main.cpp index aaa42d1f..8b2bb6c6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -131,7 +131,9 @@ int idaapi init(void) char version[8]; //We do some checks with the versions... if (get_kernel_version(version, sizeof(version))) { -#if IDA_SDK_VERSION == 760 +#if IDA_SDK_VERSION == 770 + if (strcmp(version, "7.7") != 0) { +#elif IDA_SDK_VERSION == 760 if (strcmp(version, "7.6") != 0) { #elif IDA_SDK_VERSION == 750 if (strcmp(version, "7.5") != 0) { From bd3631efdb5328fea998d5672b030aad00677674 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Sat, 23 Apr 2022 15:51:11 +1000 Subject: [PATCH 2/4] fix yaml --- .github/workflows/ci-linux.yml | 2 -- .github/workflows/ci-macos.yml | 1 - .github/workflows/ci-windows.yml | 1 - 3 files changed, 4 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 42a9facf..b094d2ec 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -8,8 +8,6 @@ on: jobs: build: - #cmake -S . -B build_x64 -DCMAKE_INSTALL_PREFIX=install_dir -DPYTHON_BINDINGS=OFF -DSTATICLIB=ON -DZ3_INCLUDE_DIRS="$VCPKG_INSTALLATION_ROOT/installed/x64-linux/include" -DCAPSTONE_INCLUDE_DIRS="$VCPKG_INSTALLATION_ROOT/installed/x64-linux/include" - #if: github.event_name == 'push' && contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 67eea5d9..4a5acc1c 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -8,7 +8,6 @@ on: jobs: build: - #if: github.event_name == 'push' && contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false runs-on: macos-latest steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index feab8bcf..3840f8fc 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -8,7 +8,6 @@ on: jobs: build: - #if: github.event_name == 'push' && contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false runs-on: windows-2019 steps: - uses: actions/checkout@v1 From 1ed26c6965e9d5dc0824a65f46cde66aae82d9c9 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Sat, 23 Apr 2022 23:48:32 +1000 Subject: [PATCH 3/4] trigger new CI build --- .github/workflows/ci-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 4a5acc1c..9ede51e8 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -3,7 +3,7 @@ on: push: pull_request: release: - types: # This configuration does not affect the page_build event above + types: # This configuration does not affect the page_build event above - created jobs: From 457edf70562146673cfe7f3938150682a75c21e9 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Illera Date: Sun, 24 Apr 2022 00:31:07 +1000 Subject: [PATCH 4/4] fix yaml --- .github/workflows/ci-linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index b094d2ec..881bf7c8 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -9,7 +9,7 @@ on: jobs: build: runs-on: ubuntu-latest - steps: + steps: - uses: actions/checkout@v1 with: submodules: true @@ -157,7 +157,7 @@ jobs: name: Ponce_ida77 path: build_x64_7.7/Ponce64.so - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@master with: name: Ponce_ida77 path: build_x64_7.7/Ponce.so