mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Merge remote-tracking branch
'origin/GP-1209_ryanmkurtz_PR-3387_ryanmkurtz_native-release-builds--SQUASHED' (Closes #3387)
This commit is contained in:
@@ -19,10 +19,28 @@
|
||||
|
||||
A gradle project can add native code support by including the following it its build.gradle file:
|
||||
|
||||
apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
|
||||
apply from: "$rootProject.projectDir/gradle/nativeProject.gradle"
|
||||
*****************************************************************************************/
|
||||
|
||||
// These same settings are needed in the GPL native, so rather than duplicating this file, we will just call the other file
|
||||
|
||||
def projectRootDir = rootProject.projectDir.path
|
||||
apply from: "$projectRootDir/GPL/nativeBuildProperties.gradle"
|
||||
|
||||
// Include and rename native projects' buildNative.gradle files to build.gradle in the distribution
|
||||
// so a user can build or rebuild natives for their specific platform.
|
||||
// NOTE: GPL projects' build.gradle files are already written to build their natives from a release,
|
||||
// so we can just include their build.gradle as as-is.
|
||||
rootProject.assembleDistribution {
|
||||
def p = this.project
|
||||
from (p.projectDir.toString()) {
|
||||
if (p.projectDir.parentFile.name == "GPL") {
|
||||
include "build.gradle"
|
||||
}
|
||||
else {
|
||||
include "buildNatives.gradle"
|
||||
rename "buildNatives.gradle", "build.gradle"
|
||||
}
|
||||
into { getZipPath(p) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,6 +346,15 @@ task assembleDistribution (type: Copy) {
|
||||
from (ROOT_PROJECT_DIR + "/GhidraBuild/patch") {
|
||||
into "Ghidra/patch"
|
||||
}
|
||||
|
||||
/////////////////////////////////
|
||||
// Distro native build support
|
||||
/////////////////////////////////
|
||||
from (ROOT_PROJECT_DIR + "/GPL") {
|
||||
include "settings.gradle"
|
||||
into "Ghidra"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
@@ -34,18 +34,18 @@ Primary gradle tasks for Ghidra
|
||||
|
||||
usage Displays this text [root/usage.gradle]
|
||||
prepDev Prepares development environment [root/prepDev.gradle]
|
||||
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)
|
||||
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
|
||||
specified platform (win_x86_64, linux_arm_64, mac_x86_64, etc.) [nativeProject.gradle]
|
||||
prebuildNatives_[platform] builds the native executables and libraries for the
|
||||
specified platform and copies results to bin repo. [nativeProject.gradle]
|
||||
|
||||
buildNatives[_platform] Builds the native executables and libraries for the [GPL/nativeBuildProperties.gradle]
|
||||
current or specified platform (win_x86_64,
|
||||
linux_arm_64, mac_x86_64, etc.)
|
||||
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ def Map<String, List<String>> getIpForModule(Project p) {
|
||||
exclude ".classpath"
|
||||
exclude "Module.manifest"
|
||||
exclude "build.gradle"
|
||||
exclude "buildNatives.gradle"
|
||||
exclude "**/Misc/Tips.htm"
|
||||
exclude "**/*.sla"
|
||||
exclude "**/.gradle/**"
|
||||
|
||||
Reference in New Issue
Block a user