Compare commits
4 Commits
2fcf7612a6
...
2de4167cea
Author | SHA1 | Date | |
---|---|---|---|
2de4167cea | |||
c5be641a20 | |||
317eeedb29 | |||
f209f5f37a |
|
@ -108,7 +108,7 @@
|
||||||
</component>
|
</component>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
<grid id="c82fd" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="1000f" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="0" left="0" bottom="0" right="0"/>
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
|
@ -120,54 +120,53 @@
|
||||||
</properties>
|
</properties>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<component id="11210" class="javax.swing.JRadioButton" binding="baseRad">
|
<component id="ec9c0" class="javax.swing.JCheckBox" binding="patchCheck">
|
||||||
<constraints>
|
|
||||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="6" fill="0" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<background color="-15128227"/>
|
|
||||||
<focusPainted value="false"/>
|
|
||||||
<foreground color="-1"/>
|
|
||||||
<horizontalTextPosition value="10"/>
|
|
||||||
<text value="Base game only, no updates"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="94d8" class="javax.swing.JRadioButton" binding="hdRad">
|
|
||||||
<constraints>
|
|
||||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="5" fill="0" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<background color="-15128227"/>
|
|
||||||
<focusPainted value="false"/>
|
|
||||||
<foreground color="-1"/>
|
|
||||||
<horizontalTextPosition value="10"/>
|
|
||||||
<text value="HD DLC, without Fury"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="69445" class="javax.swing.JRadioButton" binding="patchRad">
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="10" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="10" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-15128227"/>
|
<background color="-15128227"/>
|
||||||
<focusPainted value="false"/>
|
<font name="Exo 2"/>
|
||||||
<foreground color="-1"/>
|
<foreground color="-1"/>
|
||||||
<text value="Base game only, 1.04"/>
|
<horizontalTextPosition value="11"/>
|
||||||
|
<text value="Updates"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="35def" class="javax.swing.JRadioButton" binding="furyRad">
|
<component id="a6e9" class="javax.swing.JCheckBox" binding="baseCheck">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="6" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<background color="-15128227"/>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-1"/>
|
||||||
|
<horizontalTextPosition value="10"/>
|
||||||
|
<text value="Base game"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="f3723" class="javax.swing.JCheckBox" binding="hdCheck">
|
||||||
|
<constraints>
|
||||||
|
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="5" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<background color="-15128227"/>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-1"/>
|
||||||
|
<horizontalTextPosition value="10"/>
|
||||||
|
<text value="HD Add-On Pack"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="5ed0c" class="javax.swing.JCheckBox" binding="furyCheck">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-15128227"/>
|
<background color="-15128227"/>
|
||||||
<focusPainted value="false"/>
|
<font name="Exo 2"/>
|
||||||
<foreground color="-1"/>
|
<foreground color="-1"/>
|
||||||
<horizontalAlignment value="10"/>
|
|
||||||
<horizontalTextPosition value="11"/>
|
<horizontalTextPosition value="11"/>
|
||||||
<selected value="true"/>
|
<selected value="false"/>
|
||||||
<text value="HD Fury DLC"/>
|
<text value="Fury Add-On Pack"/>
|
||||||
<verticalTextPosition value="0"/>
|
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
</children>
|
</children>
|
||||||
|
|
|
@ -25,6 +25,7 @@ import java.awt.event.WindowAdapter;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Bert implements ActionListener {
|
public class Bert implements ActionListener {
|
||||||
BufferedImage windowIcon;
|
BufferedImage windowIcon;
|
||||||
|
@ -32,10 +33,10 @@ public class Bert implements ActionListener {
|
||||||
private JPanel frameContainer;
|
private JPanel frameContainer;
|
||||||
private JButton cancelbtn;
|
private JButton cancelbtn;
|
||||||
private JButton downloadbtn;
|
private JButton downloadbtn;
|
||||||
private JRadioButton baseRad;
|
private JCheckBox patchCheck;
|
||||||
private JRadioButton patchRad;
|
private JCheckBox baseCheck;
|
||||||
private JRadioButton hdRad;
|
private JCheckBox hdCheck;
|
||||||
private JRadioButton furyRad;
|
private JCheckBox furyCheck;
|
||||||
private ButtonGroup radios = new ButtonGroup();
|
private ButtonGroup radios = new ButtonGroup();
|
||||||
|
|
||||||
private JFrame invoker;
|
private JFrame invoker;
|
||||||
|
@ -56,11 +57,6 @@ public class Bert implements ActionListener {
|
||||||
frame.setLocationRelativeTo(parent);
|
frame.setLocationRelativeTo(parent);
|
||||||
frame.setAlwaysOnTop(true);
|
frame.setAlwaysOnTop(true);
|
||||||
|
|
||||||
radios.add(baseRad);
|
|
||||||
radios.add(patchRad);
|
|
||||||
radios.add(hdRad);
|
|
||||||
radios.add(furyRad);
|
|
||||||
|
|
||||||
cancelbtn.addActionListener(this);
|
cancelbtn.addActionListener(this);
|
||||||
downloadbtn.addActionListener(this);
|
downloadbtn.addActionListener(this);
|
||||||
|
|
||||||
|
@ -112,29 +108,31 @@ public class Bert implements ActionListener {
|
||||||
new File(Main.inpath + "dlc1.psarc").delete();
|
new File(Main.inpath + "dlc1.psarc").delete();
|
||||||
new File(Main.inpath + "dlc2.psarc").delete();
|
new File(Main.inpath + "dlc2.psarc").delete();
|
||||||
|
|
||||||
Main.ArcTarget type;
|
ArrayList<Main.ArcTarget> arcs = new ArrayList<Main.ArcTarget>();
|
||||||
Main.ArcKey key;
|
ArrayList<Main.ArcKey> keys = new ArrayList<Main.ArcKey>();
|
||||||
if (baseRad.isSelected()) {
|
if (baseCheck.isSelected()) {
|
||||||
type = Main.ArcTarget.BASE;
|
arcs.add(Main.ArcTarget.BASE);
|
||||||
key = Main.ArcKey.BASE;
|
keys.add(Main.ArcKey.BASE);
|
||||||
System.out.println("Begin download of data (Game version 1.0)");
|
System.out.println("Begin download of data (Game version 1.0)");
|
||||||
} else
|
}
|
||||||
if (patchRad.isSelected()) {
|
if (patchCheck.isSelected()) {
|
||||||
type = Main.ArcTarget.LATEST;
|
arcs.add(Main.ArcTarget.LATEST);
|
||||||
key = Main.ArcKey.LATEST;
|
keys.add(Main.ArcKey.LATEST);
|
||||||
System.out.println("Begin download of data2 (Game version 1.04)");
|
System.out.println("Begin download of data2 (Game version 1.04)");
|
||||||
} else
|
}
|
||||||
if (hdRad.isSelected()) {
|
if (hdCheck.isSelected()) {
|
||||||
type = Main.ArcTarget.ADDON_HD;
|
arcs.add(Main.ArcTarget.ADDON_HD);
|
||||||
key = Main.ArcKey.ADDON_HD;
|
keys.add(Main.ArcKey.ADDON_HD);
|
||||||
System.out.println("Begin download of dlc1 (HD DLC)");
|
System.out.println("Begin download of dlc1 (HD DLC)");
|
||||||
} else
|
}
|
||||||
if (furyRad.isSelected()) {
|
if (furyCheck.isSelected()) {
|
||||||
type = Main.ArcTarget.ADDON_HD_FURY;
|
arcs.add(Main.ArcTarget.ADDON_HD_FURY);
|
||||||
key = Main.ArcKey.ADDON_HD_FURY;
|
keys.add(Main.ArcKey.ADDON_HD_FURY);
|
||||||
System.out.println("Begin download of dlc2 (Fury DLC)");
|
System.out.println("Begin download of dlc2 (Fury DLC)");
|
||||||
} else {
|
}
|
||||||
return; // fire hydrant
|
if (arcs.isEmpty()) {
|
||||||
|
JOptionPane.showMessageDialog(invoker, "Select one or more asset packs.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame.dispose();
|
frame.dispose();
|
||||||
|
@ -143,119 +141,155 @@ public class Bert implements ActionListener {
|
||||||
Thread downloaderPopupThread = new Thread(new Runnable() { // run on separate thread to prevent GUI freezing
|
Thread downloaderPopupThread = new Thread(new Runnable() { // run on separate thread to prevent GUI freezing
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
// download file
|
for (Main.ArcTarget type : arcs) {
|
||||||
boolean downloader = new Fozzie().DownloadFile(type.toString(), Main.inpath, "asset.pkg");
|
String key = "";
|
||||||
if (!downloader) {
|
String arcname = "";
|
||||||
// cleanup
|
switch (type) {
|
||||||
new File(Main.inpath + "asset.pkg").delete();
|
case BASE :
|
||||||
|
key = Main.ArcKey.BASE.toString();
|
||||||
// restore controls
|
arcname = "Base game";
|
||||||
invoker.setEnabled(true);
|
break;
|
||||||
invoker.setVisible(true);
|
case LATEST :
|
||||||
invoker.toFront();
|
key = Main.ArcKey.LATEST.toString();
|
||||||
invoker.repaint();
|
arcname = "Updates";
|
||||||
return;
|
break;
|
||||||
}
|
case ADDON_HD :
|
||||||
|
key = Main.ArcKey.ADDON_HD.toString();
|
||||||
// dump contents
|
arcname = "HD Add-On Pack";
|
||||||
System.out.println("Extracting asset.pkg");
|
break;
|
||||||
Fozzie popup = new Fozzie();
|
case ADDON_HD_FURY :
|
||||||
popup.displayTextOnly("Extracting PKG...", "Extracting");
|
key = Main.ArcKey.ADDON_HD_FURY.toString();
|
||||||
Process p;
|
arcname = "Fury Add-On Pack";
|
||||||
try {
|
break;
|
||||||
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));} //inpath cannot change here
|
if (key.isEmpty()) {
|
||||||
InputStream debugin = new BufferedInputStream(p.getInputStream());
|
System.out.println("Internal Error: Bert got dementia. Get a programmer!");
|
||||||
OutputStream debugout = new BufferedOutputStream(System.out);
|
JOptionPane.showMessageDialog(invoker, "Internal Error: Bert got dementia. Get a programmer!", "Fatal Error", JOptionPane.ERROR_MESSAGE);
|
||||||
int c;
|
return;
|
||||||
while ((c = debugin.read()) != -1) {
|
|
||||||
debugout.write(c);
|
|
||||||
}
|
}
|
||||||
debugin.close();
|
|
||||||
debugout.close();
|
|
||||||
p.waitFor();
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println(e.getMessage());
|
|
||||||
JOptionPane.showMessageDialog(invoker, "CRITICAL FAILURE: " + e.getMessage(), "Fatal Error", JOptionPane.ERROR_MESSAGE);
|
|
||||||
new File(Main.inpath + "asset.pkg").delete();
|
|
||||||
invoker.setEnabled(true);
|
|
||||||
invoker.setVisible(true);
|
|
||||||
invoker.toFront();
|
|
||||||
invoker.repaint();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// decrypt
|
// download file
|
||||||
System.out.println("Decrypting asset.pkg");
|
Fozzie downloaderHandler = new Fozzie();
|
||||||
String extracted;
|
boolean downloader = downloaderHandler.DownloadFile(type.toString(), Main.inpath, "asset.pkg", arcname);
|
||||||
String name;
|
|
||||||
if (type == Main.ArcTarget.BASE) {
|
if (!downloader) {
|
||||||
extracted = "app/PCSA00015";
|
// cleanup
|
||||||
name = "data.psarc";
|
new File(Main.inpath + "asset.pkg").delete();
|
||||||
} else if (type == Main.ArcTarget.LATEST) {
|
|
||||||
extracted = "patch/PCSA00015";
|
// restore controls
|
||||||
name = "data2.psarc";
|
invoker.setEnabled(true);
|
||||||
} else if (type == Main.ArcTarget.ADDON_HD) {
|
invoker.setVisible(true);
|
||||||
extracted = "addcont/PCSA00015/DLC1W2048PACKAGE";
|
invoker.toFront();
|
||||||
name = "dlc1.psarc";
|
invoker.repaint();
|
||||||
} else if (type == Main.ArcTarget.ADDON_HD_FURY) { // this is not "always true" - intellij is actually very dumj
|
return;
|
||||||
extracted = "addcont/PCSA00015/DLC2W2048PACKAGE";
|
}
|
||||||
name = "dlc2.psarc";
|
|
||||||
} else {
|
// dump contents
|
||||||
System.out.println("Internal Error: Bert got dementia. Get a programmer!");
|
System.out.println("Extracting " + arcname);
|
||||||
JOptionPane.showMessageDialog(invoker, "Internal Error: Bert got dementia. Get a programmer!", "Fatal Error", JOptionPane.ERROR_MESSAGE);
|
Fozzie popup = new Fozzie();
|
||||||
|
popup.displayTextOnly("Extracting" + arcname + "...", "Extracting");
|
||||||
|
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));
|
||||||
|
} //inpath cannot change here
|
||||||
|
InputStream debugin = new BufferedInputStream(p.getInputStream());
|
||||||
|
OutputStream debugout = new BufferedOutputStream(System.out);
|
||||||
|
int c;
|
||||||
|
while ((c = debugin.read()) != -1) {
|
||||||
|
debugout.write(c);
|
||||||
|
}
|
||||||
|
debugin.close();
|
||||||
|
debugout.close();
|
||||||
|
p.waitFor();
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println(e.getMessage());
|
||||||
|
JOptionPane.showMessageDialog(invoker, "CRITICAL FAILURE: " + e.getMessage(), "Fatal Error", JOptionPane.ERROR_MESSAGE);
|
||||||
|
new File(Main.inpath + "asset.pkg").delete();
|
||||||
|
invoker.setEnabled(true);
|
||||||
|
invoker.setVisible(true);
|
||||||
|
invoker.toFront();
|
||||||
|
invoker.repaint();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// decrypt
|
||||||
|
System.out.println("Decrypting asset.pkg");
|
||||||
|
String extracted;
|
||||||
|
String name;
|
||||||
|
if (type == Main.ArcTarget.BASE) {
|
||||||
|
extracted = "app/PCSA00015";
|
||||||
|
name = "data.psarc";
|
||||||
|
} else if (type == Main.ArcTarget.LATEST) {
|
||||||
|
extracted = "patch/PCSA00015";
|
||||||
|
name = "data2.psarc";
|
||||||
|
} else if (type == Main.ArcTarget.ADDON_HD) {
|
||||||
|
extracted = "addcont/PCSA00015/DLC1W2048PACKAGE";
|
||||||
|
name = "dlc1.psarc";
|
||||||
|
} 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 {
|
||||||
|
System.out.println("Internal Error: Bert got dementia. Get a programmer!");
|
||||||
|
JOptionPane.showMessageDialog(invoker, "Internal Error: Bert got dementia. Get a programmer!", "Fatal Error", JOptionPane.ERROR_MESSAGE);
|
||||||
|
new File(Main.inpath + "asset.pkg").delete();
|
||||||
|
Main.deleteDir(new File(Main.inpath + "app/"));
|
||||||
|
Main.deleteDir(new File(Main.inpath + "patch/"));
|
||||||
|
Main.deleteDir(new File(Main.inpath + "addcont/"));
|
||||||
|
invoker.setEnabled(true);
|
||||||
|
invoker.setVisible(true);
|
||||||
|
invoker.toFront();
|
||||||
|
invoker.repaint();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
popup.setText("<html>Decrypting protected PFS:<br/>" + extracted + "</html>", "Decrypting");
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (!Main.windows) {
|
||||||
|
p = Runtime.getRuntime().exec(new String[]{"bash", "-c", "cd " + Main.inpath + ";wine psvpfsparser.exe -i " + extracted + " -o ./temp/ -z " + key.toString() + " -f cma.henkaku.xyz"});
|
||||||
|
} else {
|
||||||
|
p = Runtime.getRuntime().exec(new String[]{Main.inpath + "psvpfsparser.exe", "-i", extracted, "-o", "./temp/", "-z", key.toString(), "-f", "cma.henkaku.xyz"}, null, new File(Main.inpath));
|
||||||
|
}
|
||||||
|
InputStream debugin = new BufferedInputStream(p.getInputStream());
|
||||||
|
OutputStream debugout = new BufferedOutputStream(System.out);
|
||||||
|
int c;
|
||||||
|
while ((c = debugin.read()) != -1) {
|
||||||
|
debugout.write(c);
|
||||||
|
}
|
||||||
|
debugin.close();
|
||||||
|
debugout.close();
|
||||||
|
p.waitFor();
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println(e.getMessage());
|
||||||
|
JOptionPane.showMessageDialog(invoker, "CRITICAL FAILURE: " + e.getMessage(), "Fatal Error", JOptionPane.ERROR_MESSAGE);
|
||||||
|
new File(Main.inpath + "asset.pkg").delete();
|
||||||
|
Main.deleteDir(new File(Main.inpath + "app/"));
|
||||||
|
Main.deleteDir(new File(Main.inpath + "patch/"));
|
||||||
|
Main.deleteDir(new File(Main.inpath + "addcont/"));
|
||||||
|
invoker.setEnabled(true);
|
||||||
|
invoker.setVisible(true);
|
||||||
|
invoker.toFront();
|
||||||
|
invoker.repaint();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
popup.setText("Deleting temporary files...", "Cleaning Up");
|
||||||
|
|
||||||
|
// stage & cleanup
|
||||||
|
System.out.println("Cleaning up");
|
||||||
new File(Main.inpath + "asset.pkg").delete();
|
new File(Main.inpath + "asset.pkg").delete();
|
||||||
|
new File(Main.inpath + "temp/PSP2/" + name).renameTo(new File(Main.inpath + name));
|
||||||
Main.deleteDir(new File(Main.inpath + "app/"));
|
Main.deleteDir(new File(Main.inpath + "app/"));
|
||||||
Main.deleteDir(new File(Main.inpath + "patch/"));
|
Main.deleteDir(new File(Main.inpath + "patch/"));
|
||||||
Main.deleteDir(new File(Main.inpath + "addcont/"));
|
Main.deleteDir(new File(Main.inpath + "addcont/"));
|
||||||
invoker.setEnabled(true);
|
Main.deleteDir(new File(Main.inpath + "temp/"));
|
||||||
invoker.setVisible(true);
|
|
||||||
invoker.toFront();
|
popup.destroyDialog();
|
||||||
invoker.repaint();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
popup.setText("<html>Decrypting protected PFS:<br/>" + extracted + "</html>", "Decrypting");
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (!Main.windows) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + Main.inpath + ";wine psvpfsparser.exe -i " + extracted + " -o ./temp/ -z " + key.toString() + " -f cma.henkaku.xyz"});}
|
|
||||||
else {p = Runtime.getRuntime().exec(new String[]{Main.inpath + "psvpfsparser.exe", "-i", extracted, "-o", "./temp/", "-z", key.toString(), "-f", "cma.henkaku.xyz"}, null, new File(Main.inpath));}
|
|
||||||
InputStream debugin = new BufferedInputStream(p.getInputStream());
|
|
||||||
OutputStream debugout = new BufferedOutputStream(System.out);
|
|
||||||
int c;
|
|
||||||
while ((c = debugin.read()) != -1) {
|
|
||||||
debugout.write(c);
|
|
||||||
}
|
|
||||||
debugin.close();
|
|
||||||
debugout.close();
|
|
||||||
p.waitFor();
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println(e.getMessage());
|
|
||||||
JOptionPane.showMessageDialog(invoker, "CRITICAL FAILURE: " + e.getMessage(), "Fatal Error", JOptionPane.ERROR_MESSAGE);
|
|
||||||
new File(Main.inpath + "asset.pkg").delete();
|
|
||||||
Main.deleteDir(new File(Main.inpath + "app/"));
|
|
||||||
Main.deleteDir(new File(Main.inpath + "patch/"));
|
|
||||||
Main.deleteDir(new File(Main.inpath + "addcont/"));
|
|
||||||
invoker.setEnabled(true);
|
|
||||||
invoker.setVisible(true);
|
|
||||||
invoker.toFront();
|
|
||||||
invoker.repaint();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
popup.setText("Deleting temporary files...", "Cleaning Up");
|
|
||||||
|
|
||||||
// stage & cleanup
|
|
||||||
System.out.println("Cleaning up");
|
|
||||||
new File(Main.inpath + "asset.pkg").delete();
|
|
||||||
new File(Main.inpath + "temp/PSP2/" + name).renameTo(new File(Main.inpath + name));
|
|
||||||
Main.deleteDir(new File(Main.inpath + "app/"));
|
|
||||||
Main.deleteDir(new File(Main.inpath + "patch/"));
|
|
||||||
Main.deleteDir(new File(Main.inpath + "addcont/"));
|
|
||||||
Main.deleteDir(new File(Main.inpath + "temp/"));
|
|
||||||
|
|
||||||
popup.destroyDialog();
|
|
||||||
|
|
||||||
// restore controls
|
// restore controls
|
||||||
JOptionPane.showMessageDialog(frame, "Assets downloaded successfully.", "Download Complete", JOptionPane.INFORMATION_MESSAGE);
|
JOptionPane.showMessageDialog(frame, "Assets downloaded successfully.", "Download Complete", JOptionPane.INFORMATION_MESSAGE);
|
||||||
invoker.setEnabled(true);
|
invoker.setEnabled(true);
|
||||||
|
|
|
@ -27,6 +27,7 @@ import java.net.*;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
public class Fozzie {
|
public class Fozzie {
|
||||||
BufferedImage windowIcon;
|
BufferedImage windowIcon;
|
||||||
|
@ -42,6 +43,10 @@ public class Fozzie {
|
||||||
public boolean backgroundDone = false;
|
public boolean backgroundDone = false;
|
||||||
|
|
||||||
boolean DownloadFile(String url, String odir, String oname) {
|
boolean DownloadFile(String url, String odir, String oname) {
|
||||||
|
return DownloadFile(url, odir, oname, oname);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean DownloadFile(String url, String odir, String oname, String dname) {
|
||||||
frame.add(frameContainer);
|
frame.add(frameContainer);
|
||||||
frame.setSize(300, 100);
|
frame.setSize(300, 100);
|
||||||
frame.setTitle("Download in Progress");
|
frame.setTitle("Download in Progress");
|
||||||
|
@ -58,7 +63,7 @@ public class Fozzie {
|
||||||
}
|
}
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
label.setText("Downloading \"" + oname + "\"");
|
label.setText("Downloading \"" + dname + "\"");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
URL fileURL = new URL(url);
|
URL fileURL = new URL(url);
|
||||||
|
|
|
@ -35,8 +35,6 @@ public class Main {
|
||||||
public static final int vint = 1;
|
public static final int vint = 1;
|
||||||
|
|
||||||
// User Settings
|
// User Settings
|
||||||
// TODO: replace with user preference when config i/o is done
|
|
||||||
// also please double check that outpath is actually valid
|
|
||||||
public static String outpath = System.getProperty("user.home") + "/.firestar/out/"; //game assets location
|
public static String outpath = System.getProperty("user.home") + "/.firestar/out/"; //game assets location
|
||||||
public final static String inpath = System.getProperty("user.home") + "/.firestar/"; //firestar folder -- do not change this
|
public final static String inpath = System.getProperty("user.home") + "/.firestar/"; //firestar folder -- do not change this
|
||||||
public static boolean repatch; //are we in compat mode?
|
public static boolean repatch; //are we in compat mode?
|
||||||
|
@ -78,7 +76,6 @@ public class Main {
|
||||||
public class Mod {
|
public class Mod {
|
||||||
public String path; // file name
|
public String path; // file name
|
||||||
public int version = 1;
|
public int version = 1;
|
||||||
//public int gameversion; //TODO detect a game version and compatibility? // no
|
|
||||||
public int priority = 0; //unused
|
public int priority = 0; //unused
|
||||||
public String friendlyName;
|
public String friendlyName;
|
||||||
public String description = "";
|
public String description = "";
|
||||||
|
|
|
@ -193,7 +193,6 @@ public class MissPiggy implements ActionListener {
|
||||||
Main.Mods.clear();
|
Main.Mods.clear();
|
||||||
|
|
||||||
// get current list of mods from file
|
// get current list of mods from file
|
||||||
// todo: rewrite when modpacks/playlists are added
|
|
||||||
try {
|
try {
|
||||||
priorityList = new String(Files.readAllBytes(Paths.get(System.getProperty("user.home") + "/.firestar/mods/index")));
|
priorityList = new String(Files.readAllBytes(Paths.get(System.getProperty("user.home") + "/.firestar/mods/index")));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="WilkinsCoffee">
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="WilkinsCoffee">
|
||||||
<grid id="27dc6" binding="frameContainer" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="27dc6" binding="frameContainer" layout-manager="GridLayoutManager" row-count="5" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="10" left="10" bottom="10" right="10"/>
|
<margin top="10" left="10" bottom="10" right="10"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<xy x="20" y="20" width="416" height="479"/>
|
<xy x="20" y="20" width="416" height="479"/>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</component>
|
</component>
|
||||||
<component id="29913" class="javax.swing.JEditorPane" binding="instructions">
|
<component id="29913" class="javax.swing.JEditorPane" binding="instructions">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="1" use-parent-layout="false">
|
<grid row="0" column="1" row-span="2" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="1" use-parent-layout="false">
|
||||||
<preferred-size width="150" height="50"/>
|
<preferred-size width="150" height="50"/>
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
</component>
|
</component>
|
||||||
<component id="c3ec3" class="javax.swing.JButton" binding="contBtn">
|
<component id="c3ec3" class="javax.swing.JButton" binding="contBtn">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="3" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="4" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-2271221"/>
|
<background color="-2271221"/>
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<grid id="ee2dd" binding="inputContainer" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="ee2dd" binding="inputContainer" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="0" left="0" bottom="3" right="0"/>
|
<margin top="0" left="0" bottom="3" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="3" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-15128227"/>
|
<background color="-15128227"/>
|
||||||
|
@ -66,21 +66,9 @@
|
||||||
</properties>
|
</properties>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<component id="1c41b" class="javax.swing.JButton" binding="PSARC_downBtn">
|
|
||||||
<constraints>
|
|
||||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<background color="-2271221"/>
|
|
||||||
<borderPainted value="false"/>
|
|
||||||
<focusPainted value="false"/>
|
|
||||||
<foreground color="-1"/>
|
|
||||||
<text value="Auto-Download"/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="30c84" class="javax.swing.JButton" binding="PSARC_impBtn">
|
<component id="30c84" class="javax.swing.JButton" binding="PSARC_impBtn">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="2" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-2271221"/>
|
<background color="-2271221"/>
|
||||||
|
@ -90,12 +78,24 @@
|
||||||
<text value="Import My Own"/>
|
<text value="Import My Own"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
|
<component id="1c41b" class="javax.swing.JButton" binding="PSARC_downBtn">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="2" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<background color="-2271221"/>
|
||||||
|
<borderPainted value="false"/>
|
||||||
|
<focusPainted value="false"/>
|
||||||
|
<foreground color="-1"/>
|
||||||
|
<text value="Auto-Download"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
<grid id="8468" binding="inputContainer2" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="8468" binding="inputContainer2" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="0" left="0" bottom="3" right="0"/>
|
<margin top="0" left="0" bottom="3" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-15128227"/>
|
<background color="-15128227"/>
|
||||||
|
@ -126,6 +126,81 @@
|
||||||
</component>
|
</component>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
|
<grid id="71c64" binding="checklistContainer" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
|
<constraints>
|
||||||
|
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="2" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<background color="-15128227"/>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-1"/>
|
||||||
|
<opaque value="false"/>
|
||||||
|
</properties>
|
||||||
|
<border type="none"/>
|
||||||
|
<children>
|
||||||
|
<component id="eae72" class="javax.swing.JLabel" binding="checklistFury">
|
||||||
|
<constraints>
|
||||||
|
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<background color="-15128227"/>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-1"/>
|
||||||
|
<icon value="lightNegative.png"/>
|
||||||
|
<text value="Fury DLC"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="ae838" class="javax.swing.JLabel" binding="checklistHD">
|
||||||
|
<constraints>
|
||||||
|
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<background color="-15128227"/>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-1"/>
|
||||||
|
<icon value="lightNegative.png"/>
|
||||||
|
<text value="HD DLC"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="35a85" class="javax.swing.JLabel" binding="checklistPatch2">
|
||||||
|
<constraints>
|
||||||
|
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<background color="-15128227"/>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-1"/>
|
||||||
|
<icon value="lightNegative.png"/>
|
||||||
|
<text value="Patch 2"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="4ca0c" class="javax.swing.JLabel" binding="checklistPatch1">
|
||||||
|
<constraints>
|
||||||
|
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<background color="-15128227"/>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-1"/>
|
||||||
|
<icon value="lightNegative.png"/>
|
||||||
|
<text value="Patch 1"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="94f98" class="javax.swing.JLabel" binding="checklistBase">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<background color="-15128227"/>
|
||||||
|
<font name="Exo 2"/>
|
||||||
|
<foreground color="-1"/>
|
||||||
|
<icon value="lightNegative.png"/>
|
||||||
|
<text value="Base"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
</children>
|
||||||
|
</grid>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -46,6 +46,12 @@ public class WilkinsCoffee implements ActionListener {
|
||||||
private JPanel inputContainer2;
|
private JPanel inputContainer2;
|
||||||
private JButton EXPORT_openFolderBtn;
|
private JButton EXPORT_openFolderBtn;
|
||||||
private JLabel pathDisplay;
|
private JLabel pathDisplay;
|
||||||
|
private JPanel checklistContainer;
|
||||||
|
private JLabel checklistFury;
|
||||||
|
private JLabel checklistHD;
|
||||||
|
private JLabel checklistPatch2;
|
||||||
|
private JLabel checklistPatch1;
|
||||||
|
private JLabel checklistBase;
|
||||||
|
|
||||||
public enum Pages {
|
public enum Pages {
|
||||||
INTRO(0),
|
INTRO(0),
|
||||||
|
@ -66,6 +72,7 @@ public class WilkinsCoffee implements ActionListener {
|
||||||
public void setup() {
|
public void setup() {
|
||||||
page = Pages.INTRO;
|
page = Pages.INTRO;
|
||||||
inputContainer.setVisible(false);
|
inputContainer.setVisible(false);
|
||||||
|
checklistContainer.setVisible(false);
|
||||||
inputContainer2.setVisible(false);
|
inputContainer2.setVisible(false);
|
||||||
|
|
||||||
// check if this is windows or not
|
// check if this is windows or not
|
||||||
|
@ -110,6 +117,7 @@ public class WilkinsCoffee implements ActionListener {
|
||||||
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
|
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||||
frame.setLayout(new GridLayout());
|
frame.setLayout(new GridLayout());
|
||||||
frame.setLocationRelativeTo(null);
|
frame.setLocationRelativeTo(null);
|
||||||
|
refreshChecklist();
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +130,8 @@ public class WilkinsCoffee implements ActionListener {
|
||||||
if (new Bert(frame).reportWhenDownloaded(threadParent)) {
|
if (new Bert(frame).reportWhenDownloaded(threadParent)) {
|
||||||
contBtn.setEnabled(true);
|
contBtn.setEnabled(true);
|
||||||
contBtn.setBackground(new Color(221, 88, 11)); //orange
|
contBtn.setBackground(new Color(221, 88, 11)); //orange
|
||||||
|
|
||||||
|
refreshChecklist();
|
||||||
}
|
}
|
||||||
}});
|
}});
|
||||||
waiterThread.start();
|
waiterThread.start();
|
||||||
|
@ -135,6 +145,7 @@ public class WilkinsCoffee implements ActionListener {
|
||||||
if (result == JFileChooser.APPROVE_OPTION) {
|
if (result == JFileChooser.APPROVE_OPTION) {
|
||||||
try {
|
try {
|
||||||
Files.copy(fileChooser.getSelectedFile().toPath(), new File(Main.inpath + fileChooser.getSelectedFile().getName()).toPath());
|
Files.copy(fileChooser.getSelectedFile().toPath(), new File(Main.inpath + fileChooser.getSelectedFile().getName()).toPath());
|
||||||
|
refreshChecklist();
|
||||||
contBtn.setEnabled(true);
|
contBtn.setEnabled(true);
|
||||||
contBtn.setBackground(new Color(221, 88, 11)); //orange
|
contBtn.setBackground(new Color(221, 88, 11)); //orange
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -189,6 +200,7 @@ public class WilkinsCoffee implements ActionListener {
|
||||||
contBtn.setEnabled(false);
|
contBtn.setEnabled(false);
|
||||||
contBtn.setBackground(new Color(102, 74, 58)); //brown
|
contBtn.setBackground(new Color(102, 74, 58)); //brown
|
||||||
inputContainer.setVisible(true);
|
inputContainer.setVisible(true);
|
||||||
|
checklistContainer.setVisible(true);
|
||||||
if (!sdkInstalled) {
|
if (!sdkInstalled) {
|
||||||
PSARC_downBtn.setEnabled(false);
|
PSARC_downBtn.setEnabled(false);
|
||||||
PSARC_downBtn.setBackground(new Color(102, 74, 58)); //brown
|
PSARC_downBtn.setBackground(new Color(102, 74, 58)); //brown
|
||||||
|
@ -221,6 +233,7 @@ public class WilkinsCoffee implements ActionListener {
|
||||||
contBtn.setEnabled(true);
|
contBtn.setEnabled(true);
|
||||||
contBtn.setBackground(new Color(221, 88, 11)); //orange
|
contBtn.setBackground(new Color(221, 88, 11)); //orange
|
||||||
inputContainer.setVisible(false);
|
inputContainer.setVisible(false);
|
||||||
|
checklistContainer.setVisible(false);
|
||||||
inputContainer2.setVisible(true);
|
inputContainer2.setVisible(true);
|
||||||
|
|
||||||
instructions.setText("<html>\n" +
|
instructions.setText("<html>\n" +
|
||||||
|
@ -275,4 +288,25 @@ public class WilkinsCoffee implements ActionListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void refreshChecklist() {
|
||||||
|
ImageIcon positive = new ImageIcon(Main.class.getResource("/lightPositive.png"));
|
||||||
|
ImageIcon negative = new ImageIcon(Main.class.getResource("/lightNegative.png"));
|
||||||
|
|
||||||
|
if(new File(Main.inpath + "data.psarc").exists()) {
|
||||||
|
checklistBase.setIcon(positive);
|
||||||
|
} else {checklistBase.setIcon(negative);}
|
||||||
|
if(new File(Main.inpath + "data1.psarc").exists()) {
|
||||||
|
checklistPatch1.setIcon(positive);
|
||||||
|
} else {checklistPatch1.setIcon(negative);}
|
||||||
|
if(new File(Main.inpath + "data2.psarc").exists()) {
|
||||||
|
checklistPatch2.setIcon(positive);
|
||||||
|
} else {checklistPatch2.setIcon(negative);}
|
||||||
|
if(new File(Main.inpath + "dlc1.psarc").exists()) {
|
||||||
|
checklistHD.setIcon(positive);
|
||||||
|
} else {checklistHD.setIcon(negative);}
|
||||||
|
if(new File(Main.inpath + "dlc2.psarc").exists()) {
|
||||||
|
checklistFury.setIcon(positive);
|
||||||
|
} else {checklistFury.setIcon(negative);}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
firestar/src/main/resources/lightNegative.png
Normal file
BIN
firestar/src/main/resources/lightNegative.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 823 B |
BIN
firestar/src/main/resources/lightPositive.png
Normal file
BIN
firestar/src/main/resources/lightPositive.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 851 B |
Loading…
Reference in New Issue
Block a user