From 18508736c2d59476421b6e8af7e7497cae1aa0ca Mon Sep 17 00:00:00 2001
From: ghidra1
Date: Thu, 16 May 2024 11:37:37 -0400
Subject: [PATCH] GP-3240 InstallationGuide update and minimum python version
3.9.
---
.../framework/OSFileNotFoundException.java | 2 +-
GhidraDocs/InstallationGuide.html | 59 +++++++++++++------
build.gradle | 6 +-
3 files changed, 44 insertions(+), 23 deletions(-)
diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/OSFileNotFoundException.java b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/OSFileNotFoundException.java
index d552f95ada..16b8a0408c 100644
--- a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/OSFileNotFoundException.java
+++ b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/OSFileNotFoundException.java
@@ -34,7 +34,7 @@ public class OSFileNotFoundException extends FileNotFoundException {
* @param fileName The file name associated with this exception, from the given module
*/
public OSFileNotFoundException(Platform platform, String moduleName, String fileName) {
- super(String.format("%sos/%s/%s does not exist", moduleName != null ? moduleName + "/" : "",
+ super(String.format("%sos/%s/%s does not exist (see InstallationGuide.html, 'Building Native Components')", moduleName != null ? moduleName + "/" : "",
platform.getDirectoryName(), fileName));
this.platform = platform;
}
diff --git a/GhidraDocs/InstallationGuide.html b/GhidraDocs/InstallationGuide.html
index 3a9b217e8e..ee24ebdbe2 100644
--- a/GhidraDocs/InstallationGuide.html
+++ b/GhidraDocs/InstallationGuide.html
@@ -3,14 +3,15 @@
Ghidra Installation Guide
@@ -31,7 +32,7 @@ future releases.
Java Notes
Ghidra Installation Directory Layout
- Building Ghidra Native Components
+ Building Native Components
Installing the Debuggers' Python Dependencies
Running Ghidra
@@ -67,7 +68,7 @@ future releases.
Platforms Supported
- - Windows 7 or later (64-bit)
+ - Windows 10 or later (x86 64-bit)
- Linux (64-bit)
- macOS 10.13 or later
@@ -97,9 +98,11 @@ Ghidra team if you have a specific need.
- Python 3.9 or later (for Debugger support)
+ Python3 (3.9 to 3.12; for Debugger support)
- - This is available from Python.org or most operating system's app stores or software repositories.
+ - This is available from Python.org or most operating system's
+ app stores or software repositories. For Linux it is recommended that the system's package
+ repository be used to install a suitable version of Python.
(Back to Top)
@@ -308,11 +311,13 @@ is complete.
(Back to Top)
-Building Ghidra Native Components
+Building Native Components
Ghidra requires several native binaries to be present in order to successfully run. An official
-Ghidra release includes native binaries for the following platforms:
+public Ghidra release includes native binaries for the following platforms.
+
+NOTE: For some non-public Ghidra releases macOS natives may be omitted.
- - Windows x86 64-bit
+ - Windows 10 or later, x86 64-bit
- Linux x86 64-bit
- macOS x86 64-bit
- macOS ARM 64-bit
@@ -324,22 +329,38 @@ Ghidra release includes native binaries for the following platforms:
- FreeBSD x86 64-bit (no debugger support)
- FreeBSD ARM 64-bit (no debugger support)
-In order to build native binaries for your platform, you will need the following installed on your
+
For supported systems where native binaries have not been supplied, or those that are supplied
+fail to run properly, it may be neccessary to build the native Ghidra binaries.
+In order to build native binaries for your platform, you will need the following installed on your
system:
- A supported version of a Java Development Kit
- Gradle 7.3+
- - make, gcc, and g++ (Linux/macOS/FreeBSD-only)
- -
- Microsoft Visual Studio
- 2017 or later, or
- Microsoft C++ Build Tools with the following components installed (Windows-only):
+
- Software C/C++ build tools and library packages
+
+ - macOS: Xcode or the abbreviated Command Line Tools for Xcode will supply the
+ necessary build tools. Assuming you are connected to the Internet, Xcode
+ (which includes the command tools) may be installed directly from the App Store
+ while Command Line Tools for Xcode may be installed using the following command:
+
xcode-select --install
+ - Linux/FreeBSD: the 64-bit versions of the following packages should installed:
- - MSVC
- - Windows SDK
- - C++ ATL
+ - gcc 8.5 or later
+ - gcc-c++ / g++ 8.5 or later
+ - make
-
+
+ - Windows:
+ Microsoft Visual Studio
+ 2017 or later, or
+ Microsoft C++ Build Tools with the following components installed:
+
+ - MSVC
+ - Windows SDK
+ - C++ ATL
+
+
+
To build the native binaries for your current platform, execute the following script:
<GhidraInstallDir>/support/buildNatives(.bat)
diff --git a/build.gradle b/build.gradle
index 75a2acf404..397cb1d27f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -48,7 +48,7 @@ if ("32".equals(System.getProperty("sun.arch.data.model"))) {
/***************************************************************************************
* Identify supported Python command
***************************************************************************************/
-project.ext.SUPPORTED_PY_VERSIONS = ['3.12', '3.11', '3.10', '3.9', '3.8', '3.7']
+project.ext.SUPPORTED_PY_VERSIONS = ['3.12', '3.11', '3.10', '3.9']
project.ext.PYTHON3 = findPython3()
/*********************************************************************************
@@ -213,10 +213,10 @@ def findPython3() {
}
}
// Don't fail until task execution. Just let "python3" fail.
- // Force use of non-existent python3.7 instead of unsupported python version
+ // Force use of non-existent python3.9 instead of unsupported python version
// which should fail if a python build is performed.
println("Warning: Python3 command not found (required for build)")
- return 'python3.7'
+ return 'python3.9'
}
/******************************************************************************************