Compare commits
2 Commits
4d093e7ce8
...
bf023781d2
Author | SHA1 | Date | |
---|---|---|---|
bf023781d2 | |||
1c4f19d84b |
|
@ -151,16 +151,7 @@ public class Bert implements ActionListener {
|
|||
Process p;
|
||||
try {
|
||||
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));
|
||||
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
|
||||
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
|
||||
p.waitFor();
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
|
@ -186,7 +177,7 @@ public class Bert implements ActionListener {
|
|||
} else if (type == Main.ArcTarget.ADDON_HD) {
|
||||
extracted = "addcont/PCSA00015/DLC1W2048PACKAGE";
|
||||
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";
|
||||
name = "dlc2.psarc";
|
||||
} else {
|
||||
|
|
|
@ -132,7 +132,11 @@ public class Kermit implements ActionListener {
|
|||
changePage(Pages.DONE);
|
||||
break;
|
||||
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
|
||||
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 void Action() {
|
||||
Action(false);
|
||||
}
|
||||
|
||||
// Initialize the main window
|
||||
public void Action(/*Main entryPoint*/) {
|
||||
public void Action(boolean forceNag) {
|
||||
System.out.println("Main window created");
|
||||
System.out.println("Loading program configuration");
|
||||
Main.loadConf(this);
|
||||
|
@ -177,7 +181,7 @@ public class MissPiggy implements ActionListener {
|
|||
frame.setLayout(new GridLayout());
|
||||
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);
|
||||
if (result == JOptionPane.YES_OPTION) {
|
||||
Thread downloaderPopupThread = new Thread(new Runnable() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user