fixes to kermit rewrite

This commit is contained in:
Downforce Agent 2024-07-12 05:38:48 -05:00
parent cd05d82dfc
commit 4a2a992b04
3 changed files with 37 additions and 20 deletions

View File

@ -181,23 +181,7 @@ public class MissPiggy implements ActionListener {
frame.setLayout(new GridLayout());
frame.setLocationRelativeTo(null);
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() {
@Override
public void run() {
Main.downloadDependenciesBeforeSetVisible(frame);
}
});
downloaderPopupThread.start();
} else {
Main.writeConf(); // don't warn again
frame.setVisible(true); // no fuck off
}
} else {
frame.setVisible(true); // don't nag
}
frame.setVisible(true);
}
public void InitializeModListStructure() {

View File

@ -95,10 +95,17 @@ public class Waldorf implements ActionListener {
invoker.frame.setEnabled(true);
frame.dispose();
} else
if (actionEvent.getSource() == resetbtn) { // todo: delete firesdk // you sure?
if (actionEvent.getSource() == resetbtn) {
int result = JOptionPane.showConfirmDialog(frame,"Are you sure you want to redo the initial setup?", "Restore Default Settings", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if (result == JOptionPane.YES_OPTION) {
System.out.println("Restoring default settings");
new File(System.getProperty("user.home") + "/.firestar/firestar.conf").delete();
System.out.println("Deleting existing PSARCs");
new File(Main.inpath + "data.psarc").delete();
new File(Main.inpath + "data1.psarc").delete();
new File(Main.inpath + "data2.psarc").delete();
new File(Main.inpath + "dlc1.psarc").delete();
new File(Main.inpath + "dlc2.psarc").delete();
int result2 = JOptionPane.showConfirmDialog(frame,"Firestar will now close.", "Restore Default Settings", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE);
if (result2 == JOptionPane.OK_OPTION) {
System.exit(0);

View File

@ -60,7 +60,8 @@ public class WilkinsCoffee implements ActionListener {
}
}
private String outPathTemp = System.getProperty("user.home") + "/Documents/";
private String outPathTemp = System.getProperty("user.home") + "/Documents";
private boolean sdkInstalled = false;
public void setup() {
page = Pages.INTRO;
@ -157,9 +158,34 @@ public class WilkinsCoffee implements ActionListener {
switch (page) {
case INTRO:
page = Pages.PSARC;
//contBtn.setEnabled(false);
if (!new File(Main.inpath + "psp2psarc.exe").exists()) { // we may have been here before // nag
frame.setEnabled(false);
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() {
@Override
public void run() {
Main.downloadDependenciesBeforeSetVisible(frame);
frame.setEnabled(true);
sdkInstalled = true;
}
});
downloaderPopupThread.start();
} else {
frame.setEnabled(true);
}
} else {
sdkInstalled = true;
}
contBtn.setEnabled(false);
contBtn.setBackground(new Color(102, 74, 58)); //brown
inputContainer.setVisible(true);
if (!sdkInstalled) {
PSARC_downBtn.setEnabled(false);
PSARC_downBtn.setBackground(new Color(102, 74, 58)); //brown
}
instructions.setText("<html>\n" +
" <head>\n" +