Better visual feedback during asset decryption
This commit is contained in:
parent
34c5f17d71
commit
f615b199a4
|
@ -148,6 +148,8 @@ public class Bert implements ActionListener {
|
|||
|
||||
// dump contents
|
||||
System.out.println("Extracting asset.pkg");
|
||||
Fozzie popup = new Fozzie();
|
||||
popup.displayTextOnly("Extracting PKG...", "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()});}
|
||||
|
@ -202,6 +204,8 @@ public class Bert implements ActionListener {
|
|||
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));}
|
||||
|
@ -228,6 +232,8 @@ public class Bert implements ActionListener {
|
|||
return;
|
||||
}
|
||||
|
||||
popup.setText("Deleting temporary files...", "Cleaning Up");
|
||||
|
||||
// stage & cleanup
|
||||
System.out.println("Cleaning up");
|
||||
new File(Main.inpath + "asset.pkg").delete();
|
||||
|
@ -237,6 +243,8 @@ public class Bert implements ActionListener {
|
|||
Main.deleteDir(new File(Main.inpath + "addcont/"));
|
||||
Main.deleteDir(new File(Main.inpath + "temp/"));
|
||||
|
||||
popup.destroyDialog();
|
||||
|
||||
// restore controls
|
||||
JOptionPane.showMessageDialog(frame, "Assets downloaded successfully.", "Download Complete", JOptionPane.INFORMATION_MESSAGE);
|
||||
invoker.setEnabled(true);
|
||||
|
|
|
@ -96,6 +96,38 @@ public class Fozzie {
|
|||
}
|
||||
}
|
||||
|
||||
public void displayTextOnly(String text, String title) {
|
||||
frame.add(frameContainer);
|
||||
frame.setSize(300, 100);
|
||||
frame.setTitle(title);
|
||||
frame.setResizable(false);
|
||||
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
|
||||
frame.setLayout(new GridLayout());
|
||||
frame.setLocationRelativeTo(null);
|
||||
frame.setAlwaysOnTop(true);
|
||||
try {
|
||||
windowIcon = ImageIO.read(Main.class.getResourceAsStream("/titleIcon.png"));
|
||||
frame.setIconImage(windowIcon);
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Failed to find /resources/titleIcon.png. Window will not have an icon.");
|
||||
}
|
||||
frame.setVisible(true);
|
||||
|
||||
label.setText(text);
|
||||
|
||||
progressBar.setVisible(false);
|
||||
}
|
||||
|
||||
public void setText(String text, String title) {
|
||||
label.setText(text);
|
||||
frame.setTitle(title);
|
||||
}
|
||||
|
||||
public void destroyDialog() {
|
||||
frame.setVisible(false);
|
||||
frame.dispose();
|
||||
}
|
||||
|
||||
public void disconnect() throws IOException {
|
||||
inputStream.close();
|
||||
httpConn.disconnect();
|
||||
|
|
Loading…
Reference in New Issue
Block a user