Skip to content

Commit 858f3ea

Browse files
committed
2.9.6
-----2.9.6-----: 05/05/2015 - Fixed a typo in the about window 05/28/2015 - Started importing JD-GUI Decompiler. 05/28/2015 - Compile on refresh and compile on save are now enabled by default. 05/28/2015 - Renamed the File>Save As options to be much more informative. 06/24/2015 - Fixed a logic error with the Field & Method searchers. 06/26/2015 - Updated Procyon & CFR to their latest versions. 07/02/2015 - Added JD-GUI Decompiler. - Huge thanks to the guys behind JD-GUI! <3 (FIVE DECOMPILERS NOW LOL)
1 parent 13e52bb commit 858f3ea

30 files changed

Lines changed: 1611 additions & 90 deletions

README.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,4 +349,12 @@ Changelog:
349349
04/21/2015 - The about pane now provides a lot more up to date information.
350350
04/21/2015 - Changed 'View Panes' to simply 'View'.
351351
--- 2.9.5 ---:
352-
05/01/2015 - Added 'pingback' for statistics (to track how many people globally use BCV)
352+
05/01/2015 - Added 'pingback' for statistics (to track how many people globally use BCV)
353+
-----2.9.6-----:
354+
05/05/2015 - Fixed a typo in the about window
355+
05/28/2015 - Started importing JD-GUI Decompiler.
356+
05/28/2015 - Compile on refresh and compile on save are now enabled by default.
357+
05/28/2015 - Renamed the File>Save As options to be much more informative.
358+
06/24/2015 - Fixed a logic error with the Field & Method searchers.
359+
06/26/2015 - Updated Procyon & CFR to their latest versions.
360+
07/02/2015 - Added JD-GUI Decompiler. - Huge thanks to the guys behind JD-GUI! <3 (FIVE DECOMPILERS NOW LOL)

install/_install BCV.64.bat

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
assoc .class=BCV
33
assoc .apk=BCV
44
assoc .dex=BCV
5-
ftype BCV="%CD%\BytecodeViewer.32.exe" "%%1"
5+
ftype BCV="%CD%\BytecodeViewer.exe" "%%1"
66
echo.
77
echo.
8-
echo Installed, .class, .apk and .dex will be associated with BytecodeViwer.32.exe
8+
echo Installed, .class, .apk and .dex will be associated with BytecodeViwer.exe
99
echo.
10-
echo Note, if you move BytecodeViewer.32.exe
10+
echo Note, if you move BytecodeViewer.exe
1111
echo you'll need to re-run this program in the same directory as it.
1212
echo.
1313
echo.

install/launch4j_config.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<launch4jConfig>
3+
<dontWrapJar>false</dontWrapJar>
4+
<headerType>gui</headerType>
5+
<jar>H:\Repo\BCV\bytecode-viewer\BytecodeViewer 2.9.6.jar</jar>
6+
<outfile>H:\Repo\BCV\bytecode-viewer\BytecodeViewer.exe</outfile>
7+
<errTitle></errTitle>
8+
<cmdLine></cmdLine>
9+
<chdir>.</chdir>
10+
<priority>normal</priority>
11+
<downloadUrl>http://java.com/download</downloadUrl>
12+
<supportUrl></supportUrl>
13+
<stayAlive>false</stayAlive>
14+
<restartOnCrash>false</restartOnCrash>
15+
<manifest></manifest>
16+
<icon>H:\Repo\BCV\bytecode-viewer\BCV Icon.ico</icon>
17+
<jre>
18+
<path></path>
19+
<bundledJre64Bit>false</bundledJre64Bit>
20+
<bundledJreAsFallback>false</bundledJreAsFallback>
21+
<minVersion>1.7.0_00</minVersion>
22+
<maxVersion></maxVersion>
23+
<jdkPreference>preferJre</jdkPreference>
24+
<runtimeBits>64/32</runtimeBits>
25+
</jre>
26+
<versionInfo>
27+
<fileVersion>0.2.9.6</fileVersion>
28+
<txtFileVersion>http://the.bytecode.club</txtFileVersion>
29+
<fileDescription>Bytecode Viewer</fileDescription>
30+
<copyright>http://bytecodeviewer.com</copyright>
31+
<productVersion>0.2.9.6</productVersion>
32+
<txtProductVersion>http://the.bytecode.club</txtProductVersion>
33+
<productName>Bytecode Viewer</productName>
34+
<companyName></companyName>
35+
<internalName>BCV</internalName>
36+
<originalFilename>Bytecode_Viewer.exe</originalFilename>
37+
</versionInfo>
38+
</launch4jConfig>
Binary file not shown.

