From 9311d0692285e3dfd13f49ee6d4789ec6e83b463 Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Fri, 29 May 2026 04:52:58 -0400 Subject: [PATCH] GP-6839: Always do "multi-platform" build --- .../src/main/java/ghidra/GhidraGo.java | 4 +- .../ghidra/server/remote/GhidraServer.java | 2 +- .../src/main/py/src/pyghidra/launcher.py | 4 +- .../PyGhidra/support/pyghidra_launcher.py | 2 +- Ghidra/RuntimeScripts/build.gradle | 51 ++++------------ Ghidra/RuntimeScripts/certification.manifest | 56 +++++++++--------- Ghidra/RuntimeScripts/{Linux => }/ghidraRun | 0 .../{Windows => }/ghidraRun.bat | 0 .../{Linux => }/server/ghidraSvr | 6 +- .../{Windows => }/server/ghidraSvr.bat | 4 +- .../{Common => }/server/jaas.conf | 0 .../server/jaas_external_program.example.sh | 0 .../{Common => }/server/server.conf | 3 +- .../{Linux => }/server/svrAdmin | 8 +-- .../{Windows => }/server/svrAdmin.bat | 9 --- .../{Linux => }/server/svrInstall | 0 .../{Windows => }/server/svrInstall.bat | 0 .../{Common => }/server/svrREADME.md | 0 .../{Linux => }/server/svrUninstall | 0 .../{Windows => }/server/svrUninstall.bat | 0 .../{Linux => }/support/GhidraGo/ghidraGo | 0 .../support/GhidraGo/ghidraGo.bat | 0 .../support/GhidraGo/ghidraGoREADME.html | 0 .../support/README_createPdbXmlFiles.txt | 0 .../{Linux => }/support/analyzeHeadless | 0 .../{Windows => }/support/analyzeHeadless.bat | 0 .../support/analyzeHeadlessREADME.md | 0 .../RuntimeScripts/{Linux => }/support/bsim | 0 .../{Windows => }/support/bsim.bat | 0 .../{Linux => }/support/bsim_ctl | 0 .../support/buildExtension.gradle | 0 .../{Linux => }/support/buildGhidraJar | 0 .../{Windows => }/support/buildGhidraJar.bat | 0 .../support/buildGhidraJarREADME.txt | 0 .../{Linux => }/support/convertStorage | 0 .../{Windows => }/support/convertStorage.bat | 0 .../support/createPdbXmlFiles.bat | 2 +- .../{Common => }/support/debug.log4j.xml | 0 .../{Windows => }/support/ghidra.ico | Bin .../{Linux => }/support/ghidraClean | 0 .../{Windows => }/support/ghidraClean.bat | 0 .../{Linux => }/support/ghidraDebug | 0 .../{Windows => }/support/ghidraDebug.bat | 0 .../support/gradle/gradle-wrapper.jar | Bin .../support/gradle/gradle-wrapper.properties | 0 .../support/gradle/settings.gradle | 0 .../{Linux => }/support/jshellRun | 0 .../{Windows => }/support/jshellRun.bat | 0 .../{Windows => }/support/launch.bat | 6 +- .../{Common => }/support/launch.properties | 0 .../{Linux => }/support/launch.sh | 6 +- .../{Linux => }/support/pyghidraRun | 2 +- .../{Windows => }/support/pyghidraRun.bat | 2 +- .../RuntimeScripts/{Linux => }/support/sleigh | 0 .../{Windows => }/support/sleigh.bat | 0 .../main/java/ghidra/launch/AppConfig.java | 2 +- gradle/root/distribution.gradle | 21 +++---- gradle/root/usage.gradle | 3 - gradlew | 2 +- gradlew.bat | 2 +- 60 files changed, 74 insertions(+), 123 deletions(-) rename Ghidra/RuntimeScripts/{Linux => }/ghidraRun (100%) rename Ghidra/RuntimeScripts/{Windows => }/ghidraRun.bat (100%) rename Ghidra/RuntimeScripts/{Linux => }/server/ghidraSvr (98%) rename Ghidra/RuntimeScripts/{Windows => }/server/ghidraSvr.bat (98%) rename Ghidra/RuntimeScripts/{Common => }/server/jaas.conf (100%) rename Ghidra/RuntimeScripts/{Common => }/server/jaas_external_program.example.sh (100%) rename Ghidra/RuntimeScripts/{Common => }/server/server.conf (99%) rename Ghidra/RuntimeScripts/{Linux => }/server/svrAdmin (92%) rename Ghidra/RuntimeScripts/{Windows => }/server/svrAdmin.bat (93%) rename Ghidra/RuntimeScripts/{Linux => }/server/svrInstall (100%) rename Ghidra/RuntimeScripts/{Windows => }/server/svrInstall.bat (100%) rename Ghidra/RuntimeScripts/{Common => }/server/svrREADME.md (100%) rename Ghidra/RuntimeScripts/{Linux => }/server/svrUninstall (100%) rename Ghidra/RuntimeScripts/{Windows => }/server/svrUninstall.bat (100%) rename Ghidra/RuntimeScripts/{Linux => }/support/GhidraGo/ghidraGo (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/GhidraGo/ghidraGo.bat (100%) rename Ghidra/RuntimeScripts/{Common => }/support/GhidraGo/ghidraGoREADME.html (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/README_createPdbXmlFiles.txt (100%) rename Ghidra/RuntimeScripts/{Linux => }/support/analyzeHeadless (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/analyzeHeadless.bat (100%) rename Ghidra/RuntimeScripts/{Common => }/support/analyzeHeadlessREADME.md (100%) rename Ghidra/RuntimeScripts/{Linux => }/support/bsim (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/bsim.bat (100%) rename Ghidra/RuntimeScripts/{Linux => }/support/bsim_ctl (100%) rename Ghidra/RuntimeScripts/{Common => }/support/buildExtension.gradle (100%) rename Ghidra/RuntimeScripts/{Linux => }/support/buildGhidraJar (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/buildGhidraJar.bat (100%) rename Ghidra/RuntimeScripts/{Common => }/support/buildGhidraJarREADME.txt (100%) rename Ghidra/RuntimeScripts/{Linux => }/support/convertStorage (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/convertStorage.bat (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/createPdbXmlFiles.bat (98%) rename Ghidra/RuntimeScripts/{Common => }/support/debug.log4j.xml (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/ghidra.ico (100%) rename Ghidra/RuntimeScripts/{Linux => }/support/ghidraClean (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/ghidraClean.bat (100%) rename Ghidra/RuntimeScripts/{Linux => }/support/ghidraDebug (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/ghidraDebug.bat (100%) rename Ghidra/RuntimeScripts/{Common => }/support/gradle/gradle-wrapper.jar (100%) rename Ghidra/RuntimeScripts/{Common => }/support/gradle/gradle-wrapper.properties (100%) rename Ghidra/RuntimeScripts/{Common => }/support/gradle/settings.gradle (100%) rename Ghidra/RuntimeScripts/{Linux => }/support/jshellRun (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/jshellRun.bat (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/launch.bat (97%) rename Ghidra/RuntimeScripts/{Common => }/support/launch.properties (100%) rename Ghidra/RuntimeScripts/{Linux => }/support/launch.sh (97%) rename Ghidra/RuntimeScripts/{Linux => }/support/pyghidraRun (96%) rename Ghidra/RuntimeScripts/{Windows => }/support/pyghidraRun.bat (97%) rename Ghidra/RuntimeScripts/{Linux => }/support/sleigh (100%) rename Ghidra/RuntimeScripts/{Windows => }/support/sleigh.bat (100%) diff --git a/Ghidra/Features/GhidraGo/src/main/java/ghidra/GhidraGo.java b/Ghidra/Features/GhidraGo/src/main/java/ghidra/GhidraGo.java index 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.java index 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.py index 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_dir if 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.py index 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.gradle index 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.manifest index 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/ghidraRun similarity index 100% rename from Ghidra/RuntimeScripts/Linux/ghidraRun rename to Ghidra/RuntimeScripts/ghidraRun diff --git a/Ghidra/RuntimeScripts/Windows/ghidraRun.bat b/Ghidra/RuntimeScripts/ghidraRun.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/ghidraRun.bat rename to Ghidra/RuntimeScripts/ghidraRun.bat diff --git a/Ghidra/RuntimeScripts/Linux/server/ghidraSvr b/Ghidra/RuntimeScripts/server/ghidraSvr similarity index 98% rename from Ghidra/RuntimeScripts/Linux/server/ghidraSvr rename to Ghidra/RuntimeScripts/server/ghidraSvr index 5839ebd9e3..cf19b58f48 100755 --- a/Ghidra/RuntimeScripts/Linux/server/ghidraSvr +++ b/Ghidra/RuntimeScripts/server/ghidraSvr @@ -93,7 +93,7 @@ else OS_DIRNAME="linux64" fi -if [ -d "${SCRIPT_DIR}/../Ghidra" ]; then +if [ -f "${SCRIPT_DIR}/../Ghidra/application.properties" ]; then # Production Environment GHIDRA_HOME="${SCRIPT_DIR}/.." @@ -105,8 +105,8 @@ if [ -d "${SCRIPT_DIR}/../Ghidra" ]; then else # 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.bat similarity index 98% rename from Ghidra/RuntimeScripts/Windows/server/ghidraSvr.bat rename to Ghidra/RuntimeScripts/server/ghidraSvr.bat index 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.conf similarity index 100% rename from Ghidra/RuntimeScripts/Common/server/jaas.conf rename to Ghidra/RuntimeScripts/server/jaas.conf diff --git a/Ghidra/RuntimeScripts/Common/server/jaas_external_program.example.sh b/Ghidra/RuntimeScripts/server/jaas_external_program.example.sh similarity index 100% rename from Ghidra/RuntimeScripts/Common/server/jaas_external_program.example.sh rename to Ghidra/RuntimeScripts/server/jaas_external_program.example.sh diff --git a/Ghidra/RuntimeScripts/Common/server/server.conf b/Ghidra/RuntimeScripts/server/server.conf similarity index 99% rename from Ghidra/RuntimeScripts/Common/server/server.conf rename to Ghidra/RuntimeScripts/server/server.conf index 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=true diff --git a/Ghidra/RuntimeScripts/Linux/server/svrAdmin b/Ghidra/RuntimeScripts/server/svrAdmin similarity index 92% rename from Ghidra/RuntimeScripts/Linux/server/svrAdmin rename to Ghidra/RuntimeScripts/server/svrAdmin index 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.conf OWNER="$(grep '^wrapper.app.account=' "${CONFIG}" | cut -d '=' -f 2)" diff --git a/Ghidra/RuntimeScripts/Windows/server/svrAdmin.bat b/Ghidra/RuntimeScripts/server/svrAdmin.bat similarity index 93% rename from Ghidra/RuntimeScripts/Windows/server/svrAdmin.bat rename to Ghidra/RuntimeScripts/server/svrAdmin.bat index 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 Environment 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 call "%~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/svrInstall similarity index 100% rename from Ghidra/RuntimeScripts/Linux/server/svrInstall rename to Ghidra/RuntimeScripts/server/svrInstall diff --git a/Ghidra/RuntimeScripts/Windows/server/svrInstall.bat b/Ghidra/RuntimeScripts/server/svrInstall.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/server/svrInstall.bat rename to Ghidra/RuntimeScripts/server/svrInstall.bat diff --git a/Ghidra/RuntimeScripts/Common/server/svrREADME.md b/Ghidra/RuntimeScripts/server/svrREADME.md similarity index 100% rename from Ghidra/RuntimeScripts/Common/server/svrREADME.md rename to Ghidra/RuntimeScripts/server/svrREADME.md diff --git a/Ghidra/RuntimeScripts/Linux/server/svrUninstall b/Ghidra/RuntimeScripts/server/svrUninstall similarity index 100% rename from Ghidra/RuntimeScripts/Linux/server/svrUninstall rename to Ghidra/RuntimeScripts/server/svrUninstall diff --git a/Ghidra/RuntimeScripts/Windows/server/svrUninstall.bat b/Ghidra/RuntimeScripts/server/svrUninstall.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/server/svrUninstall.bat rename to Ghidra/RuntimeScripts/server/svrUninstall.bat diff --git a/Ghidra/RuntimeScripts/Linux/support/GhidraGo/ghidraGo b/Ghidra/RuntimeScripts/support/GhidraGo/ghidraGo similarity index 100% rename from Ghidra/RuntimeScripts/Linux/support/GhidraGo/ghidraGo rename to Ghidra/RuntimeScripts/support/GhidraGo/ghidraGo diff --git a/Ghidra/RuntimeScripts/Windows/support/GhidraGo/ghidraGo.bat b/Ghidra/RuntimeScripts/support/GhidraGo/ghidraGo.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/GhidraGo/ghidraGo.bat rename to Ghidra/RuntimeScripts/support/GhidraGo/ghidraGo.bat diff --git a/Ghidra/RuntimeScripts/Common/support/GhidraGo/ghidraGoREADME.html b/Ghidra/RuntimeScripts/support/GhidraGo/ghidraGoREADME.html similarity index 100% rename from Ghidra/RuntimeScripts/Common/support/GhidraGo/ghidraGoREADME.html rename to Ghidra/RuntimeScripts/support/GhidraGo/ghidraGoREADME.html diff --git a/Ghidra/RuntimeScripts/Windows/support/README_createPdbXmlFiles.txt b/Ghidra/RuntimeScripts/support/README_createPdbXmlFiles.txt similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/README_createPdbXmlFiles.txt rename to Ghidra/RuntimeScripts/support/README_createPdbXmlFiles.txt diff --git a/Ghidra/RuntimeScripts/Linux/support/analyzeHeadless b/Ghidra/RuntimeScripts/support/analyzeHeadless similarity index 100% rename from Ghidra/RuntimeScripts/Linux/support/analyzeHeadless rename to Ghidra/RuntimeScripts/support/analyzeHeadless diff --git a/Ghidra/RuntimeScripts/Windows/support/analyzeHeadless.bat b/Ghidra/RuntimeScripts/support/analyzeHeadless.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/analyzeHeadless.bat rename to Ghidra/RuntimeScripts/support/analyzeHeadless.bat diff --git a/Ghidra/RuntimeScripts/Common/support/analyzeHeadlessREADME.md b/Ghidra/RuntimeScripts/support/analyzeHeadlessREADME.md similarity index 100% rename from Ghidra/RuntimeScripts/Common/support/analyzeHeadlessREADME.md rename to Ghidra/RuntimeScripts/support/analyzeHeadlessREADME.md diff --git a/Ghidra/RuntimeScripts/Linux/support/bsim b/Ghidra/RuntimeScripts/support/bsim similarity index 100% rename from Ghidra/RuntimeScripts/Linux/support/bsim rename to Ghidra/RuntimeScripts/support/bsim diff --git a/Ghidra/RuntimeScripts/Windows/support/bsim.bat b/Ghidra/RuntimeScripts/support/bsim.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/bsim.bat rename to Ghidra/RuntimeScripts/support/bsim.bat diff --git a/Ghidra/RuntimeScripts/Linux/support/bsim_ctl b/Ghidra/RuntimeScripts/support/bsim_ctl similarity index 100% rename from Ghidra/RuntimeScripts/Linux/support/bsim_ctl rename to Ghidra/RuntimeScripts/support/bsim_ctl diff --git a/Ghidra/RuntimeScripts/Common/support/buildExtension.gradle b/Ghidra/RuntimeScripts/support/buildExtension.gradle similarity index 100% rename from Ghidra/RuntimeScripts/Common/support/buildExtension.gradle rename to Ghidra/RuntimeScripts/support/buildExtension.gradle diff --git a/Ghidra/RuntimeScripts/Linux/support/buildGhidraJar b/Ghidra/RuntimeScripts/support/buildGhidraJar similarity index 100% rename from Ghidra/RuntimeScripts/Linux/support/buildGhidraJar rename to Ghidra/RuntimeScripts/support/buildGhidraJar diff --git a/Ghidra/RuntimeScripts/Windows/support/buildGhidraJar.bat b/Ghidra/RuntimeScripts/support/buildGhidraJar.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/buildGhidraJar.bat rename to Ghidra/RuntimeScripts/support/buildGhidraJar.bat diff --git a/Ghidra/RuntimeScripts/Common/support/buildGhidraJarREADME.txt b/Ghidra/RuntimeScripts/support/buildGhidraJarREADME.txt similarity index 100% rename from Ghidra/RuntimeScripts/Common/support/buildGhidraJarREADME.txt rename to Ghidra/RuntimeScripts/support/buildGhidraJarREADME.txt diff --git a/Ghidra/RuntimeScripts/Linux/support/convertStorage b/Ghidra/RuntimeScripts/support/convertStorage similarity index 100% rename from Ghidra/RuntimeScripts/Linux/support/convertStorage rename to Ghidra/RuntimeScripts/support/convertStorage diff --git a/Ghidra/RuntimeScripts/Windows/support/convertStorage.bat b/Ghidra/RuntimeScripts/support/convertStorage.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/convertStorage.bat rename to Ghidra/RuntimeScripts/support/convertStorage.bat diff --git a/Ghidra/RuntimeScripts/Windows/support/createPdbXmlFiles.bat b/Ghidra/RuntimeScripts/support/createPdbXmlFiles.bat similarity index 98% rename from Ghidra/RuntimeScripts/Windows/support/createPdbXmlFiles.bat rename to Ghidra/RuntimeScripts/support/createPdbXmlFiles.bat index c0e9b52176..0b7e0a307d 100644 --- a/Ghidra/RuntimeScripts/Windows/support/createPdbXmlFiles.bat +++ b/Ghidra/RuntimeScripts/support/createPdbXmlFiles.bat @@ -35,7 +35,7 @@ REM Production Environment if exist "%GHIDRA_DIR%" goto continue REM Development Environment -set "GHIDRA_DIR=%SCRIPT_DIR%..\..\.." +set "GHIDRA_DIR=%SCRIPT_DIR%..\.." set OS_DIR=build\os :continue diff --git a/Ghidra/RuntimeScripts/Common/support/debug.log4j.xml b/Ghidra/RuntimeScripts/support/debug.log4j.xml similarity index 100% rename from Ghidra/RuntimeScripts/Common/support/debug.log4j.xml rename to Ghidra/RuntimeScripts/support/debug.log4j.xml diff --git a/Ghidra/RuntimeScripts/Windows/support/ghidra.ico b/Ghidra/RuntimeScripts/support/ghidra.ico similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/ghidra.ico rename to Ghidra/RuntimeScripts/support/ghidra.ico diff --git a/Ghidra/RuntimeScripts/Linux/support/ghidraClean b/Ghidra/RuntimeScripts/support/ghidraClean similarity index 100% rename from Ghidra/RuntimeScripts/Linux/support/ghidraClean rename to Ghidra/RuntimeScripts/support/ghidraClean diff --git a/Ghidra/RuntimeScripts/Windows/support/ghidraClean.bat b/Ghidra/RuntimeScripts/support/ghidraClean.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/ghidraClean.bat rename to Ghidra/RuntimeScripts/support/ghidraClean.bat diff --git a/Ghidra/RuntimeScripts/Linux/support/ghidraDebug b/Ghidra/RuntimeScripts/support/ghidraDebug similarity index 100% rename from Ghidra/RuntimeScripts/Linux/support/ghidraDebug rename to Ghidra/RuntimeScripts/support/ghidraDebug diff --git a/Ghidra/RuntimeScripts/Windows/support/ghidraDebug.bat b/Ghidra/RuntimeScripts/support/ghidraDebug.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/ghidraDebug.bat rename to Ghidra/RuntimeScripts/support/ghidraDebug.bat diff --git a/Ghidra/RuntimeScripts/Common/support/gradle/gradle-wrapper.jar b/Ghidra/RuntimeScripts/support/gradle/gradle-wrapper.jar similarity index 100% rename from Ghidra/RuntimeScripts/Common/support/gradle/gradle-wrapper.jar rename to Ghidra/RuntimeScripts/support/gradle/gradle-wrapper.jar diff --git a/Ghidra/RuntimeScripts/Common/support/gradle/gradle-wrapper.properties b/Ghidra/RuntimeScripts/support/gradle/gradle-wrapper.properties similarity index 100% rename from Ghidra/RuntimeScripts/Common/support/gradle/gradle-wrapper.properties rename to Ghidra/RuntimeScripts/support/gradle/gradle-wrapper.properties diff --git a/Ghidra/RuntimeScripts/Common/support/gradle/settings.gradle b/Ghidra/RuntimeScripts/support/gradle/settings.gradle similarity index 100% rename from Ghidra/RuntimeScripts/Common/support/gradle/settings.gradle rename to Ghidra/RuntimeScripts/support/gradle/settings.gradle diff --git a/Ghidra/RuntimeScripts/Linux/support/jshellRun b/Ghidra/RuntimeScripts/support/jshellRun similarity index 100% rename from Ghidra/RuntimeScripts/Linux/support/jshellRun rename to Ghidra/RuntimeScripts/support/jshellRun diff --git a/Ghidra/RuntimeScripts/Windows/support/jshellRun.bat b/Ghidra/RuntimeScripts/support/jshellRun.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/jshellRun.bat rename to Ghidra/RuntimeScripts/support/jshellRun.bat diff --git a/Ghidra/RuntimeScripts/Windows/support/launch.bat b/Ghidra/RuntimeScripts/support/launch.bat similarity index 97% rename from Ghidra/RuntimeScripts/Windows/support/launch.bat rename to Ghidra/RuntimeScripts/support/launch.bat index 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=1 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 diff --git a/Ghidra/RuntimeScripts/Common/support/launch.properties b/Ghidra/RuntimeScripts/support/launch.properties similarity index 100% rename from Ghidra/RuntimeScripts/Common/support/launch.properties rename to Ghidra/RuntimeScripts/support/launch.properties diff --git a/Ghidra/RuntimeScripts/Linux/support/launch.sh b/Ghidra/RuntimeScripts/support/launch.sh similarity index 97% rename from Ghidra/RuntimeScripts/Linux/support/launch.sh rename to Ghidra/RuntimeScripts/support/launch.sh index c4a90c291a..18ad9f0b92 100755 --- a/Ghidra/RuntimeScripts/Linux/support/launch.sh +++ b/Ghidra/RuntimeScripts/support/launch.sh @@ -100,7 +100,7 @@ if [[ "${SUPPORT_DIR}" = *"!"* ]]; then exit 1 fi -if [ -f "${SUPPORT_DIR}/launch.properties" ]; then +if [ -f "${SUPPORT_DIR}/../Ghidra/application.properties" ]; then # Production Environment export INSTALL_DIR="${SUPPORT_DIR}/.." @@ -110,7 +110,7 @@ if [ -f "${SUPPORT_DIR}/launch.properties" ]; then else # 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 @@ else exit 1 fi fi - 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 first diff --git a/Ghidra/RuntimeScripts/Linux/support/pyghidraRun b/Ghidra/RuntimeScripts/support/pyghidraRun similarity index 96% rename from Ghidra/RuntimeScripts/Linux/support/pyghidraRun rename to Ghidra/RuntimeScripts/support/pyghidraRun index 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" ]; then DEV_ARG="--dev" - INSTALL_DIR="${SCRIPT_DIR}/../../../.." + INSTALL_DIR="${SCRIPT_DIR}/../../.." fi PYGHIDRA_LAUNCHER="${INSTALL_DIR}/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py" diff --git a/Ghidra/RuntimeScripts/Windows/support/pyghidraRun.bat b/Ghidra/RuntimeScripts/support/pyghidraRun.bat similarity index 97% rename from Ghidra/RuntimeScripts/Windows/support/pyghidraRun.bat rename to Ghidra/RuntimeScripts/support/pyghidraRun.bat index 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.py diff --git a/Ghidra/RuntimeScripts/Linux/support/sleigh b/Ghidra/RuntimeScripts/support/sleigh similarity index 100% rename from Ghidra/RuntimeScripts/Linux/support/sleigh rename to Ghidra/RuntimeScripts/support/sleigh diff --git a/Ghidra/RuntimeScripts/Windows/support/sleigh.bat b/Ghidra/RuntimeScripts/support/sleigh.bat similarity index 100% rename from Ghidra/RuntimeScripts/Windows/support/sleigh.bat rename to Ghidra/RuntimeScripts/support/sleigh.bat diff --git a/GhidraBuild/LaunchSupport/src/main/java/ghidra/launch/AppConfig.java b/GhidraBuild/LaunchSupport/src/main/java/ghidra/launch/AppConfig.java index 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 file File 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.gradle index 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 assembleDistribution dependsOn assembleSource dependsOn 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.gradle index b933b6473a..d63f6a546f 100644 --- a/gradle/root/usage.gradle +++ b/gradle/root/usage.gradle @@ -37,9 +37,6 @@ Primary gradle tasks for Ghidra eclipse 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/gradlew index 72670208f6..1173c4281a 100755 --- a/gradlew +++ b/gradlew @@ -121,7 +121,7 @@ if [ -f "${APP_HOME}/gradle-wrapper.jar" ]; then GHIDRA_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}" fi diff --git a/gradlew.bat b/gradlew.bat index 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%" )