Ghidra is a software reverse engineering (SRE) framework
GP-6839: Always do "multi-platform" build
Ryan Kurtz9311d0692285
diff --git a/Ghidra/Features/GhidraGo/src/main/java/ghidra/GhidraGo.java b/Ghidra/Features/GhidraGo/src/main/java/ghidra/GhidraGo.javaindex 66d83a8106..761656b055 100644--- a/Ghidra/Features/GhidraGo/src/main/java/ghidra/GhidraGo.java+++ b/Ghidra/Features/GhidraGo/src/main/java/ghidra/GhidraGo.java@@ -157,11 +157,11 @@ public class GhidraGo implements GhidraLaunchable {if (SystemUtilities.isInDevelopmentMode()) {if (Platform.CURRENT_PLATFORM.getOperatingSystem() == OperatingSystem.WINDOWS) {ghidraRunPath = Path.of(file.getAbsolutePath(),- "/RuntimeScripts/Windows/ghidraRun.bat");+ "/RuntimeScripts/ghidraRun.bat");}else {ghidraRunPath = Path.of(file.getAbsolutePath(),- "/RuntimeScripts/Linux/ghidraRun");+ "/RuntimeScripts/ghidraRun");}}else {diff --git a/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/GhidraServer.java b/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/GhidraServer.javaindex dfe58ae91d..feb4c827bf 100644--- a/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/GhidraServer.java+++ b/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/GhidraServer.java@@ -500,7 +500,7 @@ public class GhidraServer extends UnicastRemoteObject implements GhidraServerHan}ResourceFile serverRoot = new ResourceFile(Application.getInstallationDirectory(),- SystemUtilities.isInDevelopmentMode() ? "ghidra/Ghidra/RuntimeScripts/Common/server"+ SystemUtilities.isInDevelopmentMode() ? "ghidra/Ghidra/RuntimeScripts/server": "server");if (serverRoot.getFile(false) == null) {System.err.println(diff --git a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.pyindex e8a3ebee7e..6938704a43 100644--- a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py+++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py@@ -225,7 +225,7 @@ class PyGhidraLauncher:def _setup_dev_classpath(self, utility_dir: Path):"""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"build_dir = Path("build") / "libs"@@ -274,7 +274,7 @@ class PyGhidraLauncher:root = self._install_dirif self._dev_mode:- root = root / "Ghidra" / "RuntimeScripts" / "Common"+ root = root / "Ghidra" / "RuntimeScripts"launch_properties = root / "support" / "launch.properties"diff --git a/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py b/Ghidra/Features/PyGhidra/support/pyghidra_launcher.pyindex a68bd4e800..aef20c521e 100644--- a/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py+++ b/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py@@ -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]: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:launch_properties_path: Path = install_dir / 'support' / 'launch.properties'props: List[str] = []diff --git a/Ghidra/RuntimeScripts/build.gradle b/Ghidra/RuntimeScripts/build.gradleindex 5ac3930e8f..ac1522ecd7 100644--- a/Ghidra/RuntimeScripts/build.gradle+++ b/Ghidra/RuntimeScripts/build.gradle@@ -19,58 +19,33 @@ eclipse.project.name = '_Runtime Scripts'rootProject.assembleDistribution {- from (this.project.file("Common/support")) {+ from (this.project.file("support")) {into "support"}- from (this.project.file("Common/server")) {+ from (this.project.file("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 {- from (this.project.file("Common/support")) {+ from (this.project.file("support")) {include "*.md"into "support"}- from (this.project.file("Common/server")) {+ from (this.project.file("server")) {include "*.md"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"))- }- }-}-diff --git a/Ghidra/RuntimeScripts/certification.manifest b/Ghidra/RuntimeScripts/certification.manifestindex fbac4ae1d8..f604f6bb44 100644--- a/Ghidra/RuntimeScripts/certification.manifest+++ b/Ghidra/RuntimeScripts/certification.manifest@@ -2,31 +2,31 @@##MODULE IP: Apache License 2.0##MODULE IP: Copyright Distribution Permitted##MODULE IP: Public Domain-Common/server/jaas.conf||GHIDRA||||END|-Common/server/server.conf||GHIDRA||||END|-Common/server/svrREADME.md||GHIDRA||||END|-Common/support/GhidraGo/ghidraGoREADME.html||GHIDRA||||END|-Common/support/analyzeHeadlessREADME.md||GHIDRA||||END|-Common/support/buildGhidraJarREADME.txt||GHIDRA||||END|-Common/support/debug.log4j.xml||GHIDRA||||END|-Common/support/gradle/gradle-wrapper.jar||Apache License 2.0||||END|-Common/support/gradle/gradle-wrapper.properties||Apache License 2.0||||END|-Common/support/launch.properties||GHIDRA||||END|-Linux/ghidraRun||GHIDRA||||END|-Linux/server/ghidraSvr||GHIDRA||||END|-Linux/server/svrAdmin||GHIDRA||||END|-Linux/server/svrInstall||GHIDRA||||END|-Linux/server/svrUninstall||GHIDRA||||END|-Linux/support/GhidraGo/ghidraGo||GHIDRA||||END|-Linux/support/analyzeHeadless||GHIDRA||||END|-Linux/support/bsim||GHIDRA||||END|-Linux/support/bsim_ctl||GHIDRA||||END|-Linux/support/buildGhidraJar||GHIDRA||||END|-Linux/support/convertStorage||GHIDRA||||END|-Linux/support/ghidraClean||GHIDRA||||END|-Linux/support/ghidraDebug||GHIDRA||||END|-Linux/support/jshellRun||GHIDRA||||END|-Linux/support/pyghidraRun||GHIDRA||||END|-Linux/support/sleigh||GHIDRA||||END|-Windows/support/README_createPdbXmlFiles.txt||GHIDRA||||END|-Windows/support/ghidra.ico||GHIDRA||||END|+ghidraRun||GHIDRA||||END|+server/ghidraSvr||GHIDRA||||END|+server/jaas.conf||GHIDRA||||END|+server/server.conf||GHIDRA||||END|+server/svrAdmin||GHIDRA||||END|+server/svrInstall||GHIDRA||||END|+server/svrREADME.md||GHIDRA||||END|+server/svrUninstall||GHIDRA||||END|+support/GhidraGo/ghidraGo||GHIDRA||||END|+support/GhidraGo/ghidraGoREADME.html||GHIDRA||||END|+support/README_createPdbXmlFiles.txt||GHIDRA||||END|+support/analyzeHeadless||GHIDRA||||END|+support/analyzeHeadlessREADME.md||GHIDRA||||END|+support/bsim||GHIDRA||||END|+support/bsim_ctl||GHIDRA||||END|+support/buildGhidraJar||GHIDRA||||END|+support/buildGhidraJarREADME.txt||GHIDRA||||END|+support/convertStorage||GHIDRA||||END|+support/debug.log4j.xml||GHIDRA||||END|+support/ghidra.ico||GHIDRA||||END|+support/ghidraClean||GHIDRA||||END|+support/ghidraDebug||GHIDRA||||END|+support/gradle/gradle-wrapper.jar||Apache License 2.0||||END|+support/gradle/gradle-wrapper.properties||Apache License 2.0||||END|+support/jshellRun||GHIDRA||||END|+support/launch.properties||GHIDRA||||END|+support/pyghidraRun||GHIDRA||||END|+support/sleigh||GHIDRA||||END|diff --git a/Ghidra/RuntimeScripts/Linux/ghidraRun b/Ghidra/RuntimeScripts/ghidraRunsimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/ghidraRunrename to Ghidra/RuntimeScripts/ghidraRundiff --git a/Ghidra/RuntimeScripts/Windows/ghidraRun.bat b/Ghidra/RuntimeScripts/ghidraRun.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/ghidraRun.batrename to Ghidra/RuntimeScripts/ghidraRun.batdiff --git a/Ghidra/RuntimeScripts/Linux/server/ghidraSvr b/Ghidra/RuntimeScripts/server/ghidraSvrsimilarity index 98%rename from Ghidra/RuntimeScripts/Linux/server/ghidraSvrrename to Ghidra/RuntimeScripts/server/ghidraSvrindex 5839ebd9e3..cf19b58f48 100755--- a/Ghidra/RuntimeScripts/Linux/server/ghidraSvr+++ b/Ghidra/RuntimeScripts/server/ghidraSvr@@ -93,7 +93,7 @@ elseOS_DIRNAME="linux64"fi-if [ -d "${SCRIPT_DIR}/../Ghidra" ]; then+if [ -f "${SCRIPT_DIR}/../Ghidra/application.properties" ]; then# Production EnvironmentGHIDRA_HOME="${SCRIPT_DIR}/.."@@ -105,8 +105,8 @@ if [ -d "${SCRIPT_DIR}/../Ghidra" ]; thenelse# Development Environment (Eclipse classes or "gradle jar")- GHIDRA_HOME="${SCRIPT_DIR}/../../../.."- WRAPPER_CONF="${SCRIPT_DIR}/../../Common/server/server.conf"+ GHIDRA_HOME="${SCRIPT_DIR}/../../.."+ WRAPPER_CONF="${SCRIPT_DIR}/server.conf"DATA_DIR="${GHIDRA_HOME}/${MODULE_DIR}/build/data"OS_DIR="${GHIDRA_HOME}/${MODULE_DIR}/os/${OS_DIRNAME}"CLASSPATH_FRAG="${GHIDRA_HOME}/${MODULE_DIR}/build/dev-meta/classpath.frag"diff --git a/Ghidra/RuntimeScripts/Windows/server/ghidraSvr.bat b/Ghidra/RuntimeScripts/server/ghidraSvr.batsimilarity index 98%rename from Ghidra/RuntimeScripts/Windows/server/ghidraSvr.batrename to Ghidra/RuntimeScripts/server/ghidraSvr.batindex 246f171b7e..6ebf51f8ce 100644--- a/Ghidra/RuntimeScripts/Windows/server/ghidraSvr.bat+++ b/Ghidra/RuntimeScripts/server/ghidraSvr.bat@@ -93,8 +93,8 @@ if exist "%SERVER_DIR%\..\Ghidra\" goto normal:: NOTE: Variables that get accessed in server.conf must be lowercase:: Development Environment (Eclipse classes or "gradle jar")-set "GHIDRA_HOME=%SERVER_DIR%\..\..\..\.."-set "WRAPPER_CONF=%SERVER_DIR%\..\..\Common\server\server.conf"+set "GHIDRA_HOME=%SERVER_DIR%\..\..\.."+set "WRAPPER_CONF=%SERVER_DIR%\server.conf"set "DATA_DIR=%GHIDRA_HOME%\%MODULE_DIR%\build\data"set "CLASSPATH_FRAG=%GHIDRA_HOME%\%MODULE_DIR%\build\dev-meta\classpath.frag"set "LS_CPATH=%GHIDRA_HOME%\GhidraBuild\LaunchSupport\bin\main"diff --git a/Ghidra/RuntimeScripts/Common/server/jaas.conf b/Ghidra/RuntimeScripts/server/jaas.confsimilarity index 100%rename from Ghidra/RuntimeScripts/Common/server/jaas.confrename to Ghidra/RuntimeScripts/server/jaas.confdiff --git a/Ghidra/RuntimeScripts/Common/server/jaas_external_program.example.sh b/Ghidra/RuntimeScripts/server/jaas_external_program.example.shsimilarity index 100%rename from Ghidra/RuntimeScripts/Common/server/jaas_external_program.example.shrename to Ghidra/RuntimeScripts/server/jaas_external_program.example.shdiff --git a/Ghidra/RuntimeScripts/Common/server/server.conf b/Ghidra/RuntimeScripts/server/server.confsimilarity index 99%rename from Ghidra/RuntimeScripts/Common/server/server.confrename to Ghidra/RuntimeScripts/server/server.confindex 392cee1e3c..6b5d422df7 100644--- a/Ghidra/RuntimeScripts/Common/server/server.conf+++ b/Ghidra/RuntimeScripts/server/server.conf@@ -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# option explicitly disabled. The ghidraSvr script will attempt to make these changes automatically# for Mac OS X.-#wrapper.fork_hack=true+wrapper.fork_hack=true+wrapper.posix_spawn=false# Pipe server output to console/log#wrapper.console.pipestreams=truediff --git a/Ghidra/RuntimeScripts/Linux/server/svrAdmin b/Ghidra/RuntimeScripts/server/svrAdminsimilarity index 92%rename from Ghidra/RuntimeScripts/Linux/server/svrAdminrename to Ghidra/RuntimeScripts/server/svrAdminindex e7e74ef585..5b45dc3726 100755--- a/Ghidra/RuntimeScripts/Linux/server/svrAdmin+++ b/Ghidra/RuntimeScripts/server/svrAdmin@@ -32,13 +32,7 @@ MAXMEM=128M# 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="$(dirname -- "$SCRIPT_FILE")"-if [ -d "${SCRIPT_DIR}/../Ghidra" ]; then- # Production Environment- CONFIG="${SCRIPT_DIR}/server.conf"-else- # Development Environment- CONFIG="${SCRIPT_DIR}/../../Common/server/server.conf"-fi+CONFIG="${SCRIPT_DIR}/server.conf"# Identify server process owner if set within server.confOWNER="$(grep '^wrapper.app.account=' "${CONFIG}" | cut -d '=' -f 2)"diff --git a/Ghidra/RuntimeScripts/Windows/server/svrAdmin.bat b/Ghidra/RuntimeScripts/server/svrAdmin.batsimilarity index 93%rename from Ghidra/RuntimeScripts/Windows/server/svrAdmin.batrename to Ghidra/RuntimeScripts/server/svrAdmin.batindex f467a11642..9dfe2da1b3 100644--- a/Ghidra/RuntimeScripts/Windows/server/svrAdmin.bat+++ b/Ghidra/RuntimeScripts/server/svrAdmin.bat@@ -47,17 +47,8 @@ set MAXMEM=128M:: 'd' - drive:: 'p' - path (without filename)set "SCRIPT_DIR=%~dp0"--:: Production Environmentset "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=%~n0call "%~dp0\..\support\launch.bat" fg jre svrAdmin "%MAXMEM%" "%VMARGS%" ghidra.server.ServerAdmin "%CONFIG%" %*diff --git a/Ghidra/RuntimeScripts/Linux/server/svrInstall b/Ghidra/RuntimeScripts/server/svrInstallsimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/server/svrInstallrename to Ghidra/RuntimeScripts/server/svrInstalldiff --git a/Ghidra/RuntimeScripts/Windows/server/svrInstall.bat b/Ghidra/RuntimeScripts/server/svrInstall.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/server/svrInstall.batrename to Ghidra/RuntimeScripts/server/svrInstall.batdiff --git a/Ghidra/RuntimeScripts/Common/server/svrREADME.md b/Ghidra/RuntimeScripts/server/svrREADME.mdsimilarity index 100%rename from Ghidra/RuntimeScripts/Common/server/svrREADME.mdrename to Ghidra/RuntimeScripts/server/svrREADME.mddiff --git a/Ghidra/RuntimeScripts/Linux/server/svrUninstall b/Ghidra/RuntimeScripts/server/svrUninstallsimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/server/svrUninstallrename to Ghidra/RuntimeScripts/server/svrUninstalldiff --git a/Ghidra/RuntimeScripts/Windows/server/svrUninstall.bat b/Ghidra/RuntimeScripts/server/svrUninstall.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/server/svrUninstall.batrename to Ghidra/RuntimeScripts/server/svrUninstall.batdiff --git a/Ghidra/RuntimeScripts/Linux/support/GhidraGo/ghidraGo b/Ghidra/RuntimeScripts/support/GhidraGo/ghidraGosimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/support/GhidraGo/ghidraGorename to Ghidra/RuntimeScripts/support/GhidraGo/ghidraGodiff --git a/Ghidra/RuntimeScripts/Windows/support/GhidraGo/ghidraGo.bat b/Ghidra/RuntimeScripts/support/GhidraGo/ghidraGo.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/GhidraGo/ghidraGo.batrename to Ghidra/RuntimeScripts/support/GhidraGo/ghidraGo.batdiff --git a/Ghidra/RuntimeScripts/Common/support/GhidraGo/ghidraGoREADME.html b/Ghidra/RuntimeScripts/support/GhidraGo/ghidraGoREADME.htmlsimilarity index 100%rename from Ghidra/RuntimeScripts/Common/support/GhidraGo/ghidraGoREADME.htmlrename to Ghidra/RuntimeScripts/support/GhidraGo/ghidraGoREADME.htmldiff --git a/Ghidra/RuntimeScripts/Windows/support/README_createPdbXmlFiles.txt b/Ghidra/RuntimeScripts/support/README_createPdbXmlFiles.txtsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/README_createPdbXmlFiles.txtrename to Ghidra/RuntimeScripts/support/README_createPdbXmlFiles.txtdiff --git a/Ghidra/RuntimeScripts/Linux/support/analyzeHeadless b/Ghidra/RuntimeScripts/support/analyzeHeadlesssimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/support/analyzeHeadlessrename to Ghidra/RuntimeScripts/support/analyzeHeadlessdiff --git a/Ghidra/RuntimeScripts/Windows/support/analyzeHeadless.bat b/Ghidra/RuntimeScripts/support/analyzeHeadless.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/analyzeHeadless.batrename to Ghidra/RuntimeScripts/support/analyzeHeadless.batdiff --git a/Ghidra/RuntimeScripts/Common/support/analyzeHeadlessREADME.md b/Ghidra/RuntimeScripts/support/analyzeHeadlessREADME.mdsimilarity index 100%rename from Ghidra/RuntimeScripts/Common/support/analyzeHeadlessREADME.mdrename to Ghidra/RuntimeScripts/support/analyzeHeadlessREADME.mddiff --git a/Ghidra/RuntimeScripts/Linux/support/bsim b/Ghidra/RuntimeScripts/support/bsimsimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/support/bsimrename to Ghidra/RuntimeScripts/support/bsimdiff --git a/Ghidra/RuntimeScripts/Windows/support/bsim.bat b/Ghidra/RuntimeScripts/support/bsim.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/bsim.batrename to Ghidra/RuntimeScripts/support/bsim.batdiff --git a/Ghidra/RuntimeScripts/Linux/support/bsim_ctl b/Ghidra/RuntimeScripts/support/bsim_ctlsimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/support/bsim_ctlrename to Ghidra/RuntimeScripts/support/bsim_ctldiff --git a/Ghidra/RuntimeScripts/Common/support/buildExtension.gradle b/Ghidra/RuntimeScripts/support/buildExtension.gradlesimilarity index 100%rename from Ghidra/RuntimeScripts/Common/support/buildExtension.gradlerename to Ghidra/RuntimeScripts/support/buildExtension.gradlediff --git a/Ghidra/RuntimeScripts/Linux/support/buildGhidraJar b/Ghidra/RuntimeScripts/support/buildGhidraJarsimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/support/buildGhidraJarrename to Ghidra/RuntimeScripts/support/buildGhidraJardiff --git a/Ghidra/RuntimeScripts/Windows/support/buildGhidraJar.bat b/Ghidra/RuntimeScripts/support/buildGhidraJar.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/buildGhidraJar.batrename to Ghidra/RuntimeScripts/support/buildGhidraJar.batdiff --git a/Ghidra/RuntimeScripts/Common/support/buildGhidraJarREADME.txt b/Ghidra/RuntimeScripts/support/buildGhidraJarREADME.txtsimilarity index 100%rename from Ghidra/RuntimeScripts/Common/support/buildGhidraJarREADME.txtrename to Ghidra/RuntimeScripts/support/buildGhidraJarREADME.txtdiff --git a/Ghidra/RuntimeScripts/Linux/support/convertStorage b/Ghidra/RuntimeScripts/support/convertStoragesimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/support/convertStoragerename to Ghidra/RuntimeScripts/support/convertStoragediff --git a/Ghidra/RuntimeScripts/Windows/support/convertStorage.bat b/Ghidra/RuntimeScripts/support/convertStorage.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/convertStorage.batrename to Ghidra/RuntimeScripts/support/convertStorage.batdiff --git a/Ghidra/RuntimeScripts/Windows/support/createPdbXmlFiles.bat b/Ghidra/RuntimeScripts/support/createPdbXmlFiles.batsimilarity index 98%rename from Ghidra/RuntimeScripts/Windows/support/createPdbXmlFiles.batrename to Ghidra/RuntimeScripts/support/createPdbXmlFiles.batindex c0e9b52176..0b7e0a307d 100644--- a/Ghidra/RuntimeScripts/Windows/support/createPdbXmlFiles.bat+++ b/Ghidra/RuntimeScripts/support/createPdbXmlFiles.bat@@ -35,7 +35,7 @@ REM Production Environmentif exist "%GHIDRA_DIR%" goto continueREM Development Environment-set "GHIDRA_DIR=%SCRIPT_DIR%..\..\.."+set "GHIDRA_DIR=%SCRIPT_DIR%..\.."set OS_DIR=build\os:continuediff --git a/Ghidra/RuntimeScripts/Common/support/debug.log4j.xml b/Ghidra/RuntimeScripts/support/debug.log4j.xmlsimilarity index 100%rename from Ghidra/RuntimeScripts/Common/support/debug.log4j.xmlrename to Ghidra/RuntimeScripts/support/debug.log4j.xmldiff --git a/Ghidra/RuntimeScripts/Windows/support/ghidra.ico b/Ghidra/RuntimeScripts/support/ghidra.icosimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/ghidra.icorename to Ghidra/RuntimeScripts/support/ghidra.icodiff --git a/Ghidra/RuntimeScripts/Linux/support/ghidraClean b/Ghidra/RuntimeScripts/support/ghidraCleansimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/support/ghidraCleanrename to Ghidra/RuntimeScripts/support/ghidraCleandiff --git a/Ghidra/RuntimeScripts/Windows/support/ghidraClean.bat b/Ghidra/RuntimeScripts/support/ghidraClean.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/ghidraClean.batrename to Ghidra/RuntimeScripts/support/ghidraClean.batdiff --git a/Ghidra/RuntimeScripts/Linux/support/ghidraDebug b/Ghidra/RuntimeScripts/support/ghidraDebugsimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/support/ghidraDebugrename to Ghidra/RuntimeScripts/support/ghidraDebugdiff --git a/Ghidra/RuntimeScripts/Windows/support/ghidraDebug.bat b/Ghidra/RuntimeScripts/support/ghidraDebug.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/ghidraDebug.batrename to Ghidra/RuntimeScripts/support/ghidraDebug.batdiff --git a/Ghidra/RuntimeScripts/Common/support/gradle/gradle-wrapper.jar b/Ghidra/RuntimeScripts/support/gradle/gradle-wrapper.jarsimilarity index 100%rename from Ghidra/RuntimeScripts/Common/support/gradle/gradle-wrapper.jarrename to Ghidra/RuntimeScripts/support/gradle/gradle-wrapper.jardiff --git a/Ghidra/RuntimeScripts/Common/support/gradle/gradle-wrapper.properties b/Ghidra/RuntimeScripts/support/gradle/gradle-wrapper.propertiessimilarity index 100%rename from Ghidra/RuntimeScripts/Common/support/gradle/gradle-wrapper.propertiesrename to Ghidra/RuntimeScripts/support/gradle/gradle-wrapper.propertiesdiff --git a/Ghidra/RuntimeScripts/Common/support/gradle/settings.gradle b/Ghidra/RuntimeScripts/support/gradle/settings.gradlesimilarity index 100%rename from Ghidra/RuntimeScripts/Common/support/gradle/settings.gradlerename to Ghidra/RuntimeScripts/support/gradle/settings.gradlediff --git a/Ghidra/RuntimeScripts/Linux/support/jshellRun b/Ghidra/RuntimeScripts/support/jshellRunsimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/support/jshellRunrename to Ghidra/RuntimeScripts/support/jshellRundiff --git a/Ghidra/RuntimeScripts/Windows/support/jshellRun.bat b/Ghidra/RuntimeScripts/support/jshellRun.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/jshellRun.batrename to Ghidra/RuntimeScripts/support/jshellRun.batdiff --git a/Ghidra/RuntimeScripts/Windows/support/launch.bat b/Ghidra/RuntimeScripts/support/launch.batsimilarity index 97%rename from Ghidra/RuntimeScripts/Windows/support/launch.batrename to Ghidra/RuntimeScripts/support/launch.batindex c016e5394f..55b2764c6f 100644--- a/Ghidra/RuntimeScripts/Windows/support/launch.bat+++ b/Ghidra/RuntimeScripts/support/launch.bat@@ -104,12 +104,12 @@ set "CPATH=%INSTALL_DIR%\Ghidra\Framework\Utility\lib\Utility.jar"set "LS_CPATH=%SUPPORT_DIR%\LaunchSupport.jar"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")::-set "INSTALL_DIR=%INSTALL_DIR%\..\..\.."+set "INSTALL_DIR=%INSTALL_DIR%\..\.."set "CPATH=%INSTALL_DIR%\Ghidra\Framework\Utility\bin\main"set "LS_CPATH=%INSTALL_DIR%\GhidraBuild\LaunchSupport\bin\main"if not exist "%LS_CPATH%" (@@ -121,7 +121,7 @@ if not exist "%LS_CPATH%" (set ERRORLEVEL=1goto exit1)-set "DEBUG_LOG4J=%INSTALL_DIR%\Ghidra\RuntimeScripts\Common\support\debug.log4j.xml"+set "DEBUG_LOG4J=%INSTALL_DIR%\Ghidra\RuntimeScripts\support\debug.log4j.xml":continue2diff --git a/Ghidra/RuntimeScripts/Common/support/launch.properties b/Ghidra/RuntimeScripts/support/launch.propertiessimilarity index 100%rename from Ghidra/RuntimeScripts/Common/support/launch.propertiesrename to Ghidra/RuntimeScripts/support/launch.propertiesdiff --git a/Ghidra/RuntimeScripts/Linux/support/launch.sh b/Ghidra/RuntimeScripts/support/launch.shsimilarity index 97%rename from Ghidra/RuntimeScripts/Linux/support/launch.shrename to Ghidra/RuntimeScripts/support/launch.shindex c4a90c291a..18ad9f0b92 100755--- a/Ghidra/RuntimeScripts/Linux/support/launch.sh+++ b/Ghidra/RuntimeScripts/support/launch.sh@@ -100,7 +100,7 @@ if [[ "${SUPPORT_DIR}" = *"!"* ]]; thenexit 1fi-if [ -f "${SUPPORT_DIR}/launch.properties" ]; then+if [ -f "${SUPPORT_DIR}/../Ghidra/application.properties" ]; then# Production Environmentexport INSTALL_DIR="${SUPPORT_DIR}/.."@@ -110,7 +110,7 @@ if [ -f "${SUPPORT_DIR}/launch.properties" ]; thenelse# 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"LS_CPATH="${INSTALL_DIR}/GhidraBuild/LaunchSupport/bin/main"if ! [ -d "${LS_CPATH}" ]; then@@ -121,7 +121,7 @@ elseexit 1fifi- DEBUG_LOG4J="${INSTALL_DIR}/Ghidra/RuntimeScripts/Common/support/debug.log4j.xml"+ DEBUG_LOG4J="${INSTALL_DIR}/Ghidra/RuntimeScripts/support/debug.log4j.xml"fi# Identify java command from either JAVA_HOME or PATH, try PATH firstdiff --git a/Ghidra/RuntimeScripts/Linux/support/pyghidraRun b/Ghidra/RuntimeScripts/support/pyghidraRunsimilarity index 96%rename from Ghidra/RuntimeScripts/Linux/support/pyghidraRunrename to Ghidra/RuntimeScripts/support/pyghidraRunindex ab3ff36035..a58a1aad37 100755--- a/Ghidra/RuntimeScripts/Linux/support/pyghidraRun+++ b/Ghidra/RuntimeScripts/support/pyghidraRun@@ -27,7 +27,7 @@ DEV_ARG=INSTALL_DIR="${SCRIPT_DIR}/.."if [ ! -d "${INSTALL_DIR}/Ghidra" ]; thenDEV_ARG="--dev"- INSTALL_DIR="${SCRIPT_DIR}/../../../.."+ INSTALL_DIR="${SCRIPT_DIR}/../../.."fiPYGHIDRA_LAUNCHER="${INSTALL_DIR}/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py"diff --git a/Ghidra/RuntimeScripts/Windows/support/pyghidraRun.bat b/Ghidra/RuntimeScripts/support/pyghidraRun.batsimilarity index 97%rename from Ghidra/RuntimeScripts/Windows/support/pyghidraRun.batrename to Ghidra/RuntimeScripts/support/pyghidraRun.batindex 28ec04c8fe..fbf815279b 100644--- a/Ghidra/RuntimeScripts/Windows/support/pyghidraRun.bat+++ b/Ghidra/RuntimeScripts/support/pyghidraRun.bat@@ -47,7 +47,7 @@ set "SCRIPT_DIR=%SCRIPT_DIR:~0,-1%"set "INSTALL_DIR=%SCRIPT_DIR%\.."if not exist "%INSTALL_DIR%\Ghidra" (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.pydiff --git a/Ghidra/RuntimeScripts/Linux/support/sleigh b/Ghidra/RuntimeScripts/support/sleighsimilarity index 100%rename from Ghidra/RuntimeScripts/Linux/support/sleighrename to Ghidra/RuntimeScripts/support/sleighdiff --git a/Ghidra/RuntimeScripts/Windows/support/sleigh.bat b/Ghidra/RuntimeScripts/support/sleigh.batsimilarity index 100%rename from Ghidra/RuntimeScripts/Windows/support/sleigh.batrename to Ghidra/RuntimeScripts/support/sleigh.batdiff --git a/GhidraBuild/LaunchSupport/src/main/java/ghidra/launch/AppConfig.java b/GhidraBuild/LaunchSupport/src/main/java/ghidra/launch/AppConfig.javaindex fe3a999558..9760e5c724 100644--- a/GhidraBuild/LaunchSupport/src/main/java/ghidra/launch/AppConfig.java+++ b/GhidraBuild/LaunchSupport/src/main/java/ghidra/launch/AppConfig.java@@ -373,7 +373,7 @@ public class AppConfig {// Get the required launch properties fileFile launchPropertiesFile = new File(installDir,- (isDev ? "Ghidra/RuntimeScripts/Common/" : "") + "support/" + LAUNCH_PROPERTIES_NAME);+ (isDev ? "Ghidra/RuntimeScripts/" : "") + "support/" + LAUNCH_PROPERTIES_NAME);if (!launchPropertiesFile.isFile()) {throw new FileNotFoundException("Launch properties file does not exist: " + launchPropertiesFile);diff --git a/gradle/root/distribution.gradle b/gradle/root/distribution.gradleindex f9816e4637..19fc78a075 100644--- a/gradle/root/distribution.gradle+++ b/gradle/root/distribution.gradle@@ -19,8 +19,8 @@ import org.apache.tools.ant.filters.** distribution.gradle** This contains gradle tasks for packaging Ghidra artifacts for distribution. To- * run a full distribution, execute the buildGhidra task. This will build for the- * current platform only. Add -PallPlatforms to build a multiplatform build.+ * run a full distribution, execute the buildGhidra task. This will build native+ * components for the current platform only.**********************************************************************************/@@ -645,12 +645,9 @@ task assembleAll() {dependsOn assembleDistributiondependsOn assembleSourcedependsOn assembleMarkdownToHtml- dependsOn "assembleDistribution_$currentPlatform"-- if (project.hasProperty("allPlatforms")) {- project.PLATFORMS.each { platform ->- dependsOn ":assembleDistribution_${platform.name}"- }++ project.PLATFORMS.each { platform ->+ dependsOn ":assembleDistribution_${platform.name}"}doFirst {@@ -681,12 +678,8 @@ task createInstallationZip(type: Zip) { t ->dependsOn assembleAll- if (project.hasProperty("allPlatforms")) {- archiveFileName = "${ZIP_NAME_PREFIX}.zip"- }- else {- archiveFileName = "${ZIP_NAME_PREFIX}_${currentPlatform}.zip"- }+ archiveFileName = "${ZIP_NAME_PREFIX}.zip"+destinationDirectory = DISTRIBUTION_DIR// Make sure that we don't try to copy the same file with the same path.diff --git a/gradle/root/usage.gradle b/gradle/root/usage.gradleindex b933b6473a..d63f6a546f 100644--- a/gradle/root/usage.gradle+++ b/gradle/root/usage.gradle@@ -37,9 +37,6 @@ Primary gradle tasks for Ghidraeclipse Create eclipse projects [root/eclipse.gradle]buildHelp Builds help [root/buildHelp.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:buildNatives[_platform] Builds the native executables and libraries for the [GPL/nativeBuildProperties.gradle]diff --git a/gradlew b/gradlewindex 72670208f6..1173c4281a 100755--- a/gradlew+++ b/gradlew@@ -121,7 +121,7 @@ if [ -f "${APP_HOME}/gradle-wrapper.jar" ]; thenGHIDRA_HOME="${APP_HOME}/../.."else# 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}"fidiff --git a/gradlew.bat b/gradlew.batindex 0ec7be38a3..70c2204d03 100644--- a/gradlew.bat+++ b/gradlew.bat@@ -80,7 +80,7 @@ if exist "%APP_HOME%\gradle-wrapper.jar" (set "GHIDRA_HOME=%APP_HOME%..\..\") else (@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%")