Localized the libraries to the lib folder + Small temporary changes for compiling

Until these libraries have official repos it's best we keep them inside of this repo

I also did some temporary changes, I bumped the minor version up by 10 along with removing a deprecated swing class. I'll look at properly fixing those two issues later on.
This commit is contained in:
Konloch 2021-06-20 22:50:28 -07:00
parent 81d9dafa9b
commit 846ef882cf
9 changed files with 38 additions and 33 deletions

BIN
libs/android-5.1.jar Normal file

Binary file not shown.

BIN
libs/apktool_2.3.0.jar Normal file

Binary file not shown.

@ -1 +0,0 @@
Subproject commit f87ea4395553abb065af22e16ddf57375275ad15

BIN
libs/byteanalysis-1.0.jar Normal file

Binary file not shown.

BIN
libs/d2jar-lib-obf.jar Normal file

Binary file not shown.

BIN
libs/jd-gui-1.6.6.jar Normal file

Binary file not shown.

53
pom.xml
View file

@ -17,18 +17,27 @@
<id>jitpack.io</id> <id>jitpack.io</id>
<url>https://jitpack.io</url> <url>https://jitpack.io</url>
</repository> </repository>
<!-- TODO: Replace with official repo for APKTool at some point? -->
<repository>
<id>Femtopedia</id>
<url>https://femtopedia.de/maven</url>
</repository>
</repositories> </repositories>
<repository>
<id>libs</id>
<name>libs</name>
<releases>
<enabled>true</enabled>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>file://${project.basedir}/libs</url>
</repository>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.android</groupId> <groupId>com.android</groupId>
<artifactId>android-lib</artifactId> <artifactId>android-lib</artifactId>
<version>5.1</version> <version>5.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/android-5.1.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jetbrains</groupId> <groupId>org.jetbrains</groupId>
@ -38,7 +47,9 @@
<dependency> <dependency>
<groupId>org.apktool</groupId> <groupId>org.apktool</groupId>
<artifactId>apktool</artifactId> <artifactId>apktool</artifactId>
<version>2.5.0</version> <version>2.3.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/apktool_2.3.0.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.ow2.asm</groupId> <groupId>org.ow2.asm</groupId>
@ -114,6 +125,8 @@
<groupId>com.pxb1988</groupId> <groupId>com.pxb1988</groupId>
<artifactId>d2jar-lib-obf</artifactId> <artifactId>d2jar-lib-obf</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/d2jar-lib-obf.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.rover12421.android</groupId> <groupId>com.rover12421.android</groupId>
@ -154,6 +167,15 @@
<groupId>com.jd</groupId> <groupId>com.jd</groupId>
<artifactId>jd-gui</artifactId> <artifactId>jd-gui</artifactId>
<version>1.6.6</version> <version>1.6.6</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/jd-gui-1.6.6.jar</systemPath>
</dependency>
<dependency>
<groupId>eu.bibl.banalysis</groupId>
<artifactId>byteanalysis</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/byteanalysis-1.0.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.tinyjee.jgraphx</groupId> <groupId>org.tinyjee.jgraphx</groupId>
@ -269,25 +291,6 @@
</filters> </filters>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/libs/byte-engineer/byteanalysis/src/main/java</source>
<source>${basedir}/libs/byte-engineer/byteio/src/main/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>

View file

@ -118,7 +118,7 @@ import the.bytecode.club.bytecodeviewer.util.MiscUtils;
public class BytecodeViewer { public class BytecodeViewer {
/*per version*/ /*per version*/
public static final String VERSION = "2.10.0"; public static final String VERSION = "2.10.10";
public static String krakatauVersion = "12"; public static String krakatauVersion = "12";
public static String enjarifyVersion = "4"; public static String enjarifyVersion = "4";
public static final boolean BLOCK_TAB_MENU = true; public static final boolean BLOCK_TAB_MENU = true;
@ -198,12 +198,13 @@ public class BytecodeViewer {
*/ */
private static final Thread versionChecker = new Thread(() -> { private static final Thread versionChecker = new Thread(() -> {
try { try {
HTTPRequest r = new HTTPRequest(new URL("https://raw.githubusercontent" HTTPRequest r = new HTTPRequest(new URL("https://raw.githubusercontent.com/Konloch/bytecode-viewer/master/VERSION"));
+ ".com/Konloch/bytecode-viewer/master/VERSION"));
final String version = r.readSingle(); final String version = r.readSingle();
final String localVersion = BytecodeViewer.VERSION + 0;
try { try {
int simplemaths = Integer.parseInt(version.replace(".", "")); int simplemaths = Integer.parseInt(version.replace(".", ""));
int simplemaths2 = Integer.parseInt(BytecodeViewer.VERSION.replace(".", "")); int simplemaths2 = Integer.parseInt(localVersion.replace(".", ""));
System.out.println("DEBUG: " + simplemaths + " vs " + simplemaths2);
if (simplemaths2 > simplemaths) if (simplemaths2 > simplemaths)
return; //developer version return; //developer version
} catch (Exception ignored) { } catch (Exception ignored) {

View file

@ -1,6 +1,7 @@
package the.bytecode.club.bytecodeviewer.gui; package the.bytecode.club.bytecodeviewer.gui;
import com.sun.java.swing.plaf.windows.WindowsTreeUI; //TODO re-add
//import com.sun.java.swing.plaf.windows.WindowsTreeUI;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
@ -219,7 +220,8 @@ public class FileNavigationPane extends VisibleComponent implements
} }
}); });
pop.add(new AbstractAction("Expand", WindowsTreeUI.ExpandedIcon.createExpandedIcon()) { //TODO re-add
/*pop.add(new AbstractAction("Expand", WindowsTreeUI.ExpandedIcon.createExpandedIcon()) {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
TreePath selPath = FileNavigationPane.this.tree.getPathForLocation(x, y); TreePath selPath = FileNavigationPane.this.tree.getPathForLocation(x, y);
@ -233,7 +235,7 @@ public class FileNavigationPane extends VisibleComponent implements
TreePath selPath = FileNavigationPane.this.tree.getPathForLocation(x, y); TreePath selPath = FileNavigationPane.this.tree.getPathForLocation(x, y);
expandAll(tree, Objects.requireNonNull(selPath), false); expandAll(tree, Objects.requireNonNull(selPath), false);
} }
}); });*/
pop.show(this.tree, x, y); pop.show(this.tree, x, y);
} }