mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 20:50:46 +00:00
updated build script
few javadoc fixes
This commit is contained in:
@@ -32,6 +32,7 @@ import java.awt.event.MouseEvent;
|
||||
import java.io.*;
|
||||
import java.net.Socket;
|
||||
import java.util.Calendar;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.ConsoleHandler;
|
||||
import java.util.logging.FileHandler;
|
||||
import java.util.logging.Level;
|
||||
@@ -61,12 +62,14 @@ public class Main {
|
||||
public static String file;
|
||||
public static String maskURL;
|
||||
public static SWF swf;
|
||||
public static final String version = "1.5.0u1";
|
||||
public static final String applicationName = "JPEXS Free Flash Decompiler v." + version;
|
||||
public static String version = "";
|
||||
public static final String applicationName = "JPEXS Free Flash Decompiler";
|
||||
public static String applicationVerName;
|
||||
public static final String shortApplicationName = "FFDec";
|
||||
public static final String shortApplicationVerName = shortApplicationName + " v." + version;
|
||||
public static String shortApplicationVerName;
|
||||
public static final String projectPage = "http://www.free-decompiler.com/flash";
|
||||
public static final String updatePage = "http://www.free-decompiler.com/flash/?update=" + version;
|
||||
public static String updatePageStub = "http://www.free-decompiler.com/flash/?update=";
|
||||
public static String updatePage;
|
||||
public static final String vendor = "JPEXS";
|
||||
public static LoadingDialog loadingDialog;
|
||||
public static ModeFrame modeFrame;
|
||||
@@ -76,6 +79,20 @@ public class Main {
|
||||
private static boolean commandLineMode = false;
|
||||
public static MainFrame mainFrame;
|
||||
|
||||
private static void loadProperties(){
|
||||
Properties prop = new Properties();
|
||||
try {
|
||||
prop.load(Main.class.getResourceAsStream("/project.properties"));
|
||||
version = prop.getProperty("version");
|
||||
applicationVerName = applicationName + " v."+version;
|
||||
updatePage = updatePageStub + version;
|
||||
shortApplicationVerName = shortApplicationName + " v." + version;
|
||||
} catch (IOException ex) {
|
||||
//ignore
|
||||
version = "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isCommandLineMode() {
|
||||
return commandLineMode;
|
||||
}
|
||||
@@ -396,8 +413,8 @@ public class Main {
|
||||
}
|
||||
|
||||
public static void printHeader() {
|
||||
System.out.println(applicationName);
|
||||
for (int i = 0; i < applicationName.length(); i++) {
|
||||
System.out.println(applicationVerName);
|
||||
for (int i = 0; i < applicationVerName.length(); i++) {
|
||||
System.out.print("-");
|
||||
}
|
||||
System.out.println();
|
||||
@@ -449,7 +466,8 @@ public class Main {
|
||||
* @param args the command line arguments
|
||||
*/
|
||||
public static void main(String[] args) throws IOException {
|
||||
View.setLookAndFeel();
|
||||
loadProperties();
|
||||
View.setLookAndFeel();
|
||||
Configuration.load();
|
||||
|
||||
int pos = 0;
|
||||
|
||||
@@ -409,7 +409,7 @@ public class SWFOutputStream extends OutputStream {
|
||||
/**
|
||||
* Calculates number of bits needed for representing unsigned value
|
||||
*
|
||||
* @param v Unsigned value
|
||||
* @param value Unsigned value
|
||||
* @return Number of bits
|
||||
*/
|
||||
public static int getNeededBitsU(int value) {
|
||||
|
||||
@@ -113,7 +113,7 @@ public class Action implements GraphSourceItem {
|
||||
/**
|
||||
* Returns address of this action
|
||||
*
|
||||
* @return
|
||||
* @return address of this action
|
||||
*/
|
||||
public long getAddress() {
|
||||
return address;
|
||||
@@ -529,7 +529,7 @@ public class Action implements GraphSourceItem {
|
||||
* @param constantPool Constant pool
|
||||
* @param version SWF version
|
||||
* @param hex Add hexadecimal
|
||||
* @return
|
||||
* @return String of P-code source
|
||||
*/
|
||||
public String getASMSource(List<GraphSourceItem> container, List<Long> knownAddreses, List<String> constantPool, int version, boolean hex) {
|
||||
return toString();
|
||||
@@ -537,11 +537,11 @@ public class Action implements GraphSourceItem {
|
||||
|
||||
/**
|
||||
* Translates this function to stack and output.
|
||||
*
|
||||
* @param stack Stack
|
||||
* @param constants Constant pool
|
||||
* @param output Output
|
||||
* @param regNames Register names
|
||||
* @param variables Variables
|
||||
* @param functions Functions
|
||||
*/
|
||||
public void translate(Stack<com.jpexs.decompiler.flash.graph.GraphTargetItem> stack, List<com.jpexs.decompiler.flash.graph.GraphTargetItem> output, java.util.HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions) {
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.gui;
|
||||
|
||||
import com.jpexs.decompiler.flash.Configuration;
|
||||
import com.jpexs.decompiler.flash.Main;
|
||||
import static com.jpexs.decompiler.flash.Main.applicationVerName;
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.abc.gui.ABCPanel;
|
||||
@@ -224,7 +225,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi
|
||||
Main.exit();
|
||||
}
|
||||
});
|
||||
setTitle(Main.applicationName + (Main.DISPLAY_FILENAME ? " - " + Main.getFileTitle() : ""));
|
||||
setTitle(Main.applicationVerName + (Main.DISPLAY_FILENAME ? " - " + Main.getFileTitle() : ""));
|
||||
JMenuBar menuBar = new JMenuBar();
|
||||
|
||||
JMenu menuFile = new JMenu("File");
|
||||
@@ -1020,7 +1021,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi
|
||||
}
|
||||
if (e.getActionCommand().equals("SAVEAS")) {
|
||||
if (Main.saveFileDialog()) {
|
||||
setTitle(Main.applicationName + (Main.DISPLAY_FILENAME ? " - " + Main.getFileTitle() : ""));
|
||||
setTitle(Main.applicationVerName + (Main.DISPLAY_FILENAME ? " - " + Main.getFileTitle() : ""));
|
||||
}
|
||||
}
|
||||
if (e.getActionCommand().equals("OPEN")) {
|
||||
|
||||
@@ -584,8 +584,8 @@ public interface WinBase extends StdCallLibrary, WinDef, BaseTSD {
|
||||
* The SECURITY_ATTRIBUTES structure contains the security descriptor for an
|
||||
* object and specifies whether the handle retrieved by specifying this
|
||||
* structure is inheritable. This structure provides security settings for
|
||||
* objects created by various functions, such as {@link Kernel32#CreateFile},
|
||||
* {@link Kernel32#CreatePipe}, or {@link Advapi32#RegCreateKeyEx}.
|
||||
* objects created by various functions, such as Kernel32#CreateFile,
|
||||
* Kernel32#CreatePipe, or Advapi32#RegCreateKeyEx.
|
||||
*/
|
||||
public static class SECURITY_ATTRIBUTES extends Structure {
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public class Highlighting {
|
||||
* Beggining of hilight of method
|
||||
*
|
||||
* @param index
|
||||
* @return
|
||||
* @return Hilighted method begin
|
||||
*/
|
||||
public static String hilighMethodBegin(long index) {
|
||||
if (!doHighlight) {
|
||||
@@ -125,7 +125,7 @@ public class Highlighting {
|
||||
/**
|
||||
* Ending of hilight of method
|
||||
*
|
||||
* @return
|
||||
* @return Hilighted method end
|
||||
*/
|
||||
public static String hilighMethodEnd() {
|
||||
if (!doHighlight) {
|
||||
|
||||
@@ -30,10 +30,10 @@ public class SHAPE {
|
||||
public List<SHAPERECORD> shapeRecords;
|
||||
|
||||
/**
|
||||
* EXPERIMENTAL
|
||||
* Converts shape to SVG
|
||||
*
|
||||
* @param shapeNum
|
||||
* @return
|
||||
* @param shapeNum Type of DefineShape
|
||||
* @return String with XML representation of this shape (SVG)
|
||||
*/
|
||||
public String toSVG(int shapeNum) {
|
||||
return SHAPERECORD.shapeToSVG(shapeNum, null, null, numFillBits, numLineBits, shapeRecords);
|
||||
|
||||
@@ -32,10 +32,10 @@ public class SHAPEWITHSTYLE {
|
||||
public List<SHAPERECORD> shapeRecords;
|
||||
|
||||
/**
|
||||
* EXPERIMENTAL
|
||||
* Converts shape to SVG
|
||||
*
|
||||
* @param shapeNum
|
||||
* @return
|
||||
* @param shapeNum Type of DefineShape
|
||||
* @return String with XML representation of this shape (SVG)
|
||||
*/
|
||||
public String toSVG(int shapeNum) {
|
||||
return SHAPERECORD.shapeToSVG(shapeNum, fillStyles, lineStyles, numFillBits, numLineBits, shapeRecords);
|
||||
|
||||
Reference in New Issue
Block a user