Compare commits

...

2 Commits

Author SHA1 Message Date
bf023781d2 add forceNag for future setup screen rework 2024-07-09 23:39:59 -05:00
1c4f19d84b remove unused debug lines 2024-07-09 23:29:37 -05:00
3 changed files with 13 additions and 14 deletions

View File

@ -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 {

View File

@ -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();

View File

@ -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() {