Skip to content

Commit

Permalink
Merge remote-tracking branch
Browse files Browse the repository at this point in the history
'origin/GP-4486_ryanmkurtz_gradle-wrapper--SQUASHED' (Closes #455)
  • Loading branch information
ryanmkurtz committed Jul 3, 2024
2 parents d589234 + 78aadd0 commit 937191c
Show file tree
Hide file tree
Showing 13 changed files with 457 additions and 100 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ Release
*.iml
.idea

# Ignore gradle wrapper files
gradle/wrapper
gradlew
gradlew.*

# Ignore logs and core dumps
*.log
core.*
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 12 additions & 0 deletions Ghidra/RuntimeScripts/Common/support/gradle/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* ###
* IP: Public Domain
*/
// Recurse root project subdirectories and include all discovered projects
// (directories containing a build.gradle file)
fileTree(rootProject.projectDir.parentFile.parentFile) {
exclude 'build.gradle' // exclude root project
include '**/build.gradle'
}.each {
include it.parentFile.name;
project(":$it.parentFile.name").projectDir = it.parentFile;
}
41 changes: 0 additions & 41 deletions Ghidra/RuntimeScripts/Linux/support/buildNatives

This file was deleted.

39 changes: 0 additions & 39 deletions Ghidra/RuntimeScripts/Windows/support/buildNatives.bat

This file was deleted.

4 changes: 4 additions & 0 deletions Ghidra/RuntimeScripts/certification.manifest
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
##VERSION: 2.0
##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.html||GHIDRA||||END|
Common/support/GhidraGo/ghidraGoREADME.html||GHIDRA||||END|
Common/support/analyzeHeadlessREADME.html||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|
Expand Down
23 changes: 19 additions & 4 deletions GhidraDocs/InstallationGuide.html
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,10 @@ <h2><a name="Build"></a>Building Native Components</h2>
system:</p>
<ul>
<li>A <a href="#Requirements">supported</a> version of a Java Development Kit</li>
<li><a href="https://gradle.org/releases/">Gradle 8.5+</a></li>
<li><a href="https://gradle.org/releases/">Gradle 8.5+</a> (or supplied Gradle wrapper with
Internet connection)
</li>

<li>Software C/C++ build tools and library packages</li>
<ul>
<li>macOS: <I>Xcode</I> or the abbreviated <I>Command Line Tools for Xcode</I> will supply the
Expand All @@ -355,9 +358,21 @@ <h2><a name="Build"></a>Building Native Components</h2>
</li>
</ul>
</ul>
<p>To build the native binaries for your current platform, execute the following script:</p>
<pre><blockquote><i>&lt;GhidraInstallDir&gt;</i>/support/buildNatives(.bat)</i></blockquote></pre>
<p>When this script successfully completes, Ghidra will contain newly built native binaries in
<p>To build the native binaries for your current platform, execute the following commands:</p>
<blockquote>
<pre>
<i>cd &lt;GhidraInstallDir&gt;</i>/support/gradle/
gradle buildNatives
</pre>
</blockquote>
<p>If you are connected to the Internet and do not have Gradle installed, execute:</p>
<blockquote>
<pre>
<i>cd &lt;GhidraInstallDir&gt;</i>/support/gradle/
./gradlew(.bat) buildNatives
</pre>
</blockquote>
<p>When the commands successfully complete, Ghidra will contain newly built native binaries in
the relevant modules' <i>build/os/&lt;platform&gt;/</i> subdirectories, which will override any
existing pre-built native binaries in the <i>os/&lt;platform&gt;/</i> subdirectories.</p>
<p>(<a href="#top">Back to Top</a>)</p>
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To create the latest development build for your platform from this source reposi

##### Install build tools:
* [JDK 21 64-bit][jdk]
* [Gradle 8.5+][gradle]
* [Gradle 8.5+][gradle] (or provided Gradle wrapper if Internet connection is available)
* [Python3][python3] (version 3.7 to 3.12) with bundled pip
* make, gcc, and g++ (Linux/macOS-only)
* [Microsoft Visual Studio][vs] 2017+ or [Microsoft C++ Build Tools][vcbuildtools] with the
Expand All @@ -65,7 +65,9 @@ cd ghidra-master
**NOTE:** Instead of downloading the compressed source, you may instead want to clone the GitHub
repository: `git clone https://github.com/NationalSecurityAgency/ghidra.git`

##### Download additional build dependencies into source repository:
##### Download additional build dependencies into source repository:
**NOTE:** If an Internet connection is available and you did not install Gradle, the following
`gradle` commands may be replaced with `./gradle(.bat)`.
```
gradle -I gradle/support/fetchDependencies.gradle init
```
Expand Down
3 changes: 3 additions & 0 deletions certification.local.manifest
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
##VERSION: 2.0
##MODULE IP: Apache License 2.0
.gitattributes||GHIDRA||||END|
.gitignore||GHIDRA||||END|
CONTRIBUTING.md||GHIDRA||||END|
Expand All @@ -9,3 +10,5 @@ NOTICE||GHIDRA||||END|
README.md||GHIDRA||||END|
ghidra.repos.config||GHIDRA||||END|
gradle.properties||GHIDRA||||END|
gradlew||Apache License 2.0||||END|
gradlew.bat||Apache License 2.0||||END|
22 changes: 13 additions & 9 deletions gradle/root/distribution.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,6 @@ task assembleDistribution (type: Copy) {
into "Ghidra/patch"
}

/////////////////////////////////
// Distro native build support
/////////////////////////////////
from (ROOT_PROJECT_DIR + "/GPL") {
include "settings.gradle"
into "Ghidra"
}

/////////////////////////////////
// Eclipse formatters
/////////////////////////////////
Expand Down Expand Up @@ -400,7 +392,19 @@ project.PLATFORMS.each { platform ->
// Make sure that we don't try to copy the same file with the same path into the
// zip (this can happen!)
duplicatesStrategy 'exclude'


/////////////////////////////////
// Gradle Wrapper
/////////////////////////////////
from (ROOT_PROJECT_DIR) {
if (isLinux(platform.name) || isMac(platform.name)) {
include "gradlew"
}
if (isWindows(platform.name)) {
include "gradlew.bat"
}
into "support/gradle"
}
}
}

Expand Down
Loading

0 comments on commit 937191c

Please sign in to comment.