From 750e6457548b5399628f1086d69c139e12980de8 Mon Sep 17 00:00:00 2001 From: ghidra1 Date: Wed, 12 May 2021 10:44:24 -0400 Subject: [PATCH] GP-934 Corrected DMG build issues --- DevGuide.md | 22 ------------------ GPL/DMG/build.gradle | 4 ++++ GPL/DMG/certification.manifest | 8 +++---- ...combae_csframework.jar => csframework.jar} | Bin .../lib/{catacombae_hfsx.jar => hfsx.jar} | Bin ...combae_hfsx_dmglib.jar => hfsx_dmglib.jar} | Bin ..._iharder-base64.jar => iharder-base64.jar} | Bin gradle/support/fetchDependencies.gradle | 14 ----------- 8 files changed, 8 insertions(+), 40 deletions(-) rename GPL/DMG/data/lib/{catacombae_csframework.jar => csframework.jar} (100%) rename GPL/DMG/data/lib/{catacombae_hfsx.jar => hfsx.jar} (100%) rename GPL/DMG/data/lib/{catacombae_hfsx_dmglib.jar => hfsx_dmglib.jar} (100%) rename GPL/DMG/data/lib/{catacombae_iharder-base64.jar => iharder-base64.jar} (100%) diff --git a/DevGuide.md b/DevGuide.md index 863f09070c..b63a6aff10 100644 --- a/DevGuide.md +++ b/DevGuide.md @@ -55,9 +55,6 @@ You may not need all of these, depending on which portions you are building or d - https://github.com/pxb1988/dex2jar/releases * AXMLPrinter2 - https://code.google.com/archive/p/android4me/downloads -* HFS Explorer. We use version 0.21. - - https://sourceforge.net/projects/catacombae/files/HFSExplorer/0.21/ - - https://github.com/unsound/hfsexplorer/releases (newer versions) * Yet Another Java Service Wrapper. We use version 12.12 - Only to build Ghidra package. - https://sourceforge.net/projects/yajsw/files/yajsw/yajsw-stable-12.12/ * Eclipse PDE - Environment for developing the GhidraDev plugin. @@ -117,16 +114,12 @@ The Gradle task to be executed, in this case _init_, is unimportant. The point i the `fetchDependencies.gradle` script. If it ran correctly you will have a new `~/git/ghidra/dependencies/` directory populated with the following files: * flatRepo/AXMLPrinter2.jar - * flatRepo/csframework.jar * flatRepo/dex-ir-2.0.jar * flatRepo/dex-reader-2.0.jar * flatRepo/dex-reader-api-2.0.jar * flatRepo/dex-tools-2.0.jar * flatRepo/dex-translator-2.0.jar * flatRepo/dex-writer-2.0.jar - * flatRepo/hfsx.jar - * flatRepo/hfsx_dmglib.jar - * flatRepo/iharder-base64.jar * GhidraDev/cdt-8.6.0.zip * GhidraDev/PyDev 6.3.1.zip * GhidraServer/yajsw-stable-12.12.zip @@ -168,21 +161,6 @@ cd ~/git/ghidra/dependencies/flatRepo curl -OL https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/AXMLPrinter2.jar ``` -#### Get Dependencies for DMG: - -Download `hfsexplorer-0_21-bin.zip` from www.catacombae.org. -Unpack the `lib` directory to `~/git/ghidra/dependencies/flatRepo`: - -```bash -cd ~/Downloads # Or wherever -curl -OL https://sourceforge.net/projects/catacombae/files/HFSExplorer/0.21/hfsexplorer-0_21-bin.zip -mkdir hfsx -cd hfsx -unzip ../hfsexplorer-0_21-bin.zip -cd lib -cp csframework.jar hfsx_dmglib.jar hfsx.jar iharder-base64.jar ~/git/ghidra/dependencies/flatRepo/ -``` - #### Get Dependencies for GhidraServer Building the GhidraServer requires "Yet another Java service wrapper" (yajsw) version 12.12. diff --git a/GPL/DMG/build.gradle b/GPL/DMG/build.gradle index 690d55e941..4098009221 100644 --- a/GPL/DMG/build.gradle +++ b/GPL/DMG/build.gradle @@ -41,6 +41,10 @@ sourceSets { eclipse.classpath.plusConfigurations += [configurations.dmgCompile] +repositories { + flatDir name: "flat", dirs:["data/lib"] +} + dependencies { dmgCompile ':csframework@jar' dmgCompile ':hfsx@jar' diff --git a/GPL/DMG/certification.manifest b/GPL/DMG/certification.manifest index d7bac0f1d3..f2127813c2 100644 --- a/GPL/DMG/certification.manifest +++ b/GPL/DMG/certification.manifest @@ -3,11 +3,11 @@ ##MODULE IP: LGPL 2.1 ##MODULE IP: Public Domain Module.manifest||Public Domain||||END| -data/lib/catacombae_csframework.jar||LGPL 2.1||||END| -data/lib/catacombae_hfsx.jar||GPL 3||||END| -data/lib/catacombae_hfsx_dmglib.jar||GPL 3||||END| -data/lib/catacombae_iharder-base64.jar||GPL 3||||END| +data/lib/csframework.jar||LGPL 2.1||||END| data/lib/hfsexplorer-0_21-src.zip||GPL 3||||END| +data/lib/hfsx.jar||GPL 3||||END| +data/lib/hfsx_dmglib.jar||GPL 3||||END| +data/lib/iharder-base64.jar||GPL 3||||END| data/os/win32/llio_amd64.dll||GPL 3||||END| data/os/win32/llio_i386.dll||GPL 3||||END| data/os/win32/llio_ia64.dll||GPL 3||||END| diff --git a/GPL/DMG/data/lib/catacombae_csframework.jar b/GPL/DMG/data/lib/csframework.jar similarity index 100% rename from GPL/DMG/data/lib/catacombae_csframework.jar rename to GPL/DMG/data/lib/csframework.jar diff --git a/GPL/DMG/data/lib/catacombae_hfsx.jar b/GPL/DMG/data/lib/hfsx.jar similarity index 100% rename from GPL/DMG/data/lib/catacombae_hfsx.jar rename to GPL/DMG/data/lib/hfsx.jar diff --git a/GPL/DMG/data/lib/catacombae_hfsx_dmglib.jar b/GPL/DMG/data/lib/hfsx_dmglib.jar similarity index 100% rename from GPL/DMG/data/lib/catacombae_hfsx_dmglib.jar rename to GPL/DMG/data/lib/hfsx_dmglib.jar diff --git a/GPL/DMG/data/lib/catacombae_iharder-base64.jar b/GPL/DMG/data/lib/iharder-base64.jar similarity index 100% rename from GPL/DMG/data/lib/catacombae_iharder-base64.jar rename to GPL/DMG/data/lib/iharder-base64.jar diff --git a/gradle/support/fetchDependencies.gradle b/gradle/support/fetchDependencies.gradle index a9a8db3b0a..ceca919f2f 100644 --- a/gradle/support/fetchDependencies.gradle +++ b/gradle/support/fetchDependencies.gradle @@ -61,20 +61,6 @@ ext.deps = [ FileUtils.copyDirectory(new File(DOWNLOADS_DIR, 'dex2jar-2.0/lib/'), FLAT_REPO_DIR, new WildcardFileFilter("dex-*")); } ], - [ - name: 'hfsexplorer-0_21-bin.zip', - url: 'https://sourceforge.net/projects/catacombae/files/HFSExplorer/0.21/hfsexplorer-0_21-bin.zip', - sha256: '90c9b54798abca5b12f4a678db7d0a4c970f4702cb153c11919536d0014dedbf', - destination: { - def hfsxdir = new File (DOWNLOADS_DIR, "hfsx") - hfsxdir.mkdir() - unzip (DOWNLOADS_DIR, hfsxdir, 'hfsexplorer-0_21-bin.zip') - FileUtils.copyFileToDirectory(new File(DOWNLOADS_DIR, "hfsx/lib/csframework.jar"), FLAT_REPO_DIR); - FileUtils.copyFileToDirectory(new File(DOWNLOADS_DIR, "hfsx/lib/hfsx_dmglib.jar"), FLAT_REPO_DIR); - FileUtils.copyFileToDirectory(new File(DOWNLOADS_DIR, "hfsx/lib/hfsx.jar"), FLAT_REPO_DIR); - FileUtils.copyFileToDirectory(new File(DOWNLOADS_DIR, "hfsx/lib/iharder-base64.jar"), FLAT_REPO_DIR); - } - ], [ name: 'AXMLPrinter2.jar', url: 'https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/AXMLPrinter2.jar',