src/jd/cli/Main.java

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package jd.cli;
2+
3+
import java.io.File;
4+
import java.io.PrintStream;
5+
6+
import jd.cli.loader.DirectoryLoader;
7+
import jd.cli.preferences.CommonPreferences;
8+
import jd.cli.printer.text.PlainTextPrinter;
9+
import jd.cli.util.ClassFileUtil;
10+
import jd.core.Decompiler;
11+
import jd.core.process.DecompilerImpl;
12+
13+
14+
public class Main
15+
{
16+
/**
17+
* @param args Path to java class
18+
*/
19+
public static void main(String[] args) {
20+
21+
if (args.length == 0) {
22+
System.out.println("usage: ...");
23+
} else {
24+
try {
25+
String pathToClass = args[0].replace('/', File.separatorChar).replace('\\', File.separatorChar);
26+
String directoryPath = ClassFileUtil.ExtractDirectoryPath(pathToClass);
27+
28+
if (directoryPath == null)
29+
return;
30+
31+
String internalPath = ClassFileUtil.ExtractInternalPath(directoryPath, pathToClass);
32+
33+
if (internalPath == null)
34+
return;
35+
36+
CommonPreferences preferences = new CommonPreferences();
37+
DirectoryLoader loader = new DirectoryLoader(new File(directoryPath));
38+
39+
//PrintStream ps = new PrintStream("test.html");
40+
//HtmlPrinter printer = new HtmlPrinter(ps);
41+
PrintStream ps = new PrintStream("test.txt");
42+
PlainTextPrinter printer = new PlainTextPrinter(preferences, ps);
43+
44+
Decompiler decompiler = new DecompilerImpl();
45+
decompiler.decompile(preferences, loader, printer, internalPath);
46+
47+
System.out.println("done.");
48+
49+
} catch (Exception e) {
50+
e.printStackTrace();
51+
}
52+
}
53+
}
54+
}

src/jd/cli/loader/BaseLoader.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package jd.cli.loader;
2+
3+
import java.io.File;
4+
5+
import jd.core.loader.Loader;
6+
7+
public abstract class BaseLoader implements Loader
8+
{
9+
protected String codebase;
10+
protected long lastModified;
11+
protected boolean isFile;
12+
13+
public BaseLoader(File file)
14+
{
15+
this.codebase = file.getAbsolutePath();
16+
this.lastModified = file.lastModified();
17+
this.isFile = file.isFile();
18+
}
19+
20+
public String getCodebase()
21+
{
22+
return codebase;
23+
}
24+
25+
public long getLastModified()
26+
{
27+
return lastModified;
28+
}
29+
30+
public boolean isFile()
31+
{
32+
return isFile;
33+
}
34+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package jd.cli.loader;
2+
3+
import java.io.BufferedInputStream;
4+
import java.io.DataInputStream;
5+
import java.io.File;
6+
import java.io.FileInputStream;
7+
import java.io.FileNotFoundException;
8+
9+
import jd.core.loader.LoaderException;
10+
11+
12+
public class DirectoryLoader extends BaseLoader
13+
{
14+
public DirectoryLoader(File file) throws LoaderException
15+
{
16+
super(file);
17+
18+
if (! (file.exists() && file.isDirectory()))
19+
throw new LoaderException("'" + codebase + "' is not a directory");
20+
}
21+
22+
public DataInputStream load(String internalPath)
23+
throws LoaderException
24+
{
25+
File file = new File(this.codebase, internalPath);
26+
27+
try
28+
{
29+
return new DataInputStream(
30+
new BufferedInputStream(new FileInputStream(file)));
31+
}
32+
catch (FileNotFoundException e)
33+
{
34+
throw new LoaderException(
35+
"'" + file.getAbsolutePath() + "' not found.");
36+
}
37+
}
38+
39+
public boolean canLoad(String internalPath)
40+
{
41+
File file = new File(this.codebase, internalPath);
42+
return file.exists() && file.isFile();
43+
}
44+
}

0 commit comments

Comments
 (0)