mirror of https://github.com/acidanthera/audk.git
default outputpath
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1361 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
f78797d5b7
commit
ac62aa9ad8
|
@ -22,6 +22,7 @@ public final class Common {
|
|||
public static final int FILE = 1;
|
||||
public static final int DIR = 2;
|
||||
|
||||
public static final String strseparate = "(.*)\\\\([^\\\\]*)";
|
||||
public static final Pattern ptnseparate = Pattern.compile("(.*)\\\\([^\\\\]*)");
|
||||
|
||||
//-------------------------------------regex------------------------------------------//
|
||||
|
|
|
@ -202,7 +202,8 @@ public final class Critic {
|
|||
}
|
||||
|
||||
public static final void fireAt(String path) throws Exception {
|
||||
Common.toDoAll(Common.dirCopy_(path), Critic.class.getMethod("critic", String.class), null, null, Common.FILE);
|
||||
//Common.toDoAll(Common.dirCopy_(path), Critic.class.getMethod("critic", String.class), null, null, Common.FILE);
|
||||
Common.toDoAll(path, Critic.class.getMethod("critic", String.class), null, null, Common.FILE);
|
||||
//Common.toDoAll(Common.dirCopy_(path), critic, Common.FILE);
|
||||
System.out.println("Critic Done");
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
|
|||
|
||||
defaultpathbox = new JCheckBox("Use Default Output Path", true);
|
||||
defaultpathbox.addItemListener(this);
|
||||
ModuleInfo.defaultoutput = true;
|
||||
|
||||
JPanel modulePanel = new JPanel();
|
||||
modulePanel.add(moduleButton);
|
||||
|
@ -218,16 +219,14 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
|
|||
} else if (e.getSource() == criticbox) {
|
||||
if (e.getStateChange() == ItemEvent.DESELECTED) {
|
||||
ModuleInfo.doCritic = false;
|
||||
System.out.println("criticbox DESELECTED");
|
||||
} else if (e.getStateChange() == ItemEvent.SELECTED) {
|
||||
ModuleInfo.doCritic = true;
|
||||
System.out.println("criticbox SELECTED");
|
||||
}
|
||||
} else if (e.getSource() == defaultpathbox) {
|
||||
if (e.getStateChange() == ItemEvent.DESELECTED) {
|
||||
System.out.println("defaultpathbox DESELECTED");
|
||||
ModuleInfo.defaultoutput = false;
|
||||
} else if (e.getStateChange() == ItemEvent.SELECTED) {
|
||||
System.out.println("defaultpathbox SELECTED");
|
||||
ModuleInfo.defaultoutput = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,11 +23,15 @@ public class ModuleInfo {
|
|||
ModuleInfo(String modulepath) throws Exception {
|
||||
this.modulepath = modulepath;
|
||||
|
||||
ModuleInfo.ui.println("Choose where to place the result");
|
||||
if ((outputpath = ModuleInfo.ui.getFilepath()) == null) {
|
||||
outputpath = modulepath;
|
||||
if (ModuleInfo.defaultoutput) {
|
||||
this.outputpath = this.modulepath.replaceAll(Common.strseparate, "$1");
|
||||
} else {
|
||||
ModuleInfo.ui.println("Choose where to place the result");
|
||||
if ((outputpath = ModuleInfo.ui.getFilepath()) == null) {
|
||||
outputpath = modulepath;
|
||||
}
|
||||
ModuleInfo.ui.println("Output to: " + outputpath);
|
||||
}
|
||||
ModuleInfo.ui.println(outputpath);
|
||||
}
|
||||
|
||||
public String modulepath = null;
|
||||
|
@ -67,7 +71,7 @@ public class ModuleInfo {
|
|||
}
|
||||
}
|
||||
|
||||
private static final boolean isModule(String path) {
|
||||
public static final boolean isModule(String path) {
|
||||
String[] list = new File(path).list();
|
||||
for (int i = 0 ; i < list.length ; i++) {
|
||||
if (!new File(list[i]).isDirectory()) {
|
||||
|
@ -112,8 +116,8 @@ public class ModuleInfo {
|
|||
|
||||
ModuleInfo.ui.println("Errors Left : " + ModuleInfo.db.error);
|
||||
ModuleInfo.ui.println("Complete!");
|
||||
ModuleInfo.ui.println("Your R9 module was placed here: " + mi.modulepath + File.separator + "result");
|
||||
ModuleInfo.ui.println("Your logfile was placed here: " + mi.modulepath);
|
||||
//ModuleInfo.ui.println("Your R9 module was placed here: " + mi.modulepath + File.separator + "result");
|
||||
//ModuleInfo.ui.println("Your logfile was placed here: " + mi.modulepath);
|
||||
}
|
||||
|
||||
private static final void show(Set<String> hash, String show) {
|
||||
|
@ -140,6 +144,7 @@ public class ModuleInfo {
|
|||
|
||||
public static boolean printModuleInfo = false;
|
||||
public static boolean doCritic = false;
|
||||
public static boolean defaultoutput = false;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
ui = FirstPanel.init();
|
||||
|
|
Loading…
Reference in New Issue