mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-07-30 07:18:37 -09:00
GP-6839: Always do "multi-platform" build
This commit is contained in:
@@ -157,11 +157,11 @@ public class GhidraGo implements GhidraLaunchable {
|
|||||||
if (SystemUtilities.isInDevelopmentMode()) {
|
if (SystemUtilities.isInDevelopmentMode()) {
|
||||||
if (Platform.CURRENT_PLATFORM.getOperatingSystem() == OperatingSystem.WINDOWS) {
|
if (Platform.CURRENT_PLATFORM.getOperatingSystem() == OperatingSystem.WINDOWS) {
|
||||||
ghidraRunPath = Path.of(file.getAbsolutePath(),
|
ghidraRunPath = Path.of(file.getAbsolutePath(),
|
||||||
"/RuntimeScripts/Windows/ghidraRun.bat");
|
"/RuntimeScripts/ghidraRun.bat");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ghidraRunPath = Path.of(file.getAbsolutePath(),
|
ghidraRunPath = Path.of(file.getAbsolutePath(),
|
||||||
"/RuntimeScripts/Linux/ghidraRun");
|
"/RuntimeScripts/ghidraRun");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -500,7 +500,7 @@ public class GhidraServer extends UnicastRemoteObject implements GhidraServerHan
|
|||||||
}
|
}
|
||||||
|
|
||||||
ResourceFile serverRoot = new ResourceFile(Application.getInstallationDirectory(),
|
ResourceFile serverRoot = new ResourceFile(Application.getInstallationDirectory(),
|
||||||
SystemUtilities.isInDevelopmentMode() ? "ghidra/Ghidra/RuntimeScripts/Common/server"
|
SystemUtilities.isInDevelopmentMode() ? "ghidra/Ghidra/RuntimeScripts/server"
|
||||||
: "server");
|
: "server");
|
||||||
if (serverRoot.getFile(false) == null) {
|
if (serverRoot.getFile(false) == null) {
|
||||||
System.err.println(
|
System.err.println(
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ class PyGhidraLauncher:
|
|||||||
def _setup_dev_classpath(self, utility_dir: Path):
|
def _setup_dev_classpath(self, utility_dir: Path):
|
||||||
"""
|
"""
|
||||||
Sets up the classpath for dev mode as seen in
|
Sets up the classpath for dev mode as seen in
|
||||||
Ghidra/RuntimeScripts/Linux/support/launch.sh
|
Ghidra/RuntimeScripts/support/launch.sh
|
||||||
"""
|
"""
|
||||||
bin_dir = Path("bin") / "main"
|
bin_dir = Path("bin") / "main"
|
||||||
build_dir = Path("build") / "libs"
|
build_dir = Path("build") / "libs"
|
||||||
@@ -274,7 +274,7 @@ class PyGhidraLauncher:
|
|||||||
root = self._install_dir
|
root = self._install_dir
|
||||||
|
|
||||||
if self._dev_mode:
|
if self._dev_mode:
|
||||||
root = root / "Ghidra" / "RuntimeScripts" / "Common"
|
root = root / "Ghidra" / "RuntimeScripts"
|
||||||
|
|
||||||
launch_properties = root / "support" / "launch.properties"
|
launch_properties = root / "support" / "launch.properties"
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ def get_application_properties(install_dir: Path) -> Dict[str, str]:
|
|||||||
|
|
||||||
def get_launch_properties(install_dir: Path, dev: bool) -> List[str]:
|
def get_launch_properties(install_dir: Path, dev: bool) -> List[str]:
|
||||||
if dev:
|
if dev:
|
||||||
launch_properties_path: Path = install_dir / 'Ghidra' / 'RuntimeScripts' / 'Common' / 'support' / 'launch.properties'
|
launch_properties_path: Path = install_dir / 'Ghidra' / 'RuntimeScripts' / 'support' / 'launch.properties'
|
||||||
else:
|
else:
|
||||||
launch_properties_path: Path = install_dir / 'support' / 'launch.properties'
|
launch_properties_path: Path = install_dir / 'support' / 'launch.properties'
|
||||||
props: List[str] = []
|
props: List[str] = []
|
||||||
|
|||||||
@@ -19,58 +19,33 @@ eclipse.project.name = '_Runtime Scripts'
|
|||||||
|
|
||||||
rootProject.assembleDistribution {
|
rootProject.assembleDistribution {
|
||||||
|
|
||||||
from (this.project.file("Common/support")) {
|
from (this.project.file("support")) {
|
||||||
into "support"
|
into "support"
|
||||||
}
|
}
|
||||||
|
|
||||||
from (this.project.file("Common/server")) {
|
from (this.project.file("server")) {
|
||||||
into "server"
|
into "server"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
from (this.project.file("ghidraRun"))
|
||||||
|
from (this.project.file("ghidraRun.bat"))
|
||||||
|
|
||||||
|
from (rootProject.projectDir) {
|
||||||
|
include "gradlew"
|
||||||
|
include "gradlew.bat"
|
||||||
|
into "support/gradle"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.assembleMarkdownToHtml {
|
rootProject.assembleMarkdownToHtml {
|
||||||
from (this.project.file("Common/support")) {
|
from (this.project.file("support")) {
|
||||||
include "*.md"
|
include "*.md"
|
||||||
into "support"
|
into "support"
|
||||||
}
|
}
|
||||||
|
|
||||||
from (this.project.file("Common/server")) {
|
from (this.project.file("server")) {
|
||||||
include "*.md"
|
include "*.md"
|
||||||
into "server"
|
into "server"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.PLATFORMS.each { platform ->
|
|
||||||
rootProject.tasks.matching {it.name == "assembleDistribution_${platform.name}"}.each { t ->
|
|
||||||
def p = this.project
|
|
||||||
|
|
||||||
if (isLinux(platform.name) || isMac(platform.name)) {
|
|
||||||
t.from ("${p.projectDir}/Linux/support") {
|
|
||||||
into "support"
|
|
||||||
}
|
|
||||||
t.from ("${p.projectDir}/Linux/server") {
|
|
||||||
into "server"
|
|
||||||
}
|
|
||||||
t.from ("${rootProject.projectDir}") {
|
|
||||||
include "gradlew"
|
|
||||||
into "support/gradle"
|
|
||||||
}
|
|
||||||
t.from (p.file("Linux/ghidraRun"))
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isWindows(platform.name)) {
|
|
||||||
t.from ("${p.projectDir}/Windows/support") {
|
|
||||||
into "support"
|
|
||||||
}
|
|
||||||
t.from ("${p.projectDir}/Windows/server") {
|
|
||||||
into "server"
|
|
||||||
}
|
|
||||||
t.from ("${rootProject.projectDir}") {
|
|
||||||
include "gradlew.bat"
|
|
||||||
into "support/gradle"
|
|
||||||
}
|
|
||||||
t.from (p.file("Windows/ghidraRun.bat"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,31 @@
|
|||||||
##MODULE IP: Apache License 2.0
|
##MODULE IP: Apache License 2.0
|
||||||
##MODULE IP: Copyright Distribution Permitted
|
##MODULE IP: Copyright Distribution Permitted
|
||||||
##MODULE IP: Public Domain
|
##MODULE IP: Public Domain
|
||||||
Common/server/jaas.conf||GHIDRA||||END|
|
ghidraRun||GHIDRA||||END|
|
||||||
Common/server/server.conf||GHIDRA||||END|
|
server/ghidraSvr||GHIDRA||||END|
|
||||||
Common/server/svrREADME.md||GHIDRA||||END|
|
server/jaas.conf||GHIDRA||||END|
|
||||||
Common/support/GhidraGo/ghidraGoREADME.html||GHIDRA||||END|
|
server/server.conf||GHIDRA||||END|
|
||||||
Common/support/analyzeHeadlessREADME.md||GHIDRA||||END|
|
server/svrAdmin||GHIDRA||||END|
|
||||||
Common/support/buildGhidraJarREADME.txt||GHIDRA||||END|
|
server/svrInstall||GHIDRA||||END|
|
||||||
Common/support/debug.log4j.xml||GHIDRA||||END|
|
server/svrREADME.md||GHIDRA||||END|
|
||||||
Common/support/gradle/gradle-wrapper.jar||Apache License 2.0||||END|
|
server/svrUninstall||GHIDRA||||END|
|
||||||
Common/support/gradle/gradle-wrapper.properties||Apache License 2.0||||END|
|
support/GhidraGo/ghidraGo||GHIDRA||||END|
|
||||||
Common/support/launch.properties||GHIDRA||||END|
|
support/GhidraGo/ghidraGoREADME.html||GHIDRA||||END|
|
||||||
Linux/ghidraRun||GHIDRA||||END|
|
support/README_createPdbXmlFiles.txt||GHIDRA||||END|
|
||||||
Linux/server/ghidraSvr||GHIDRA||||END|
|
support/analyzeHeadless||GHIDRA||||END|
|
||||||
Linux/server/svrAdmin||GHIDRA||||END|
|
support/analyzeHeadlessREADME.md||GHIDRA||||END|
|
||||||
Linux/server/svrInstall||GHIDRA||||END|
|
support/bsim||GHIDRA||||END|
|
||||||
Linux/server/svrUninstall||GHIDRA||||END|
|
support/bsim_ctl||GHIDRA||||END|
|
||||||
Linux/support/GhidraGo/ghidraGo||GHIDRA||||END|
|
support/buildGhidraJar||GHIDRA||||END|
|
||||||
Linux/support/analyzeHeadless||GHIDRA||||END|
|
support/buildGhidraJarREADME.txt||GHIDRA||||END|
|
||||||
Linux/support/bsim||GHIDRA||||END|
|
support/convertStorage||GHIDRA||||END|
|
||||||
Linux/support/bsim_ctl||GHIDRA||||END|
|
support/debug.log4j.xml||GHIDRA||||END|
|
||||||
Linux/support/buildGhidraJar||GHIDRA||||END|
|
support/ghidra.ico||GHIDRA||||END|
|
||||||
Linux/support/convertStorage||GHIDRA||||END|
|
support/ghidraClean||GHIDRA||||END|
|
||||||
Linux/support/ghidraClean||GHIDRA||||END|
|
support/ghidraDebug||GHIDRA||||END|
|
||||||
Linux/support/ghidraDebug||GHIDRA||||END|
|
support/gradle/gradle-wrapper.jar||Apache License 2.0||||END|
|
||||||
Linux/support/jshellRun||GHIDRA||||END|
|
support/gradle/gradle-wrapper.properties||Apache License 2.0||||END|
|
||||||
Linux/support/pyghidraRun||GHIDRA||||END|
|
support/jshellRun||GHIDRA||||END|
|
||||||
Linux/support/sleigh||GHIDRA||||END|
|
support/launch.properties||GHIDRA||||END|
|
||||||
Windows/support/README_createPdbXmlFiles.txt||GHIDRA||||END|
|
support/pyghidraRun||GHIDRA||||END|
|
||||||
Windows/support/ghidra.ico||GHIDRA||||END|
|
support/sleigh||GHIDRA||||END|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ else
|
|||||||
OS_DIRNAME="linux64"
|
OS_DIRNAME="linux64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "${SCRIPT_DIR}/../Ghidra" ]; then
|
if [ -f "${SCRIPT_DIR}/../Ghidra/application.properties" ]; then
|
||||||
|
|
||||||
# Production Environment
|
# Production Environment
|
||||||
GHIDRA_HOME="${SCRIPT_DIR}/.."
|
GHIDRA_HOME="${SCRIPT_DIR}/.."
|
||||||
@@ -105,8 +105,8 @@ if [ -d "${SCRIPT_DIR}/../Ghidra" ]; then
|
|||||||
else
|
else
|
||||||
|
|
||||||
# Development Environment (Eclipse classes or "gradle jar")
|
# Development Environment (Eclipse classes or "gradle jar")
|
||||||
GHIDRA_HOME="${SCRIPT_DIR}/../../../.."
|
GHIDRA_HOME="${SCRIPT_DIR}/../../.."
|
||||||
WRAPPER_CONF="${SCRIPT_DIR}/../../Common/server/server.conf"
|
WRAPPER_CONF="${SCRIPT_DIR}/server.conf"
|
||||||
DATA_DIR="${GHIDRA_HOME}/${MODULE_DIR}/build/data"
|
DATA_DIR="${GHIDRA_HOME}/${MODULE_DIR}/build/data"
|
||||||
OS_DIR="${GHIDRA_HOME}/${MODULE_DIR}/os/${OS_DIRNAME}"
|
OS_DIR="${GHIDRA_HOME}/${MODULE_DIR}/os/${OS_DIRNAME}"
|
||||||
CLASSPATH_FRAG="${GHIDRA_HOME}/${MODULE_DIR}/build/dev-meta/classpath.frag"
|
CLASSPATH_FRAG="${GHIDRA_HOME}/${MODULE_DIR}/build/dev-meta/classpath.frag"
|
||||||
@@ -93,8 +93,8 @@ if exist "%SERVER_DIR%\..\Ghidra\" goto normal
|
|||||||
:: NOTE: Variables that get accessed in server.conf must be lowercase
|
:: NOTE: Variables that get accessed in server.conf must be lowercase
|
||||||
|
|
||||||
:: Development Environment (Eclipse classes or "gradle jar")
|
:: Development Environment (Eclipse classes or "gradle jar")
|
||||||
set "GHIDRA_HOME=%SERVER_DIR%\..\..\..\.."
|
set "GHIDRA_HOME=%SERVER_DIR%\..\..\.."
|
||||||
set "WRAPPER_CONF=%SERVER_DIR%\..\..\Common\server\server.conf"
|
set "WRAPPER_CONF=%SERVER_DIR%\server.conf"
|
||||||
set "DATA_DIR=%GHIDRA_HOME%\%MODULE_DIR%\build\data"
|
set "DATA_DIR=%GHIDRA_HOME%\%MODULE_DIR%\build\data"
|
||||||
set "CLASSPATH_FRAG=%GHIDRA_HOME%\%MODULE_DIR%\build\dev-meta\classpath.frag"
|
set "CLASSPATH_FRAG=%GHIDRA_HOME%\%MODULE_DIR%\build\dev-meta\classpath.frag"
|
||||||
set "LS_CPATH=%GHIDRA_HOME%\GhidraBuild\LaunchSupport\bin\main"
|
set "LS_CPATH=%GHIDRA_HOME%\GhidraBuild\LaunchSupport\bin\main"
|
||||||
@@ -103,7 +103,8 @@ wrapper.java.additional.11=-Ddb.buffers.DataBuffer.compressedOutput=true
|
|||||||
# this mode of operation the wrapper.fork_hack option must be enabled and the wrapper.posix_spawn
|
# this mode of operation the wrapper.fork_hack option must be enabled and the wrapper.posix_spawn
|
||||||
# option explicitly disabled. The ghidraSvr script will attempt to make these changes automatically
|
# option explicitly disabled. The ghidraSvr script will attempt to make these changes automatically
|
||||||
# for Mac OS X.
|
# for Mac OS X.
|
||||||
#wrapper.fork_hack=true
|
wrapper.fork_hack=true
|
||||||
|
wrapper.posix_spawn=false
|
||||||
|
|
||||||
# Pipe server output to console/log
|
# Pipe server output to console/log
|
||||||
#wrapper.console.pipestreams=true
|
#wrapper.console.pipestreams=true
|
||||||
@@ -32,13 +32,7 @@ MAXMEM=128M
|
|||||||
# fallback, which doesn't attempt to do anything with links.
|
# 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_FILE="$(readlink -f "$0" 2>/dev/null || readlink "$0" 2>/dev/null || echo "$0")"
|
||||||
SCRIPT_DIR="$(dirname -- "$SCRIPT_FILE")"
|
SCRIPT_DIR="$(dirname -- "$SCRIPT_FILE")"
|
||||||
if [ -d "${SCRIPT_DIR}/../Ghidra" ]; then
|
CONFIG="${SCRIPT_DIR}/server.conf"
|
||||||
# Production Environment
|
|
||||||
CONFIG="${SCRIPT_DIR}/server.conf"
|
|
||||||
else
|
|
||||||
# Development Environment
|
|
||||||
CONFIG="${SCRIPT_DIR}/../../Common/server/server.conf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Identify server process owner if set within server.conf
|
# Identify server process owner if set within server.conf
|
||||||
OWNER="$(grep '^wrapper.app.account=' "${CONFIG}" | cut -d '=' -f 2)"
|
OWNER="$(grep '^wrapper.app.account=' "${CONFIG}" | cut -d '=' -f 2)"
|
||||||
@@ -47,17 +47,8 @@ set MAXMEM=128M
|
|||||||
:: 'd' - drive
|
:: 'd' - drive
|
||||||
:: 'p' - path (without filename)
|
:: 'p' - path (without filename)
|
||||||
set "SCRIPT_DIR=%~dp0"
|
set "SCRIPT_DIR=%~dp0"
|
||||||
|
|
||||||
:: Production Environment
|
|
||||||
set "CONFIG=%SCRIPT_DIR%.\server.conf"
|
set "CONFIG=%SCRIPT_DIR%.\server.conf"
|
||||||
|
|
||||||
if exist "%CONFIG%" goto continue
|
|
||||||
|
|
||||||
:: Development Environment
|
|
||||||
set "CONFIG=%SCRIPT_DIR%..\..\Common\server\server.conf"
|
|
||||||
|
|
||||||
:continue
|
|
||||||
|
|
||||||
set VMARGS=-DUserAdmin.invocation=%~n0
|
set VMARGS=-DUserAdmin.invocation=%~n0
|
||||||
|
|
||||||
call "%~dp0\..\support\launch.bat" fg jre svrAdmin "%MAXMEM%" "%VMARGS%" ghidra.server.ServerAdmin "%CONFIG%" %*
|
call "%~dp0\..\support\launch.bat" fg jre svrAdmin "%MAXMEM%" "%VMARGS%" ghidra.server.ServerAdmin "%CONFIG%" %*
|
||||||
@@ -35,7 +35,7 @@ REM Production Environment
|
|||||||
if exist "%GHIDRA_DIR%" goto continue
|
if exist "%GHIDRA_DIR%" goto continue
|
||||||
|
|
||||||
REM Development Environment
|
REM Development Environment
|
||||||
set "GHIDRA_DIR=%SCRIPT_DIR%..\..\.."
|
set "GHIDRA_DIR=%SCRIPT_DIR%..\.."
|
||||||
set OS_DIR=build\os
|
set OS_DIR=build\os
|
||||||
|
|
||||||
:continue
|
:continue
|
||||||
|
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 157 KiB |
@@ -104,12 +104,12 @@ set "CPATH=%INSTALL_DIR%\Ghidra\Framework\Utility\lib\Utility.jar"
|
|||||||
set "LS_CPATH=%SUPPORT_DIR%\LaunchSupport.jar"
|
set "LS_CPATH=%SUPPORT_DIR%\LaunchSupport.jar"
|
||||||
set "DEBUG_LOG4J=%SUPPORT_DIR%\debug.log4j.xml"
|
set "DEBUG_LOG4J=%SUPPORT_DIR%\debug.log4j.xml"
|
||||||
|
|
||||||
if exist "%INSTALL_DIR%\Ghidra" goto continue2
|
if exist "%INSTALL_DIR%\Ghidra\application.properties" goto continue2
|
||||||
|
|
||||||
::
|
::
|
||||||
:: Development Environment (Eclipse classes or "gradle jar")
|
:: Development Environment (Eclipse classes or "gradle jar")
|
||||||
::
|
::
|
||||||
set "INSTALL_DIR=%INSTALL_DIR%\..\..\.."
|
set "INSTALL_DIR=%INSTALL_DIR%\..\.."
|
||||||
set "CPATH=%INSTALL_DIR%\Ghidra\Framework\Utility\bin\main"
|
set "CPATH=%INSTALL_DIR%\Ghidra\Framework\Utility\bin\main"
|
||||||
set "LS_CPATH=%INSTALL_DIR%\GhidraBuild\LaunchSupport\bin\main"
|
set "LS_CPATH=%INSTALL_DIR%\GhidraBuild\LaunchSupport\bin\main"
|
||||||
if not exist "%LS_CPATH%" (
|
if not exist "%LS_CPATH%" (
|
||||||
@@ -121,7 +121,7 @@ if not exist "%LS_CPATH%" (
|
|||||||
set ERRORLEVEL=1
|
set ERRORLEVEL=1
|
||||||
goto exit1
|
goto exit1
|
||||||
)
|
)
|
||||||
set "DEBUG_LOG4J=%INSTALL_DIR%\Ghidra\RuntimeScripts\Common\support\debug.log4j.xml"
|
set "DEBUG_LOG4J=%INSTALL_DIR%\Ghidra\RuntimeScripts\support\debug.log4j.xml"
|
||||||
|
|
||||||
:continue2
|
:continue2
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ if [[ "${SUPPORT_DIR}" = *"!"* ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "${SUPPORT_DIR}/launch.properties" ]; then
|
if [ -f "${SUPPORT_DIR}/../Ghidra/application.properties" ]; then
|
||||||
|
|
||||||
# Production Environment
|
# Production Environment
|
||||||
export INSTALL_DIR="${SUPPORT_DIR}/.."
|
export INSTALL_DIR="${SUPPORT_DIR}/.."
|
||||||
@@ -110,7 +110,7 @@ if [ -f "${SUPPORT_DIR}/launch.properties" ]; then
|
|||||||
else
|
else
|
||||||
|
|
||||||
# Development Environment (Eclipse classes or "gradle jar")
|
# Development Environment (Eclipse classes or "gradle jar")
|
||||||
export INSTALL_DIR="${SUPPORT_DIR}/../../../.."
|
export INSTALL_DIR="${SUPPORT_DIR}/../../.."
|
||||||
CPATH="${INSTALL_DIR}/Ghidra/Framework/Utility/bin/main"
|
CPATH="${INSTALL_DIR}/Ghidra/Framework/Utility/bin/main"
|
||||||
LS_CPATH="${INSTALL_DIR}/GhidraBuild/LaunchSupport/bin/main"
|
LS_CPATH="${INSTALL_DIR}/GhidraBuild/LaunchSupport/bin/main"
|
||||||
if ! [ -d "${LS_CPATH}" ]; then
|
if ! [ -d "${LS_CPATH}" ]; then
|
||||||
@@ -121,7 +121,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
DEBUG_LOG4J="${INSTALL_DIR}/Ghidra/RuntimeScripts/Common/support/debug.log4j.xml"
|
DEBUG_LOG4J="${INSTALL_DIR}/Ghidra/RuntimeScripts/support/debug.log4j.xml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Identify java command from either JAVA_HOME or PATH, try PATH first
|
# Identify java command from either JAVA_HOME or PATH, try PATH first
|
||||||
@@ -27,7 +27,7 @@ DEV_ARG=
|
|||||||
INSTALL_DIR="${SCRIPT_DIR}/.."
|
INSTALL_DIR="${SCRIPT_DIR}/.."
|
||||||
if [ ! -d "${INSTALL_DIR}/Ghidra" ]; then
|
if [ ! -d "${INSTALL_DIR}/Ghidra" ]; then
|
||||||
DEV_ARG="--dev"
|
DEV_ARG="--dev"
|
||||||
INSTALL_DIR="${SCRIPT_DIR}/../../../.."
|
INSTALL_DIR="${SCRIPT_DIR}/../../.."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PYGHIDRA_LAUNCHER="${INSTALL_DIR}/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py"
|
PYGHIDRA_LAUNCHER="${INSTALL_DIR}/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py"
|
||||||
@@ -47,7 +47,7 @@ set "SCRIPT_DIR=%SCRIPT_DIR:~0,-1%"
|
|||||||
set "INSTALL_DIR=%SCRIPT_DIR%\.."
|
set "INSTALL_DIR=%SCRIPT_DIR%\.."
|
||||||
if not exist "%INSTALL_DIR%\Ghidra" (
|
if not exist "%INSTALL_DIR%\Ghidra" (
|
||||||
set DEV_ARG="--dev"
|
set DEV_ARG="--dev"
|
||||||
set "INSTALL_DIR=%SCRIPT_DIR%\..\..\..\.."
|
set "INSTALL_DIR=%SCRIPT_DIR%\..\..\.."
|
||||||
)
|
)
|
||||||
|
|
||||||
set "PYGHIDRA_LAUNCHER=%INSTALL_DIR%\Ghidra\Features\PyGhidra\support\pyghidra_launcher.py
|
set "PYGHIDRA_LAUNCHER=%INSTALL_DIR%\Ghidra\Features\PyGhidra\support\pyghidra_launcher.py
|
||||||
@@ -373,7 +373,7 @@ public class AppConfig {
|
|||||||
|
|
||||||
// Get the required launch properties file
|
// Get the required launch properties file
|
||||||
File launchPropertiesFile = new File(installDir,
|
File launchPropertiesFile = new File(installDir,
|
||||||
(isDev ? "Ghidra/RuntimeScripts/Common/" : "") + "support/" + LAUNCH_PROPERTIES_NAME);
|
(isDev ? "Ghidra/RuntimeScripts/" : "") + "support/" + LAUNCH_PROPERTIES_NAME);
|
||||||
if (!launchPropertiesFile.isFile()) {
|
if (!launchPropertiesFile.isFile()) {
|
||||||
throw new FileNotFoundException(
|
throw new FileNotFoundException(
|
||||||
"Launch properties file does not exist: " + launchPropertiesFile);
|
"Launch properties file does not exist: " + launchPropertiesFile);
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ import org.apache.tools.ant.filters.*
|
|||||||
* distribution.gradle
|
* distribution.gradle
|
||||||
*
|
*
|
||||||
* This contains gradle tasks for packaging Ghidra artifacts for distribution. To
|
* This contains gradle tasks for packaging Ghidra artifacts for distribution. To
|
||||||
* run a full distribution, execute the buildGhidra task. This will build for the
|
* run a full distribution, execute the buildGhidra task. This will build native
|
||||||
* current platform only. Add -PallPlatforms to build a multiplatform build.
|
* components for the current platform only.
|
||||||
*
|
*
|
||||||
*********************************************************************************/
|
*********************************************************************************/
|
||||||
|
|
||||||
@@ -645,12 +645,9 @@ task assembleAll() {
|
|||||||
dependsOn assembleDistribution
|
dependsOn assembleDistribution
|
||||||
dependsOn assembleSource
|
dependsOn assembleSource
|
||||||
dependsOn assembleMarkdownToHtml
|
dependsOn assembleMarkdownToHtml
|
||||||
dependsOn "assembleDistribution_$currentPlatform"
|
|
||||||
|
project.PLATFORMS.each { platform ->
|
||||||
if (project.hasProperty("allPlatforms")) {
|
dependsOn ":assembleDistribution_${platform.name}"
|
||||||
project.PLATFORMS.each { platform ->
|
|
||||||
dependsOn ":assembleDistribution_${platform.name}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
@@ -681,12 +678,8 @@ task createInstallationZip(type: Zip) { t ->
|
|||||||
|
|
||||||
dependsOn assembleAll
|
dependsOn assembleAll
|
||||||
|
|
||||||
if (project.hasProperty("allPlatforms")) {
|
archiveFileName = "${ZIP_NAME_PREFIX}.zip"
|
||||||
archiveFileName = "${ZIP_NAME_PREFIX}.zip"
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
archiveFileName = "${ZIP_NAME_PREFIX}_${currentPlatform}.zip"
|
|
||||||
}
|
|
||||||
destinationDirectory = DISTRIBUTION_DIR
|
destinationDirectory = DISTRIBUTION_DIR
|
||||||
|
|
||||||
// Make sure that we don't try to copy the same file with the same path.
|
// Make sure that we don't try to copy the same file with the same path.
|
||||||
|
|||||||
@@ -37,9 +37,6 @@ Primary gradle tasks for Ghidra
|
|||||||
eclipse Create eclipse projects [root/eclipse.gradle]
|
eclipse Create eclipse projects [root/eclipse.gradle]
|
||||||
buildHelp Builds help [root/buildHelp.gradle]
|
buildHelp Builds help [root/buildHelp.gradle]
|
||||||
buildGhidra Builds Ghidra for the current platform [root/distribution.gradle]
|
buildGhidra Builds Ghidra for the current platform [root/distribution.gradle]
|
||||||
buildGhidra -PallPlatforms Builds Ghidra for all platforms (assumes natives [root/distribution.gradle]
|
|
||||||
for other platforms are already built into
|
|
||||||
appropriate os dirs)
|
|
||||||
|
|
||||||
Task rules:
|
Task rules:
|
||||||
buildNatives[_platform] Builds the native executables and libraries for the [GPL/nativeBuildProperties.gradle]
|
buildNatives[_platform] Builds the native executables and libraries for the [GPL/nativeBuildProperties.gradle]
|
||||||
|
|||||||
2
gradlew
vendored
2
gradlew
vendored
@@ -121,7 +121,7 @@ if [ -f "${APP_HOME}/gradle-wrapper.jar" ]; then
|
|||||||
GHIDRA_HOME="${APP_HOME}/../.."
|
GHIDRA_HOME="${APP_HOME}/../.."
|
||||||
else
|
else
|
||||||
# Development Environment (Eclipse classes or "gradle jar")
|
# Development Environment (Eclipse classes or "gradle jar")
|
||||||
CLASSPATH="${APP_HOME}/Ghidra/RuntimeScripts/Common/support/gradle/gradle-wrapper.jar"
|
CLASSPATH="${APP_HOME}/Ghidra/RuntimeScripts/support/gradle/gradle-wrapper.jar"
|
||||||
GHIDRA_HOME="${APP_HOME}"
|
GHIDRA_HOME="${APP_HOME}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
2
gradlew.bat
vendored
2
gradlew.bat
vendored
@@ -80,7 +80,7 @@ if exist "%APP_HOME%\gradle-wrapper.jar" (
|
|||||||
set "GHIDRA_HOME=%APP_HOME%..\..\"
|
set "GHIDRA_HOME=%APP_HOME%..\..\"
|
||||||
) else (
|
) else (
|
||||||
@rem Development Environment (Eclipse classes or "gradle jar")
|
@rem Development Environment (Eclipse classes or "gradle jar")
|
||||||
set "CLASSPATH=%APP_HOME%Ghidra\RuntimeScripts\Common\support\gradle\gradle-wrapper.jar"
|
set "CLASSPATH=%APP_HOME%Ghidra\RuntimeScripts\support\gradle\gradle-wrapper.jar"
|
||||||
set "GHIDRA_HOME=%APP_HOME%"
|
set "GHIDRA_HOME=%APP_HOME%"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user