Compare commits
2 Commits
4d093e7ce8
...
bf023781d2
| Author | SHA1 | Date | |
|---|---|---|---|
| bf023781d2 | |||
| 1c4f19d84b |
@@ -151,16 +151,7 @@ public class Bert implements ActionListener {
|
|||||||
Process p;
|
Process p;
|
||||||
try {
|
try {
|
||||||
if (!Main.windows) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + Main.inpath + ";wine pkg2zip.exe -x asset.pkg " + key.toString()});}
|
if (!Main.windows) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + Main.inpath + ";wine pkg2zip.exe -x asset.pkg " + key.toString()});}
|
||||||
else {p = Runtime.getRuntime().exec(new String[]{Main.inpath + "pkg2zip.exe", "-x", "asset.pkg", key.toString()}, null, new File(Main.inpath));
|
else {p = Runtime.getRuntime().exec(new String[]{Main.inpath + "pkg2zip.exe", "-x", "asset.pkg", key.toString()}, null, new File(Main.inpath));} //inpath cannot change here
|
||||||
InputStream debugin = new BufferedInputStream(p.getInputStream());
|
|
||||||
FileOutputStream debugout = new FileOutputStream(Main.inpath + "log1.txt");
|
|
||||||
int c;
|
|
||||||
while ((c = debugin.read()) != -1) {
|
|
||||||
debugout.write(c);
|
|
||||||
}
|
|
||||||
debugin.close();
|
|
||||||
debugout.close();
|
|
||||||
} //inpath cannot change here
|
|
||||||
p.waitFor();
|
p.waitFor();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
@@ -186,7 +177,7 @@ public class Bert implements ActionListener {
|
|||||||
} else if (type == Main.ArcTarget.ADDON_HD) {
|
} else if (type == Main.ArcTarget.ADDON_HD) {
|
||||||
extracted = "addcont/PCSA00015/DLC1W2048PACKAGE";
|
extracted = "addcont/PCSA00015/DLC1W2048PACKAGE";
|
||||||
name = "dlc1.psarc";
|
name = "dlc1.psarc";
|
||||||
} else if (type == Main.ArcTarget.ADDON_HD_FURY) {
|
} else if (type == Main.ArcTarget.ADDON_HD_FURY) { // this is not "always true" - intellij is actually very dumj
|
||||||
extracted = "addcont/PCSA00015/DLC2W2048PACKAGE";
|
extracted = "addcont/PCSA00015/DLC2W2048PACKAGE";
|
||||||
name = "dlc2.psarc";
|
name = "dlc2.psarc";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -132,7 +132,11 @@ public class Kermit implements ActionListener {
|
|||||||
changePage(Pages.DONE);
|
changePage(Pages.DONE);
|
||||||
break;
|
break;
|
||||||
case DONE:
|
case DONE:
|
||||||
new MissPiggy().Action();
|
if (new File(Main.inpath + "psp2psarc.exe").exists()) { // we may have been here before
|
||||||
|
new MissPiggy().Action(false);
|
||||||
|
} else {
|
||||||
|
new MissPiggy().Action(true);
|
||||||
|
}
|
||||||
|
|
||||||
page = Pages.AGREEMENT; //set it here since we're disposing of the entire thing
|
page = Pages.AGREEMENT; //set it here since we're disposing of the entire thing
|
||||||
frame.dispose();
|
frame.dispose();
|
||||||
|
|||||||
@@ -79,8 +79,12 @@ public class MissPiggy implements ActionListener {
|
|||||||
|
|
||||||
public boolean listenersAlreadySet = false; // was written to troubleshoot a bug but this wasn't actually the cause
|
public boolean listenersAlreadySet = false; // was written to troubleshoot a bug but this wasn't actually the cause
|
||||||
|
|
||||||
|
public void Action() {
|
||||||
|
Action(false);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize the main window
|
// Initialize the main window
|
||||||
public void Action(/*Main entryPoint*/) {
|
public void Action(boolean forceNag) {
|
||||||
System.out.println("Main window created");
|
System.out.println("Main window created");
|
||||||
System.out.println("Loading program configuration");
|
System.out.println("Loading program configuration");
|
||||||
Main.loadConf(this);
|
Main.loadConf(this);
|
||||||
@@ -177,7 +181,7 @@ public class MissPiggy implements ActionListener {
|
|||||||
frame.setLayout(new GridLayout());
|
frame.setLayout(new GridLayout());
|
||||||
frame.setLocationRelativeTo(null);
|
frame.setLocationRelativeTo(null);
|
||||||
|
|
||||||
if (Main.confvint == 0){ // nag
|
if (Main.confvint == 0 || forceNag){ // nag
|
||||||
int result = JOptionPane.showConfirmDialog(frame, "Firestar needs to download additional software to function. Setup is automatic and will only take a few minutes.\nIf you select NO, you will have to download additional dependencies later on.\n\nContinue?", "Firestar Setup", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
|
int result = JOptionPane.showConfirmDialog(frame, "Firestar needs to download additional software to function. Setup is automatic and will only take a few minutes.\nIf you select NO, you will have to download additional dependencies later on.\n\nContinue?", "Firestar Setup", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
|
||||||
if (result == JOptionPane.YES_OPTION) {
|
if (result == JOptionPane.YES_OPTION) {
|
||||||
Thread downloaderPopupThread = new Thread(new Runnable() {
|
Thread downloaderPopupThread = new Thread(new Runnable() {
|
||||||
|
|||||||
Reference in New Issue
Block a user