Link cutter r2ghidra decompiler against ghidra_core.

This commit is contained in:
karlis 2020-06-15 23:38:15 +03:00 committed by karliss
parent 255ffe1208
commit 1d8c9de37c
3 changed files with 8 additions and 4 deletions

View File

@ -54,12 +54,14 @@ before_build:
# Build config
build_script:
- cmd: if defined QMAKE ( call prepare_r2.bat && call build.bat CUTTER_APPVEYOR_R2DEC=true CUTTER_R2GHIDRA_STATIC=true R2GHIDRA_SOURCE="%APPVEYOR_BUILD_FOLDER%/r2ghidra-dec" CUTTER_ENABLE_CRASH_REPORTS=true CUTTER_ENABLE_PYTHON=true CUTTER_ENABLE_PYTHON_BINDINGS=true CUTTER_DEPS_DIR="%CUTTER_DEPS_DIR%" )
- cmd: if defined QMAKE ( call prepare_r2.bat )
- cmd: if defined QMAKE ( C:\msys64\usr\bin\bash -lc "export PATH=\"/c/msys64/usr/bin:$PATH\" && cd \"$APPVEYOR_BUILD_FOLDER\" && scripts/appveyor_r2ghidra.sh" )
- cmd: if defined QMAKE ( call build.bat CUTTER_APPVEYOR_R2DEC=true CUTTER_R2GHIDRA_STATIC=true R2GHIDRA_SOURCE="%APPVEYOR_BUILD_FOLDER%/r2ghidra-dec" R2GHIDRA_INSTALL_PATH="%APPVEYOR_BUILD_FOLDER%/r2_dist_%ARCH%/radare2/lib/plugins" CUTTER_ENABLE_CRASH_REPORTS=true CUTTER_ENABLE_PYTHON=true CUTTER_ENABLE_PYTHON_BINDINGS=true CUTTER_DEPS_DIR="%CUTTER_DEPS_DIR%" )
- cmd: if defined MESON ( python meson.py --release --dist=%ARTIFACT_PATH% --backend=%BACKEND% --python )
after_build:
- cmd: if defined QMAKE ( set "PATH=%CD%\r2_dist_%ARCH%\bin;%PATH%" && powershell scripts\bundle_r2dec.ps1 "%CD%\%ARTIFACT_PATH%" )
- cmd: if defined QMAKE ( C:\msys64\usr\bin\bash -lc "export PATH=\"/c/msys64/usr/bin:$PATH\" && cd \"$APPVEYOR_BUILD_FOLDER\" && scripts/appveyor_r2ghidra.sh" )
#- cmd: if defined QMAKE ( C:\msys64\usr\bin\bash -lc "export PATH=\"/c/msys64/usr/bin:$PATH\" && cd \"$APPVEYOR_BUILD_FOLDER\" && scripts/appveyor_r2ghidra.sh" )
#- cmd: powershell scripts\bundle_openssl.ps1 %ARCH% "%CD%\%ARTIFACT_PATH%"
- cmd: powershell scripts\bundle_python.ps1 %ARCH% "%CD%\%ARTIFACT_PATH%"
- cmd: xcopy "%CUTTER_DEPS_DIR%\pyside\lib\site-packages" "%ARTIFACT_PATH%\python36\site-packages" /e /i /h

View File

@ -4,5 +4,5 @@ scripts/r2ghidra.sh \
-DCMAKE_C_COMPILER=cl \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$APPVEYOR_BUILD_FOLDER/r2_dist_$ARCH;$APPVEYOR_BUILD_FOLDER/r2_dist_$ARCH/radare2;$QT64PATH" \
-DCMAKE_INSTALL_PREFIX="$APPVEYOR_BUILD_FOLDER/$ARTIFACT_PATH/radare2" \
-DRADARE2_INSTALL_PLUGDIR="$APPVEYOR_BUILD_FOLDER/$ARTIFACT_PATH/radare2/lib/plugins"
-DCMAKE_INSTALL_PREFIX="$APPVEYOR_BUILD_FOLDER/r2_dist_$ARCH/radare2" \
-DRADARE2_INSTALL_PLUGDIR="$APPVEYOR_BUILD_FOLDER/r2_dist_$ARCH/radare2/lib/plugins"

View File

@ -283,6 +283,8 @@ CUTTER_R2GHIDRA_STATIC {
SOURCES += $$R2GHIDRA_SOURCE/cutter-plugin/R2GhidraDecompiler.cpp
HEADERS += $$R2GHIDRA_SOURCE/cutter-plugin/R2GhidraDecompiler.h
INCLUDEPATH += $$R2GHIDRA_SOURCE/cutter-plugin
LIBS += -L$$R2GHIDRA_INSTALL_PATH -lcore_ghidra -ldelayimp
QMAKE_LFLAGS += /delayload:core_ghidra.dll
}
QMAKE_SUBSTITUTES += CutterConfig.h.in