mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
Merge remote-tracking branch
'origin/GP-1209_ryanmkurtz_PR-3387_ryanmkurtz_native-release-builds--SQUASHED' (Closes #3387)
This commit is contained in:
commit
a1dba97a10
22 changed files with 541 additions and 349 deletions
41
Ghidra/RuntimeScripts/Linux/support/buildNatives
Executable file
41
Ghidra/RuntimeScripts/Linux/support/buildNatives
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#----------------------------------------
|
||||
# Build Native Binaries
|
||||
#
|
||||
# args: forwarded to gradle (-i, -s, etc)
|
||||
#----------------------------------------
|
||||
|
||||
# Make sure gradle is on the path
|
||||
if ! [ -x "$(command -v gradle)" ] ; then
|
||||
echo "Gradle not found on the PATH."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Resolve symbolic link if present and get the directory this script lives in.
|
||||
# NOTE: "readlink -f" is best but works on Linux only, "readlink" will only work if your PWD
|
||||
# contains the link you are calling (which is the best we can do on macOS), and the "echo" is the
|
||||
# fallback, which doesn't attempt to do anything with links.
|
||||
SCRIPT_FILE="$(readlink -f "$0" 2>/dev/null || readlink "$0" 2>/dev/null || echo "$0")"
|
||||
SCRIPT_DIR="${SCRIPT_FILE%/*}"
|
||||
|
||||
buildGhidraNatives () {
|
||||
echo "Building natives in Ghidra..."
|
||||
pushd ${SCRIPT_DIR}/../Ghidra &>/dev/null
|
||||
gradle "$@" buildNatives
|
||||
result=$?
|
||||
popd &>/dev/null
|
||||
return $result
|
||||
}
|
||||
|
||||
buildGplNatives () {
|
||||
echo "Building natives in GPL..."
|
||||
pushd ${SCRIPT_DIR}/../GPL &>/dev/null
|
||||
gradle "$@" buildNatives
|
||||
result=$?
|
||||
popd &>/dev/null
|
||||
return $result
|
||||
}
|
||||
|
||||
buildGhidraNatives "$@" && buildGplNatives "$@"
|
||||
|
39
Ghidra/RuntimeScripts/Windows/support/buildNatives.bat
Normal file
39
Ghidra/RuntimeScripts/Windows/support/buildNatives.bat
Normal file
|
@ -0,0 +1,39 @@
|
|||
:: Build Native Binaries
|
||||
::
|
||||
:: args: forwarded to gradle (-i, -s, etc)
|
||||
|
||||
@echo off
|
||||
|
||||
:: See if we were doubled clicked or run from a command prompt
|
||||
set DOUBLE_CLICKED=n
|
||||
for /f "tokens=2" %%# in ("%cmdcmdline%") do if /i "%%#" equ "/c" set DOUBLE_CLICKED=y
|
||||
|
||||
:: Make sure gradle is on the path
|
||||
call gradle -h >nul 2>nul
|
||||
if not %ERRORLEVEL% == 0 (
|
||||
echo Gradle not found on the PATH
|
||||
goto exit
|
||||
)
|
||||
|
||||
echo Building natives in Ghidra...
|
||||
pushd "%~dp0..\Ghidra"
|
||||
call gradle %* buildNatives
|
||||
popd
|
||||
if not %ERRORLEVEL% == 0 (
|
||||
goto exit
|
||||
)
|
||||
|
||||
echo Building natives in GPL...
|
||||
pushd "%~dp0..\GPL"
|
||||
call gradle %* buildNatives
|
||||
popd
|
||||
if not %ERRORLEVEL% == 0 (
|
||||
goto exit
|
||||
)
|
||||
|
||||
:exit
|
||||
if "%DOUBLE_CLICKED%"=="y" (
|
||||
pause
|
||||
)
|
||||
|
||||
exit /B %ERRORLEVEL%
|
|
@ -14,6 +14,7 @@ Linux/server/svrInstall||GHIDRA||||END|
|
|||
Linux/server/svrUninstall||GHIDRA||||END|
|
||||
Linux/support/analyzeHeadless||GHIDRA||||END|
|
||||
Linux/support/buildGhidraJar||GHIDRA||||END|
|
||||
Linux/support/buildNatives||GHIDRA||||END|
|
||||
Linux/support/convertStorage||GHIDRA||||END|
|
||||
Linux/support/ghidraDebug||GHIDRA||||END|
|
||||
Linux/support/pythonRun||GHIDRA||||END|
|
||||
|
@ -26,6 +27,7 @@ Windows/server/svrUninstall.bat||GHIDRA||||END|
|
|||
Windows/support/README_createPdbXmlFiles.txt||GHIDRA||||END|
|
||||
Windows/support/analyzeHeadless.bat||GHIDRA||||END|
|
||||
Windows/support/buildGhidraJar.bat||GHIDRA||||END|
|
||||
Windows/support/buildNatives.bat||GHIDRA||||END|
|
||||
Windows/support/convertStorage.bat||GHIDRA||||END|
|
||||
Windows/support/createPdbXmlFiles.bat||GHIDRA||||END|
|
||||
Windows/support/ghidra.ico||GHIDRA||||END|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue