Main class for Utility. @author Matthew Tropiano
| 36 | * @author Matthew Tropiano |
| 37 | */ |
| 38 | public final class DMXConvertMain |
| 39 | { |
| 40 | private static final String SPLASH_VERSION = "DMXConv v" + Version.DMXCONV + " by Matt Tropiano (using DoomStruct v" + Version.DOOMSTRUCT + ")"; |
| 41 | |
| 42 | private static final int ERROR_NONE = 0; |
| 43 | private static final int ERROR_BAD_OPTIONS = 1; |
| 44 | private static final int ERROR_NO_FILES = 2; |
| 45 | private static final int ERROR_CONVERSION_SKIPPED = 3; |
| 46 | private static final int ERROR_NO_FFMPEG = 4; |
| 47 | private static final int ERROR_IOERROR = 5; |
| 48 | private static final int ERROR_UNKNOWN = -1; |
| 49 | |
| 50 | public static final String SWITCH_CHANGELOG = "--changelog"; |
| 51 | public static final String SWITCH_GUI = "--gui"; |
| 52 | public static final String SWITCH_HELP = "--help"; |
| 53 | public static final String SWITCH_HELP2 = "-h"; |
| 54 | public static final String SWITCH_VERSION = "--version"; |
| 55 | public static final String SWITCH_TRYFFMPEG = "--try-ffmpeg"; |
| 56 | |
| 57 | public static final String SWITCH_FFMPEG_ONLY = "--ffmpeg-only"; |
| 58 | public static final String SWITCH_JSPI_ONLY = "--jspi-only"; |
| 59 | public static final String SWITCH_FFMPEG_PATH = "--ffmpeg"; |
| 60 | public static final String SWITCH_OUTPUTDIR = "--output-dir"; |
| 61 | public static final String SWITCH_OUTPUTDIR2 = "-o"; |
| 62 | public static final String SWITCH_RECURSIVE = "--recursive"; |
| 63 | public static final String SWITCH_RECURSIVE2 = "-r"; |
| 64 | |
| 65 | /** |
| 66 | * Program options. |
| 67 | */ |
| 68 | public static class Options |
| 69 | { |
| 70 | private PrintStream stdout; |
| 71 | private PrintStream stderr; |
| 72 | private boolean help; |
| 73 | private boolean version; |
| 74 | private boolean tryFFMpeg; |
| 75 | private boolean changelog; |
| 76 | private boolean gui; |
| 77 | |
| 78 | private List<File> sourceFiles; |
| 79 | private boolean onlyFFMpeg; |
| 80 | private boolean onlyJSPI; |
| 81 | private File ffmpegPath; |
| 82 | private File outputDirectory; |
| 83 | private boolean recursive; |
| 84 | |
| 85 | private Options() |
| 86 | { |
| 87 | this.stdout = null; |
| 88 | this.stderr = null; |
| 89 | this.help = false; |
| 90 | this.version = false; |
| 91 | this.gui = false; |
| 92 | this.changelog = false; |
| 93 | |
| 94 | this.sourceFiles = new LinkedList<>(); |
| 95 | this.onlyFFMpeg = false; |
nothing calls this directly
no outgoing calls
no test coverage detected