Skip to content

Commit

Permalink
output GHIDRA_INSTALL_DIR during build; update documentation (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-hunhoff authored Jan 11, 2023
1 parent fe5fcb1 commit d55e078
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Use the following steps to build Ghidrathon for your environment:
* Download the latest Ghidrathon source release from [here](https://github.com/mandiant/Ghidrathon/releases)
* Run the following command from the Ghidrathon source directory:
* **Note:** Ghidrathon defaults to the Python binary found in your path. You can specify a different Python binary by adding the optional argument `-PPYTHON_BIN=<absolute path to Python binary>` to the command below
* **Note:** you may optionally set an environment variable named `GHIDRA_INSTALL_DIR` instead of specifying `-PGHIDRA_INSTALL_DIR`

```
$ gradle -PGHIDRA_INSTALL_DIR=<absolute path to Ghidra install>
Expand Down
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ tasks.matching { it.name != 'copyJepNativeBinaries' && it.name != 'installJep' }
//----------------------START "DO NOT MODIFY" SECTION------------------------------
def ghidraInstallDir

if (System.env.GHIDRA_INSTALL_DIR) {
ghidraInstallDir = System.env.GHIDRA_INSTALL_DIR
}
else if (project.hasProperty("GHIDRA_INSTALL_DIR")) {
if (project.hasProperty("GHIDRA_INSTALL_DIR")) {
ghidraInstallDir = project.getProperty("GHIDRA_INSTALL_DIR")
}
else if (System.env.GHIDRA_INSTALL_DIR) {
ghidraInstallDir = System.env.GHIDRA_INSTALL_DIR
}

project.logger.lifecycle("Using Ghidra install directory " + ghidraInstallDir)

if (ghidraInstallDir) {
apply from: new File(ghidraInstallDir).getCanonicalPath() + "/support/buildExtension.gradle"
Expand Down

0 comments on commit d55e078

Please sign in to comment.