diff --git a/trunk/src/com/jpexs/asdec/Main.java b/trunk/src/com/jpexs/asdec/Main.java index f19c785b0..9c75f24c6 100644 --- a/trunk/src/com/jpexs/asdec/Main.java +++ b/trunk/src/com/jpexs/asdec/Main.java @@ -61,6 +61,11 @@ public class Main { private static boolean working = false; private static TrayIcon trayIcon; private static MenuItem stopMenuItem; + private static boolean commandLineMode=false; + + public static boolean isCommandLineMode(){ + return commandLineMode; + } public static boolean DEBUG_COPY = false; /** Debug mode = throwing an error when comparing original file and recompiled */ @@ -154,6 +159,9 @@ public class Main { abcMainFrame.setStatus(name); if(actionMainFrame!=null) actionMainFrame.setStatus(name); + if(Main.isCommandLineMode()){ + System.out.println(name); + } } public static void stopWork() { @@ -177,6 +185,18 @@ public class Main { } + public static boolean exportSWF(String inFile,String outdir,boolean isPcode) throws Exception { + SWF swf = parseSWF(inFile); + boolean asFound=false; + for (Tag t : swf.tags) { + if (t instanceof DoABCTag){ + ((DoABCTag)t).abc.export(outdir,isPcode); + asFound=true; + } + } + return asFound; + } + private static class OpenFileWorker extends SwingWorker { @Override protected Object doInBackground() throws Exception { @@ -350,7 +370,40 @@ public class Main { } } + + public static void badArguments(){ + System.err.println("Error: Bad Commandline Arguments!"); + printCmdLineUsage(); + System.exit(1); + } + public static void printHeader(){ + System.out.println(applicationName); + for(int i=0;i