Skip to content

Ghidra is a software reverse engineering (SRE) framework

Corrected GPL build issues

ghidra13b999fd86edd
diff --git a/GPL/CabExtract/build.gradle b/GPL/CabExtract/build.gradle
index 2102603488..df8dadbc0a 100644
--- a/GPL/CabExtract/build.gradle
+++ b/GPL/CabExtract/build.gradle
@@ -1,3 +1,12 @@
+
+if (findProject(':Generic') != null) {
+ apply from: "$rootProject.projectDir/gradle/nativeProject.gradle"
+ apply from: "$rootProject.projectDir/gradle/distributableGPLModule.gradle"
+}
+else {
+ apply from: "../nativeBuildProperties.gradle"
+}
+
apply plugin: 'eclipse'
eclipse.project.name = 'GPL CabExtract'
diff --git a/GPL/DMG/build.gradle b/GPL/DMG/build.gradle
index aa0e6862d9..a4641375b4 100644
--- a/GPL/DMG/build.gradle
+++ b/GPL/DMG/build.gradle
@@ -1,4 +1,20 @@
-apply plugin: 'java'
+if (findProject(':Generic') != null) {
+ apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
+ apply from: "$rootProject.projectDir/gradle/distributableGPLModule.gradle"
+
+ rootProject.assembleDistribution {
+
+ doLast {
+ // eliminate standard module lib directory
+ def assemblePath = destinationDir.path + "/" + getZipPath(this.project)
+ println "DELETE: ${assemblePath}/lib"
+ delete assemblePath + "/lib"
+ }
+ }
+}
+else {
+ apply plugin: 'java'
+}
apply plugin: 'eclipse'
eclipse.project.name = 'GPL DMG'
@@ -33,15 +49,15 @@ dependencies {
* Task to create the dmg.jar file
*
***************************************************************************************/
-task dmgJar(type: Jar) {
- from sourceSets.dmg.output
- destinationDir = file("build/data/lib")
- baseName = 'dmg'
-}
+//task dmgJar(type: Jar) {
+// from sourceSets.dmg.output
+// destinationDir = file("build/data/lib")
+// baseName = 'dmg'
+//}
jar {
+ destinationDir = file("build/data/lib")
doLast {
- File f = file("build/libs/DMG.jar")
delete "build/libs"
}
}
@@ -51,6 +67,6 @@ jar {
* plugin the jar task into global task for building and zipping contribs
*
***************************************************************************************/
-assemble.dependsOn dmgJar
+//assemble.dependsOn dmgJar
diff --git a/GPL/DemanglerGnu/build.gradle b/GPL/DemanglerGnu/build.gradle
index b3735e4dc3..dcf5d036bb 100644
--- a/GPL/DemanglerGnu/build.gradle
+++ b/GPL/DemanglerGnu/build.gradle
@@ -1,9 +1,15 @@
-apply plugin: 'eclipse'
-eclipse.project.name = 'GPL DemanglerGnu'
+if (findProject(':Generic') != null) {
+ apply from: "$rootProject.projectDir/gradle/nativeProject.gradle"
+ apply from: "$rootProject.projectDir/gradle/distributableGPLModule.gradle"
+}
+else {
+ apply from: "../nativeBuildProperties.gradle"
+}
-apply from: "../nativeBuildProperties.gradle"
+apply plugin: 'eclipse'
+eclipse.project.name = 'GPL DemanglerGnu'
/****************************************************************************
* Defines the platforms we have to support in Ghidra. This model is used
diff --git a/GPL/build.gradle b/GPL/build.gradle
index 319fb82242..0158d7a889 100644
--- a/GPL/build.gradle
+++ b/GPL/build.gradle
@@ -1,4 +1,5 @@
project.ext.BIN_REPO = file("${projectDir}/../../ghidra.bin").absolutePath
+
project.ext.set("OS_NAMES", ["osx64", "win32", "win64", "linux64"])
/*********************************************************************************
diff --git a/gradle/certification.manifest b/gradle/certification.manifest
index b7a86e2f74..bf7e957f08 100644
--- a/gradle/certification.manifest
+++ b/gradle/certification.manifest
@@ -1,5 +1,6 @@
##VERSION: 2.0
README.txt||GHIDRA||||END|
+distributableGPLModule.gradle||GHIDRA||||END|
distributableGhidraExtension.gradle||GHIDRA||||END|
distributableGhidraModule.gradle||GHIDRA||||END|
externalGhidraExtension.gradle||GHIDRA||||END|
diff --git a/gradle/distributableGPLModule.gradle b/gradle/distributableGPLModule.gradle
new file mode 100644
index 0000000000..a7a8e8b6c7
--- /dev/null
+++ b/gradle/distributableGPLModule.gradle
@@ -0,0 +1,13 @@
+apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
+
+rootProject.assembleDistribution {
+ def p = this.project
+
+ def zipPath = getZipPath(p)
+
+ from (p.projectDir.toString()) {
+ exclude "bin"
+ exclude "build"
+ into { zipPath }
+ }
+}
diff --git a/gradle/root/distribution.gradle b/gradle/root/distribution.gradle
index 5d324c13da..753591941e 100644
--- a/gradle/root/distribution.gradle
+++ b/gradle/root/distribution.gradle
@@ -172,14 +172,16 @@ task assembleDistribution (type: Copy) {
exclude "**/.settings/**"
/////////////////////////////
- // COPY all GPL code
+ // COPY all GPL support files
+ // (modules with build.gradle handled separately)
/////////////////////////////
from (ROOT_PROJECT_DIR + "/GPL") {
- exclude "*/bin"
- exclude "*/build"
+ include "*.*"
+ include "Icons/**"
+ include "licenses/**"
into "GPL"
}
-
+
//////////////////////////////
// LGPL SOURCE INCLUSION
//////////////////////////////
@@ -420,9 +422,9 @@ task createInstallationZip(type: Zip) { t ->
updateSlaFilesTimestamp(DISTRIBUTION_DIR.getPath(), 2)
}
- doLast {
- delete file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
- }
+// doLast {
+// delete file(DISTRIBUTION_DIR.getPath() + "/" + ZIP_DIR_PREFIX)
+// }
}