2024-04-09 22:06:05 -05:00
/ *
* Firestar Mod Manager
* Copyright ( C ) 2024 bonkmaykr
*
* This program is free software : you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program . If not , see https : //www.gnu.org/licenses/.
* /
import javax.swing.* ;
import javax.swing.text.StyleConstants ;
2024-04-09 23:24:54 -05:00
import java.awt.* ;
2024-04-09 22:06:05 -05:00
import java.awt.event.ActionEvent ;
import java.awt.event.ActionListener ;
2024-04-10 01:29:24 -05:00
import java.io.* ;
import java.math.BigInteger ;
import java.net.URL ;
import java.nio.file.* ;
import java.security.* ;
2024-04-09 22:06:05 -05:00
// handles setup window
public class Kermit implements ActionListener {
public enum Pages {
AGREEMENT ( 0 ) ,
EXPORT_MODE ( 1 ) ,
SDK_INSTALL ( 2 ) ,
SDK_FAILURE ( 3 ) ,
WHAT_OS ( 4 ) ,
EXPORT_LOCATION ( 5 ) ,
2024-04-09 23:24:54 -05:00
IMPORT_LOCATION ( 6 ) ,
DONE ( 7 ) ;
2024-04-09 22:06:05 -05:00
public final int value ;
private Pages ( int i ) {
this . value = i ;
}
}
2024-04-10 03:49:21 -05:00
JDialog frame = new JDialog ( ) ;
2024-04-09 22:06:05 -05:00
JButton button = new JButton ( " Next " ) ;
JButton button2 = new JButton ( " Quit " ) ;
JButton button3 = new JButton ( " Cancel " ) ;
JButton button4 = new JButton ( " Back " ) ;
JTextPane dialogText = new JTextPane ( ) ;
2024-04-09 23:24:54 -05:00
JRadioButton buttonCompat = new JRadioButton ( " Compatibility (for consoles) " ) ;
JRadioButton buttonFast = new JRadioButton ( " Fast Mode (for Vita3K emulator) " ) ;
ButtonGroup radg1 = new ButtonGroup ( ) ;
2024-04-10 01:29:24 -05:00
JRadioButton buttonNoWine = new JRadioButton ( " No, I use Microsoft Windows " ) ;
JRadioButton buttonHaveWine = new JRadioButton ( " Yes, I have a POSIX system with WINE. " ) ;
ButtonGroup radg2 = new ButtonGroup ( ) ;
2024-04-10 02:15:36 -05:00
JTextField pathInput = new JTextField ( ) ;
JButton openconfigfolderbutton = new JButton ( " Open Firestar Folder " ) ;
2024-04-09 22:06:05 -05:00
Pages page = Pages . AGREEMENT ;
javax . swing . text . StyledDocument document = dialogText . getStyledDocument ( ) ;
javax . swing . text . SimpleAttributeSet align = new javax . swing . text . SimpleAttributeSet ( ) ;
public void setup ( File fConf ) { //File variable is redundant. unused
2024-04-09 23:24:54 -05:00
frame . getContentPane ( ) . setBackground ( Color . WHITE ) ;
radg1 . add ( buttonCompat ) ;
radg1 . add ( buttonFast ) ;
2024-04-10 01:29:24 -05:00
radg2 . add ( buttonNoWine ) ;
radg2 . add ( buttonHaveWine ) ;
2024-04-09 23:24:54 -05:00
button . addActionListener ( this ) ;
button2 . addActionListener ( this ) ;
button3 . addActionListener ( this ) ;
button4 . addActionListener ( this ) ;
buttonCompat . addActionListener ( this ) ;
buttonFast . addActionListener ( this ) ;
2024-04-10 01:29:24 -05:00
buttonNoWine . addActionListener ( this ) ;
buttonHaveWine . addActionListener ( this ) ;
2024-04-10 02:15:36 -05:00
openconfigfolderbutton . addActionListener ( this ) ;
2024-04-09 23:24:54 -05:00
2024-04-09 22:06:05 -05:00
changePage ( Pages . AGREEMENT ) ;
}
@Override
public void actionPerformed ( ActionEvent actionEvent ) {
if ( actionEvent . getSource ( ) = = button2 ) {
System . exit ( 0 ) ;
} else if ( actionEvent . getSource ( ) = = button ) {
2024-04-09 23:24:54 -05:00
//frame.removeAll(); freezes??
2024-04-09 22:06:05 -05:00
switch ( page ) {
case AGREEMENT :
2024-04-09 23:24:54 -05:00
button . setVisible ( false ) ; frame . remove ( button ) ;
button2 . setVisible ( false ) ; frame . remove ( button2 ) ;
dialogText . setVisible ( false ) ; frame . remove ( dialogText ) ;
2024-06-29 04:47:47 -05:00
changePage ( Pages . SDK_INSTALL ) ; // EXPORT_MODE
2024-04-09 22:06:05 -05:00
break ;
case EXPORT_MODE :
2024-04-09 23:24:54 -05:00
button . setVisible ( false ) ; frame . remove ( button ) ;
2024-04-10 01:29:24 -05:00
button3 . setVisible ( false ) ; frame . remove ( button3 ) ;
2024-04-09 23:24:54 -05:00
dialogText . setVisible ( false ) ; frame . remove ( dialogText ) ;
buttonCompat . setVisible ( false ) ; frame . remove ( buttonCompat ) ;
buttonFast . setVisible ( false ) ; frame . remove ( buttonFast ) ;
2024-04-10 01:29:24 -05:00
if ( Main . repatch ) {
changePage ( Pages . SDK_INSTALL ) ;
} else { changePage ( Pages . EXPORT_LOCATION ) ; }
2024-04-09 22:06:05 -05:00
break ;
case SDK_INSTALL :
break ;
case SDK_FAILURE :
break ;
case WHAT_OS :
2024-04-10 01:29:24 -05:00
button . setVisible ( false ) ; frame . remove ( button ) ;
button3 . setVisible ( false ) ; frame . remove ( button3 ) ;
dialogText . setVisible ( false ) ; frame . remove ( dialogText ) ;
2024-04-09 22:06:05 -05:00
break ;
case EXPORT_LOCATION :
2024-04-10 02:15:36 -05:00
button . setVisible ( false ) ; frame . remove ( button ) ;
button3 . setVisible ( false ) ; frame . remove ( button3 ) ;
dialogText . setVisible ( false ) ; frame . remove ( dialogText ) ;
buttonNoWine . setVisible ( false ) ; frame . remove ( buttonNoWine ) ;
buttonHaveWine . setVisible ( false ) ; frame . remove ( buttonHaveWine ) ;
2024-04-09 23:24:54 -05:00
changePage ( Pages . IMPORT_LOCATION ) ;
break ;
case IMPORT_LOCATION :
2024-04-10 02:15:36 -05:00
Main . outpath = pathInput . getText ( ) ;
pathInput . setText ( " " ) ;
dialogText . setVisible ( false ) ; frame . remove ( dialogText ) ;
pathInput . setVisible ( false ) ; frame . remove ( pathInput ) ;
2024-04-09 22:06:05 -05:00
changePage ( Pages . DONE ) ;
break ;
case DONE :
2024-04-11 23:26:26 -05:00
new MissPiggy ( ) . Action ( ) ;
2024-04-09 22:06:05 -05:00
page = Pages . AGREEMENT ; //set it here since we're disposing of the entire thing
frame . dispose ( ) ;
break ;
default :
throw new UnsupportedOperationException ( " ERROR: Undefined behavior in Kermit's event listener. Get a programmer! " ) ;
//JOptionPane OhShit = new JOptionPane.showMessageDialog(null, "Fuck");
}
2024-04-09 23:24:54 -05:00
} else if ( actionEvent . getSource ( ) = = button4 ) {
//frame.removeAll(); freezes??
switch ( page ) { // todo remove elements when going to previous page
case EXPORT_MODE :
changePage ( Pages . AGREEMENT ) ;
break ;
case SDK_INSTALL :
changePage ( Pages . EXPORT_MODE ) ;
break ;
case SDK_FAILURE :
break ;
case WHAT_OS :
changePage ( Pages . SDK_INSTALL ) ;
break ;
case EXPORT_LOCATION :
if ( Main . repatch ) { changePage ( Pages . WHAT_OS ) ; } else { changePage ( Pages . EXPORT_MODE ) ; }
break ;
case IMPORT_LOCATION :
changePage ( Pages . EXPORT_LOCATION ) ;
break ;
default :
throw new UnsupportedOperationException ( " ERROR: Undefined behavior in Kermit's event listener. Get a programmer! " ) ;
//JOptionPane OhShit = new JOptionPane.showMessageDialog(null, "Fuck");
}
} else if ( actionEvent . getSource ( ) = = buttonCompat ) {
Main . repatch = true ;
button . setEnabled ( true ) ;
} else if ( actionEvent . getSource ( ) = = buttonFast ) {
Main . repatch = false ;
button . setEnabled ( true ) ;
2024-04-10 01:29:24 -05:00
} else if ( actionEvent . getSource ( ) = = buttonHaveWine ) {
2024-05-08 07:17:26 -05:00
Main . windows = true ;
2024-04-10 01:29:24 -05:00
button . setEnabled ( true ) ;
} else if ( actionEvent . getSource ( ) = = buttonNoWine ) {
2024-05-08 07:17:26 -05:00
Main . windows = false ;
2024-04-10 01:29:24 -05:00
button . setEnabled ( true ) ;
2024-04-10 02:15:36 -05:00
} else if ( actionEvent . getSource ( ) = = openconfigfolderbutton ) {
try {
Desktop . getDesktop ( ) . open ( new File ( Main . inpath ) ) ;
} catch ( IOException e ) {
throw new RuntimeException ( e ) ;
}
2024-04-09 22:06:05 -05:00
}
}
2024-04-10 01:29:24 -05:00
public void changePage ( Pages GoTo ) {
2024-04-09 22:06:05 -05:00
switch ( GoTo ) {
case AGREEMENT :
page = Pages . AGREEMENT ;
2024-04-09 23:24:54 -05:00
button . setVisible ( true ) ;
2024-04-09 22:06:05 -05:00
button . setBounds ( 292 , 343 , 300 , 30 ) ;
frame . add ( button ) ;
2024-04-09 23:24:54 -05:00
button2 . setVisible ( true ) ;
2024-04-09 22:06:05 -05:00
button2 . setBounds ( 0 , 343 , 292 , 30 ) ;
frame . add ( button2 ) ;
2024-04-09 23:24:54 -05:00
dialogText . setVisible ( true ) ;
2024-04-09 22:06:05 -05:00
dialogText . setHighlighter ( null ) ;
dialogText . getCaret ( ) . setVisible ( false ) ;
dialogText . setFocusable ( false ) ;
dialogText . setBounds ( 0 , 0 , 592 , 343 ) ;
//dialogText.setAlignmentX(JComponent.CENTER_ALIGNMENT);
//dialogText.setAlignmentY(JComponent.CENTER_ALIGNMENT);
StyleConstants . setAlignment ( align , StyleConstants . ALIGN_CENTER ) ;
document . setParagraphAttributes ( 0 , document . getLength ( ) , align , false ) ;
//dialogText.setText("Aww Fiddlesticks, what now?");
dialogText . setText ( " WELCOME TO FIRESTAR \ n \ n " +
2024-07-01 14:37:09 -05:00
" This initial setup guide will help you prepare your Playstation Vita, Playstation TV, or Vita3K emulator to play WipEout mods. \ n \ n Before continuing, please read the decryption guide at: \ nhttps://git.worlio.com/bonkmaykr/firestar/wiki/Decrypting-Original-PSARC-Files \ nsince you will need these files in order to use Firestar. \ n \ n " +
" If you encounter any issues while using Firestar you may contact the author at bonkmaykr@screwgravity.net " ) ;
2024-04-09 22:06:05 -05:00
frame . add ( dialogText ) ;
frame . setSize ( 600 , 400 ) ;
frame . setTitle ( " Initial Setup " ) ;
frame . setAlwaysOnTop ( true ) ;
frame . setDefaultCloseOperation ( 0 ) ;
frame . setResizable ( false ) ;
frame . setLayout ( null ) ;
frame . setVisible ( true ) ;
break ;
case EXPORT_MODE :
page = Pages . EXPORT_MODE ;
2024-04-09 23:24:54 -05:00
button . setVisible ( true ) ;
button . setEnabled ( false ) ;
2024-04-09 22:06:05 -05:00
button . setBounds ( 292 , 343 , 300 , 30 ) ;
frame . add ( button ) ;
2024-07-01 14:37:09 -05:00
button3 . setVisible ( false ) ;
2024-04-09 23:24:54 -05:00
button3 . setBounds ( 0 , 343 , 292 , 30 ) ;
frame . add ( button3 ) ;
2024-04-09 22:06:05 -05:00
2024-04-09 23:24:54 -05:00
dialogText . setVisible ( true ) ;
2024-04-09 22:06:05 -05:00
dialogText . setHighlighter ( null ) ;
dialogText . getCaret ( ) . setVisible ( false ) ;
dialogText . setFocusable ( false ) ;
2024-04-09 23:24:54 -05:00
dialogText . setBounds ( 0 , 40 , 592 , 150 ) ;
2024-04-09 22:06:05 -05:00
StyleConstants . setAlignment ( align , StyleConstants . ALIGN_CENTER ) ;
document . setParagraphAttributes ( 0 , document . getLength ( ) , align , false ) ;
2024-04-09 23:24:54 -05:00
dialogText . setText ( " Please choose how Firestar will deploy your mods. \ n \ n " +
" Compatibility mode requires software from the PSVita SDK, but works on real hardware. \ n " +
" Fast mode is easiest, but won't work on FAT32/exFAT drives like what the Vita uses. " ) ;
2024-04-09 22:06:05 -05:00
frame . add ( dialogText ) ;
2024-04-09 23:24:54 -05:00
buttonCompat . setBounds ( 40 , 200 , 300 , 25 ) ;
buttonFast . setBounds ( 40 , 230 , 300 , 25 ) ;
buttonCompat . setBackground ( Color . WHITE ) ;
buttonFast . setBackground ( Color . WHITE ) ;
buttonCompat . setVisible ( true ) ;
buttonFast . setVisible ( true ) ;
frame . add ( buttonCompat ) ;
frame . add ( buttonFast ) ;
2024-04-09 22:06:05 -05:00
frame . setSize ( 600 , 400 ) ;
frame . setTitle ( " Initial Setup " ) ;
frame . setAlwaysOnTop ( true ) ;
frame . setDefaultCloseOperation ( 0 ) ;
frame . setResizable ( false ) ;
frame . setLayout ( null ) ;
2024-04-13 10:04:35 -05:00
frame . setLocationRelativeTo ( null ) ;
2024-04-09 22:06:05 -05:00
frame . setVisible ( true ) ;
break ;
case SDK_INSTALL :
page = Pages . SDK_INSTALL ;
2024-04-09 23:24:54 -05:00
dialogText . setVisible ( true ) ;
dialogText . setHighlighter ( null ) ;
dialogText . getCaret ( ) . setVisible ( false ) ;
dialogText . setFocusable ( false ) ;
dialogText . setBounds ( 0 , 40 , 592 , 300 ) ;
StyleConstants . setAlignment ( align , StyleConstants . ALIGN_CENTER ) ;
document . setParagraphAttributes ( 0 , document . getLength ( ) , align , false ) ;
2024-04-10 01:29:24 -05:00
dialogText . setText ( " Firestar is downloading important dependencies. Please wait. " ) ; //some kind of race condition prevents this from displaying?
2024-04-09 23:24:54 -05:00
frame . add ( dialogText ) ;
frame . setSize ( 600 , 400 ) ;
frame . setTitle ( " Initial Setup " ) ;
frame . setAlwaysOnTop ( true ) ;
frame . setDefaultCloseOperation ( 0 ) ;
frame . setResizable ( false ) ;
frame . setLayout ( null ) ;
frame . setVisible ( true ) ;
2024-04-10 01:29:24 -05:00
//md5 checksum 4ef707b2dba6944a726d46950aaddfd2
try {
File downloadLocationDir = new File ( System . getProperty ( " user.home " ) + " /.firestar/ " ) ;
File downloadLocation = new File ( System . getProperty ( " user.home " ) + " /.firestar/psp2psarc.exe " ) ;
downloadLocationDir . mkdirs ( ) ;
if ( ! downloadLocation . isFile ( ) ) {
downloadLocation . createNewFile ( ) ;
}
BufferedInputStream in = new BufferedInputStream ( new URL ( " http://bonkmaykr.worlio.com/http/firestar/psp2psarc.exe " ) . openStream ( ) ) ;
//FileOutputStream downloadOutput = new FileOutputStream(new File(System.getProperty("user.home") + "/.firestar/psp2psarc.exe"));
Files . copy ( in , Paths . get ( System . getProperty ( " user.home " ) + " /.firestar/psp2psarc.exe " ) , StandardCopyOption . REPLACE_EXISTING ) ;
int tests = 0 ;
String checksum = " " ;
while ( tests < 60 /*while(true)*/ ) {
byte [ ] hash = MessageDigest . getInstance ( " MD5 " ) . digest ( Files . readAllBytes ( Paths . get ( System . getProperty ( " user.home " ) + " /.firestar/psp2psarc.exe " ) ) ) ;
checksum = new BigInteger ( 1 , hash ) . toString ( 16 ) ;
System . out . println ( " Downloaded psp2psarc.exe successfully. " ) ;
if ( checksum . equals ( " 4ef707b2dba6944a726d46950aaddfd2 " ) ) { changePage ( Pages . WHAT_OS ) ; break ; }
Thread . sleep ( 20 ) ;
tests + + ;
}
if ( checksum . equals ( " 4ef707b2dba6944a726d46950aaddfd2 " ) ) { changePage ( Pages . WHAT_OS ) ; } else {
2024-05-06 23:36:41 -05:00
System . out . println ( " ERROR: Failed to download PSARC tool. Check connection and ensure the file is not corrupt or infected. " ) ;
2024-04-10 01:29:24 -05:00
dialogText . setText ( " Firestar tried to download important files needed for operation, but they were either corrupted or did not finish. \ n " + " \ n \ nYou will need to manually install psp2psarc.exe into your Firestar config folder after setup is complete! Or, you can retry the download later. " ) ;
//frame.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
button . setVisible ( true ) ;
button . setBounds ( 292 , 343 , 300 , 30 ) ;
frame . add ( button ) ;
}
} catch ( Exception e ) {
System . out . println ( " Failed to download PSARC tool due to an internal error: " + e . getMessage ( ) ) ;
dialogText . setText ( " An error has occured. \ n " + e . getMessage ( ) + " \ n \ nYou will need to manually install psp2psarc.exe into your Firestar config folder after setup is complete!!! " ) ;
//frame.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
button . setVisible ( true ) ;
button . setBounds ( 292 , 343 , 300 , 30 ) ;
frame . add ( button ) ;
}
2024-04-09 22:06:05 -05:00
break ;
case SDK_FAILURE :
2024-04-10 01:29:24 -05:00
page = Pages . SDK_FAILURE ; //unused
2024-04-09 22:06:05 -05:00
break ;
case WHAT_OS :
page = Pages . WHAT_OS ;
2024-04-10 01:29:24 -05:00
//do window clear here since the page is never called by the event handler
button . setVisible ( false ) ; frame . remove ( button ) ;
button3 . setVisible ( false ) ; frame . remove ( button3 ) ;
dialogText . setVisible ( false ) ; frame . remove ( dialogText ) ;
2024-04-10 02:35:27 -05:00
//check if this is windows or not
2024-05-08 14:10:00 -05:00
if ( System . getProperty ( " os.name " ) . contains ( " Windows " ) ) { Main . windows = true ; System . out . println ( " Assuming we should NOT use WINE based on known system variables. " ) ; changePage ( Pages . EXPORT_LOCATION ) ; }
else { Main . windows = false ; System . out . println ( " Assuming we should use WINE based on known system variables. " ) ; changePage ( Pages . EXPORT_LOCATION ) ; }
2024-04-10 01:29:24 -05:00
2024-04-09 22:06:05 -05:00
case EXPORT_LOCATION :
page = Pages . EXPORT_LOCATION ;
2024-04-10 02:15:36 -05:00
button . setVisible ( true ) ;
button . setBounds ( 292 , 343 , 300 , 30 ) ;
frame . add ( button ) ;
2024-07-01 14:37:09 -05:00
button3 . setVisible ( false ) ;
2024-04-10 02:15:36 -05:00
button3 . setBounds ( 0 , 343 , 292 , 30 ) ;
frame . add ( button3 ) ;
dialogText . setVisible ( true ) ;
dialogText . setHighlighter ( null ) ;
dialogText . getCaret ( ) . setVisible ( false ) ;
dialogText . setFocusable ( false ) ;
dialogText . setBounds ( 30 , 40 , 542 , 150 ) ;
StyleConstants . setAlignment ( align , StyleConstants . ALIGN_CENTER ) ;
document . setParagraphAttributes ( 0 , document . getLength ( ) , align , false ) ;
dialogText . setText ( " Now enter the location of your game's asset folder. \ n " +
" This can be your install directory on your emulator, your repatch folder on your Vita memory card, or a temporary directory you'd like to copy over yourself. \ n \ n " +
" PLEASE DO NOT POINT THIS DIRECTLY TO WHERE THE GAME IS INSTALLED ON A REAL VITA \ n " +
" (ux0:/app, ux0:/patch or ux0:/addcont) \ n " +
" AS THIS WILL CORRUPT YOUR GAME AND YOU WILL NEED TO REINSTALL IT. \ nDoing this on an emulator is fine. " ) ;
frame . add ( dialogText ) ;
pathInput . setVisible ( true ) ;
pathInput . setBounds ( 30 , 200 , 542 , 30 ) ;
frame . add ( pathInput ) ;
frame . setSize ( 600 , 400 ) ;
frame . setTitle ( " Initial Setup " ) ;
frame . setAlwaysOnTop ( true ) ;
frame . setDefaultCloseOperation ( 0 ) ;
frame . setResizable ( false ) ;
frame . setLayout ( null ) ;
frame . setVisible ( true ) ;
2024-04-09 22:06:05 -05:00
break ;
2024-04-09 23:24:54 -05:00
case IMPORT_LOCATION :
2024-04-10 02:15:36 -05:00
// I think for Fast Mode this step may be unnecessary? look into alternatives perhaps
2024-04-09 23:24:54 -05:00
page = Pages . IMPORT_LOCATION ;
2024-04-10 02:15:36 -05:00
pathInput . setVisible ( false ) ; //GET OUT OF MY HEAD
button . setVisible ( true ) ;
button . setBounds ( 292 , 343 , 300 , 30 ) ;
frame . add ( button ) ;
2024-07-01 14:37:09 -05:00
button3 . setVisible ( false ) ;
2024-04-10 02:15:36 -05:00
button3 . setBounds ( 0 , 343 , 292 , 30 ) ;
frame . add ( button3 ) ;
dialogText . setVisible ( true ) ;
dialogText . setHighlighter ( null ) ;
dialogText . getCaret ( ) . setVisible ( false ) ;
dialogText . setFocusable ( false ) ;
dialogText . setBounds ( 30 , 40 , 542 , 200 ) ;
StyleConstants . setAlignment ( align , StyleConstants . ALIGN_CENTER ) ;
document . setParagraphAttributes ( 0 , document . getLength ( ) , align , false ) ;
dialogText . setText ( " You're almost done! \ n \ n " +
" Please move all of your original PSARC files for WipEout (base game, patches, and HD Fury DLC) to the config folder and press Next when you are done. \ n " +
" Firestar will use these to generate new PSARCs in place of the old ones. \ n \ n " +
2024-07-01 14:37:09 -05:00
" If you do not already have these files, please read: \ nhttps://git.worlio.com/bonkmaykr/firestar/wiki/Decrypting-Original-PSARC-Files \ nto acquire them. " ) ;
2024-04-10 02:15:36 -05:00
frame . add ( dialogText ) ;
//pathInput.setVisible(true);
//pathInput.setBounds(30,200,542,30);
//frame.add(pathInput);
openconfigfolderbutton . setVisible ( true ) ;
openconfigfolderbutton . setBounds ( 30 , 250 , 542 , 30 ) ;
frame . add ( openconfigfolderbutton ) ;
frame . setSize ( 600 , 400 ) ;
frame . setTitle ( " Initial Setup " ) ;
frame . setAlwaysOnTop ( true ) ;
frame . setDefaultCloseOperation ( 0 ) ;
frame . setResizable ( false ) ;
frame . setLayout ( null ) ;
frame . setVisible ( true ) ;
2024-04-09 23:24:54 -05:00
break ;
2024-04-09 22:06:05 -05:00
case DONE :
page = Pages . DONE ;
2024-04-10 02:35:27 -05:00
Main . writeConf ( ) ; // save changes
//SERIOUS!!!!!!!!!!!!!! cleanup
button . setVisible ( false ) ; frame . remove ( button ) ;
button2 . setVisible ( false ) ; frame . remove ( button2 ) ;
button3 . setVisible ( false ) ; frame . remove ( button3 ) ;
button4 . setVisible ( false ) ; frame . remove ( button4 ) ;
openconfigfolderbutton . setVisible ( false ) ; frame . remove ( openconfigfolderbutton ) ;
pathInput . setVisible ( false ) ; frame . remove ( pathInput ) ;
buttonFast . setVisible ( false ) ; frame . remove ( buttonFast ) ;
buttonCompat . setVisible ( false ) ; frame . remove ( buttonCompat ) ;
buttonHaveWine . setVisible ( false ) ; frame . remove ( buttonHaveWine ) ;
buttonNoWine . setVisible ( false ) ; frame . remove ( buttonNoWine ) ;
//congrations, your did it (party time)
dialogText . setVisible ( true ) ;
dialogText . setHighlighter ( null ) ;
dialogText . getCaret ( ) . setVisible ( false ) ;
dialogText . setFocusable ( false ) ;
dialogText . setBounds ( 30 , 40 , 542 , 200 ) ;
StyleConstants . setAlignment ( align , StyleConstants . ALIGN_CENTER ) ;
document . setParagraphAttributes ( 0 , document . getLength ( ) , align , false ) ;
dialogText . setText ( " Firestar is ready! \ n \ n " +
2024-07-01 14:37:09 -05:00
" For technical support, see Help > Manual. " ) ;
2024-04-10 02:35:27 -05:00
frame . add ( dialogText ) ;
button . setVisible ( true ) ;
button . setBounds ( 292 , 343 , 300 , 30 ) ;
button . setText ( " OK " ) ;
frame . add ( button ) ;
frame . setSize ( 600 , 400 ) ;
frame . setTitle ( " Initial Setup " ) ;
frame . setAlwaysOnTop ( true ) ;
frame . setDefaultCloseOperation ( 0 ) ;
frame . setResizable ( false ) ;
frame . setLayout ( null ) ;
frame . setVisible ( true ) ;
2024-04-09 22:06:05 -05:00
break ;
default :
throw new UnsupportedOperationException ( " ERROR: Undefined behavior in Kermit.changePage(). Get a programmer! " ) ;
//JOptionPane OhShit = new JOptionPane.showMessageDialog(null, "Fuck");
}
}
}