mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-19 16:40:38 -09:00
GP-1106: Platform naming convention now supports different
architectures. Support for building on ARM.
This commit is contained in:
@@ -98,27 +98,27 @@ rootProject.assembleDistribution {
|
||||
}
|
||||
|
||||
// copy os specific files for each platform
|
||||
rootProject.OS_NAMES.each { platform ->
|
||||
rootProject.tasks.findAll {it.name == "assembleDistribution_$platform"}.each { t ->
|
||||
rootProject.PLATFORMS.each { platform ->
|
||||
rootProject.tasks.findAll {it.name == "assembleDistribution_${platform.name}"}.each { t ->
|
||||
|
||||
def p = this.project
|
||||
|
||||
// the getZipPath calls here are not in closures because we are already in a taskGraph.whenReady closure
|
||||
t.from (p.projectDir.toString() + "/build/os/$platform") {
|
||||
t.from (p.projectDir.toString() + "/build/os/${platform.name}") {
|
||||
exclude '*.lib'
|
||||
exclude '*.exp'
|
||||
into getZipPath(p) + "/os/$platform"
|
||||
into getZipPath(p) + "/os/${platform.name}"
|
||||
}
|
||||
t.from (p.projectDir.toString() + "/os/$platform") {
|
||||
into getZipPath(p) + "/os/$platform"
|
||||
t.from (p.projectDir.toString() + "/os/${platform.name}") {
|
||||
into getZipPath(p) + "/os/${platform.name}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For Win64 build, we have to also include any Win32 binaries in the final zip.
|
||||
rootProject.assembleDistribution_win64 {
|
||||
from (this.project.projectDir.toString() + "/build/os/win32") {
|
||||
into getZipPath(this.project) + "/os/win32"
|
||||
// For win_x86_64 build, we have to also include any win_x86_32 binaries in the final zip.
|
||||
rootProject.assembleDistribution_win_x86_64 {
|
||||
from (this.project.projectDir.toString() + "/build/os/win_x86_32") {
|
||||
into getZipPath(this.project) + "/os/win_x86_32"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,10 +204,9 @@ plugins.withType(JavaPlugin) {
|
||||
// Native
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
plugins.withType(CPlugin) {
|
||||
rootProject.OS_NAMES.each { platform ->
|
||||
rootProject.tasks.findAll {it.name == "assembleDistribution_$platform"}.each { t ->
|
||||
rootProject.PLATFORMS.each { platform ->
|
||||
rootProject.tasks.findAll {it.name == "assembleDistribution_${platform.name}"}.each { t ->
|
||||
t.dependsOn this.assemble
|
||||
// t.dependsOn this.project.name+":buildNatives_$platform"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,8 +364,8 @@ task assembleDistribution (type: Copy) {
|
||||
* these have already been built and are located in the proper location.
|
||||
*
|
||||
*********************************************************************************/
|
||||
project.OS_NAMES.each { platform ->
|
||||
task ("assembleDistribution_$platform", type: Copy ) {
|
||||
project.PLATFORMS.each { platform ->
|
||||
task ("assembleDistribution_${platform.name}", type: Copy ) {
|
||||
|
||||
// delete the gradle ziptree temp directory because of gradle bug not cleaning up its temp files.
|
||||
delete rootProject.file("build/tmp/expandedArchives")
|
||||
@@ -480,10 +480,9 @@ task createInstallationZip(type: Zip) { t ->
|
||||
dependsOn "assembleDistribution_$currentPlatform"
|
||||
|
||||
if (project.hasProperty("allPlatforms")) {
|
||||
dependsOn ":assembleDistribution_win32"
|
||||
dependsOn ":assembleDistribution_win64"
|
||||
dependsOn ":assembleDistribution_linux64"
|
||||
dependsOn ":assembleDistribution_osx64"
|
||||
project.PLATFORMS.each { platform ->
|
||||
dependsOn ":assembleDistribution_${platform.name}"
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("allPlatforms")) {
|
||||
|
||||
@@ -42,9 +42,9 @@ Primary gradle tasks for Ghidra
|
||||
|
||||
Task rules:
|
||||
buildNatives_[platform] builds the native executables and libraries for the
|
||||
specified platform (win64, linux64, osx64, etc.) [nativeProject.gradle]
|
||||
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]
|
||||
specified platform and copies results to bin repo. [nativeProject.gradle]
|
||||
|
||||
"""
|
||||
}
|
||||
|
||||
@@ -118,9 +118,9 @@ task zipExtensions (type: Zip) {
|
||||
/////////////////
|
||||
// NATIVES
|
||||
/////////////////
|
||||
project.OS_NAMES.each { platform ->
|
||||
from (p.projectDir.toString() + "/os/$platform") {
|
||||
into { getBaseProjectName(p) + "/os/$platform" }
|
||||
project.PLATFORMS.each { platform ->
|
||||
from (p.projectDir.toString() + "/os/${platform.name}") {
|
||||
into { getBaseProjectName(p) + "/os/${platform.name}" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user