Merged
Conversation
Contributor
|
Has this been tested to work? Sorry, just saw https://github.com/Ylarod/qscripts/actions/runs/18088827909/job/51464644178 I think idacpp was added recently #!/usr/bin/env bash
set -euxo pipefail
# ==================================================================
# Local build script for IDA plugin (qscripts.so)
# Compatible with Linux (Ubuntu, Debian, Arch, etc.)
# ==================================================================
# Environment variables
WORKDIR="$(pwd)"
idasdk_DIR="${WORKDIR}/ida-sdk/src"
export IDASDK="${WORKDIR}/ida-sdk/src"
BUILD_DIR="${WORKDIR}/build"
OUTPUT_DIR="${WORKDIR}/output"
PLUGIN_NAME="qscripts"
# ==================================================================
# Preparation: Clone Hex-Rays SDK, CMake helpers, idax and idacpp
# ==================================================================
echo "[INFO] Preparing IDA SDK and helpers..."
# mkdir -p "${idasdk_DIR}" "${OUTPUT_DIR}"
if [ ! -d "${WORKDIR}/ida-sdk/.git" ]; then
git clone --depth 1 https://github.com/HexRaysSA/ida-sdk ida-sdk
fi
if [ ! -d "${idasdk_DIR}/ida-cmake/.git" ]; then
git clone --depth 1 https://github.com/allthingsida/ida-cmake "${idasdk_DIR}/ida-cmake"
fi
if [ ! -d "${idasdk_DIR}/include/idax/.git" ]; then
mkdir -p "${idasdk_DIR}/include"
git clone --depth 1 https://github.com/allthingsida/idax "${idasdk_DIR}/include/idax"
fi
if [ ! -d "${idasdk_DIR}/include/idacpp/.git" ]; then
mkdir -p "${idasdk_DIR}/include"
git clone --depth 1 https://github.com/allthingsida/idacpp "${idasdk_DIR}/include/idacpp"
fi
# ==================================================================
# Configure build with CMake
# ==================================================================
echo "[INFO] Configuring project with CMake..."
cmake -S . -B "${BUILD_DIR}" -DCMAKE_BUILD_TYPE=Release
# ==================================================================
# Build plugin
# ==================================================================
echo "[INFO] Building plugin..."
cmake --build "${BUILD_DIR}" -- -j"$(nproc)"
# ==================================================================
# Copy output to artifact directory
# ==================================================================
PLUGIN_PATH="${idasdk_DIR}/bin/plugins/${PLUGIN_NAME}.so"
if [ -f "${PLUGIN_PATH}" ]; then
mkdir -p "${OUTPUT_DIR}"
cp "${PLUGIN_PATH}" "${OUTPUT_DIR}/${PLUGIN_NAME}-linux.so"
echo "[SUCCESS] Plugin built successfully: ${OUTPUT_DIR}/${PLUGIN_NAME}-linux.so"
else
echo "[ERROR] Could not find built plugin. Check build logs." >&2
exit 1
fi |
Member
|
thank you @Ylarod . |
Contributor
|
https://github.com/allthingsida/qscripts/actions/runs/19249397673/job/55030929254 failed because you need to consider the points I mentioned earlier. I can raise another PR |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.