Compare commits
7 Commits
beta-4
...
0a9d8d1bfd
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a9d8d1bfd | |||
| c29448a521 | |||
| 81350dd06b | |||
| d839687040 | |||
| be3c42d7b4 | |||
| 59b070214c | |||
| 2c0e05865f |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -28,3 +28,5 @@ bin/
|
|||||||
### Mac OS ###
|
### Mac OS ###
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/firestar.zip
|
/firestar.zip
|
||||||
|
/run-linux.sh
|
||||||
|
/run-win32.bat
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Firestar is a mod manager for WipEout 2048 which automatically handles sorting m
|
|||||||
- misc. tools (pack creator, soundtrack mod generator...)
|
- misc. tools (pack creator, soundtrack mod generator...)
|
||||||
- initial setup screen can still be a bit arduous for vita newbies
|
- initial setup screen can still be a bit arduous for vita newbies
|
||||||
|
|
||||||
|
## Video Tutorial: [>> CLICK HERE <<](https://www.youtube.com/watch?v=Bi9fpqR2Ulw)
|
||||||

|

|
||||||
|
|
||||||
# System Requirements
|
# System Requirements
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class Main {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// license string
|
// license string
|
||||||
System.out.printf("FIRESTAR MOD MANAGER for WipEout 2048\nversion " + vstr + " (codename " + vcode + ")\n" +
|
System.out.printf("FIRESTAR MOD MANAGER for WipEout 2048\nversion " + vstr + " (codename " + vcode + ") major " + vint + "\n" +
|
||||||
"JVM host appears to be " + System.getProperty("os.name") +
|
"JVM host appears to be " + System.getProperty("os.name") +
|
||||||
"\nRunning from " + System.getProperty("user.dir") +
|
"\nRunning from " + System.getProperty("user.dir") +
|
||||||
"\nCopyright (C) 2024 bonkmaykr\n\nThis program is free software: you can redistribute it and/or modify\n" +
|
"\nCopyright (C) 2024 bonkmaykr\n\nThis program is free software: you can redistribute it and/or modify\n" +
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import java.util.Random;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import net.lingala.zip4j.*;
|
import net.lingala.zip4j.*;
|
||||||
import net.lingala.zip4j.exception.ZipException;
|
import net.lingala.zip4j.exception.ZipException;
|
||||||
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import static java.nio.file.StandardCopyOption.*;
|
import static java.nio.file.StandardCopyOption.*;
|
||||||
|
|
||||||
@@ -103,6 +104,8 @@ public class MissPiggy implements ActionListener {
|
|||||||
toolsMenu.add(new JMenuItem("Create Soundtrack Mod..."));
|
toolsMenu.add(new JMenuItem("Create Soundtrack Mod..."));
|
||||||
//toolsMenu.add(new JMenuItem("Download Mod from URL")); // TODO: implement. move option to File menu. should be ez
|
//toolsMenu.add(new JMenuItem("Download Mod from URL")); // TODO: implement. move option to File menu. should be ez
|
||||||
|
|
||||||
|
helpMenu.add(new JMenuItem("Manual"));
|
||||||
|
helpMenu.add(new JSeparator());
|
||||||
helpMenu.add(new JMenuItem("Source Code")); //replace with Website 'screwgravity.net' and 'Issue Tracker' gitea later
|
helpMenu.add(new JMenuItem("Source Code")); //replace with Website 'screwgravity.net' and 'Issue Tracker' gitea later
|
||||||
helpMenu.add(new JMenuItem("License"));
|
helpMenu.add(new JMenuItem("License"));
|
||||||
helpMenu.add(new JSeparator());
|
helpMenu.add(new JSeparator());
|
||||||
@@ -128,8 +131,9 @@ public class MissPiggy implements ActionListener {
|
|||||||
toolsMenu.getItem(1).addActionListener(this);
|
toolsMenu.getItem(1).addActionListener(this);
|
||||||
toolsMenu.getItem(2).addActionListener(this);
|
toolsMenu.getItem(2).addActionListener(this);
|
||||||
helpMenu.getItem(0).addActionListener(this);
|
helpMenu.getItem(0).addActionListener(this);
|
||||||
helpMenu.getItem(1).addActionListener(this);
|
helpMenu.getItem(2).addActionListener(this);
|
||||||
helpMenu.getItem(3).addActionListener(this);
|
helpMenu.getItem(3).addActionListener(this);
|
||||||
|
helpMenu.getItem(5).addActionListener(this);
|
||||||
|
|
||||||
deployButton.addActionListener(this);
|
deployButton.addActionListener(this);
|
||||||
importButton.addActionListener(this);
|
importButton.addActionListener(this);
|
||||||
@@ -305,6 +309,14 @@ public class MissPiggy implements ActionListener {
|
|||||||
if (actionEvent.getSource() == toolsMenu.getItem(2)) {throwUnimplemented();} else
|
if (actionEvent.getSource() == toolsMenu.getItem(2)) {throwUnimplemented();} else
|
||||||
|
|
||||||
if (actionEvent.getSource() == helpMenu.getItem(0)) {
|
if (actionEvent.getSource() == helpMenu.getItem(0)) {
|
||||||
|
try {
|
||||||
|
Desktop.getDesktop().browse(new URI("https://git.worlio.com/bonkmaykr/firestar/wiki/"));
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println(e.getMessage());
|
||||||
|
JOptionPane.showMessageDialog(frame, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if (actionEvent.getSource() == helpMenu.getItem(2)) {
|
||||||
try {
|
try {
|
||||||
Desktop.getDesktop().browse(new URI("https://git.worlio.com/bonkmaykr/firestar"));
|
Desktop.getDesktop().browse(new URI("https://git.worlio.com/bonkmaykr/firestar"));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -312,7 +324,7 @@ public class MissPiggy implements ActionListener {
|
|||||||
JOptionPane.showMessageDialog(frame, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(frame, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if (actionEvent.getSource() == helpMenu.getItem(1)) {
|
if (actionEvent.getSource() == helpMenu.getItem(3)) {
|
||||||
try {
|
try {
|
||||||
Desktop.getDesktop().browse(new URI("https://www.gnu.org/licenses/gpl-3.0.en.html"));
|
Desktop.getDesktop().browse(new URI("https://www.gnu.org/licenses/gpl-3.0.en.html"));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -320,7 +332,7 @@ public class MissPiggy implements ActionListener {
|
|||||||
JOptionPane.showMessageDialog(frame, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(frame, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if (actionEvent.getSource() == helpMenu.getItem(3)) {new Rowlf().displayAboutScreen();}
|
if (actionEvent.getSource() == helpMenu.getItem(5)) {new Rowlf().displayAboutScreen();}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Will likely split the below functions into separate classes to work with intellij GUI designer.
|
// Will likely split the below functions into separate classes to work with intellij GUI designer.
|
||||||
@@ -357,7 +369,7 @@ public class MissPiggy implements ActionListener {
|
|||||||
fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
|
fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
|
||||||
//fileChooser.addChoosableFileFilter(new FileNameExtensionFilter("All", "zip", "agr", "agrc", "agrf", "fstar"));
|
//fileChooser.addChoosableFileFilter(new FileNameExtensionFilter("All", "zip", "agr", "agrc", "agrf", "fstar"));
|
||||||
fileChooser.addChoosableFileFilter(new FileNameExtensionFilter("ZIP Archive", "zip"));
|
fileChooser.addChoosableFileFilter(new FileNameExtensionFilter("ZIP Archive", "zip"));
|
||||||
fileChooser.addChoosableFileFilter(new FileNameExtensionFilter("Firestar Mod Package", "agr", "agrc", "agrf", "fstar")); //what about fstar?
|
fileChooser.addChoosableFileFilter(new FileNameExtensionFilter("Firestar Mod Package", "fstar"));
|
||||||
|
|
||||||
int result = fileChooser.showOpenDialog(frame);
|
int result = fileChooser.showOpenDialog(frame);
|
||||||
|
|
||||||
@@ -365,9 +377,10 @@ public class MissPiggy implements ActionListener {
|
|||||||
File selectedFile = fileChooser.getSelectedFile();
|
File selectedFile = fileChooser.getSelectedFile();
|
||||||
System.out.println("Importing selected mod file \"" + selectedFile.getName() + "\"");
|
System.out.println("Importing selected mod file \"" + selectedFile.getName() + "\"");
|
||||||
|
|
||||||
ZipFile zipImporterHandler = new ZipFile(selectedFile.getPath());
|
ZipFile zipImporterHandler = new ZipFile(selectedFile.getAbsolutePath());
|
||||||
if (zipImporterHandler.isValidZipFile()) {
|
if (zipImporterHandler.isValidZipFile()) {
|
||||||
try {
|
try {
|
||||||
|
new JSONObject(new ZipFile(selectedFile.getAbsolutePath()).getComment()); // intentionally trigger exception if file is random BS
|
||||||
Path importDestination = Paths.get(System.getProperty("user.home") + "/.firestar/mods/"
|
Path importDestination = Paths.get(System.getProperty("user.home") + "/.firestar/mods/"
|
||||||
+ selectedFile.getName() + "_" + Main.Mods.size() + ".zip");
|
+ selectedFile.getName() + "_" + Main.Mods.size() + ".zip");
|
||||||
Files.copy(Paths.get(selectedFile.getPath()), importDestination, StandardCopyOption.REPLACE_EXISTING);
|
Files.copy(Paths.get(selectedFile.getPath()), importDestination, StandardCopyOption.REPLACE_EXISTING);
|
||||||
@@ -380,13 +393,16 @@ public class MissPiggy implements ActionListener {
|
|||||||
|
|
||||||
InitializeModListStructure();
|
InitializeModListStructure();
|
||||||
InitializeModListInGUI();
|
InitializeModListInGUI();
|
||||||
|
} catch (JSONException e) {
|
||||||
|
System.out.println("ERROR: File is not a valid ZIP archive with mod data. Aborting.");
|
||||||
|
JOptionPane.showMessageDialog(frame, "Whoops, that's not a valid mod file.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
JOptionPane.showMessageDialog(frame, "An error has occured.\n" + e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(frame, "An error has occured.\n" + e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
System.out.println("ERROR: File is not a valid ZIP archive. Aborting.");
|
System.out.println("ERROR: File is not a valid ZIP archive with mod data. Aborting.");
|
||||||
JOptionPane.showMessageDialog(frame, "Whoops, that's not a valid ZIP archive.", "Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(frame, "Whoops, that's not a valid mod file.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -405,8 +421,8 @@ public class MissPiggy implements ActionListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void optionsGUI() {
|
public void optionsGUI() {
|
||||||
// todo settings page w/ reset switch
|
new Waldorf().Action(this);
|
||||||
throwUnimplemented();
|
frame.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteSelected() {
|
public void deleteSelected() {
|
||||||
|
|||||||
74
src/Waldorf.form
Normal file
74
src/Waldorf.form
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="Waldorf">
|
||||||
|
<grid id="27dc6" binding="frameContainer" layout-manager="GridLayoutManager" row-count="5" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
|
<margin top="0" left="0" bottom="0" right="0"/>
|
||||||
|
<constraints>
|
||||||
|
<xy x="20" y="20" width="500" height="400"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<maximumSize width="50" height="100"/>
|
||||||
|
<minimumSize width="50" height="100"/>
|
||||||
|
<preferredSize width="50" height="100"/>
|
||||||
|
</properties>
|
||||||
|
<border type="none"/>
|
||||||
|
<children>
|
||||||
|
<component id="3d88f" class="javax.swing.JButton" binding="okbtn">
|
||||||
|
<constraints>
|
||||||
|
<grid row="4" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value="Save"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="86775" class="javax.swing.JTextField" binding="fOutpath">
|
||||||
|
<constraints>
|
||||||
|
<grid row="3" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false">
|
||||||
|
<preferred-size width="150" height="-1"/>
|
||||||
|
</grid>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
</component>
|
||||||
|
<component id="db731" class="javax.swing.JLabel">
|
||||||
|
<constraints>
|
||||||
|
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value="Mod Export Path"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="50d13" class="javax.swing.JButton" binding="cancelbtn">
|
||||||
|
<constraints>
|
||||||
|
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value="Cancel"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="252b3" class="javax.swing.JButton" binding="resetbtn">
|
||||||
|
<constraints>
|
||||||
|
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value="Restore Defaults"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="e2cd7" class="javax.swing.JLabel">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="0" row-span="3" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value=".firestar Folder"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="c68f2" class="javax.swing.JButton" binding="bOpenFolder">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="1" row-span="3" col-span="2" vsize-policy="0" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<label value="Browse"/>
|
||||||
|
<text value="Browse"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
</children>
|
||||||
|
</grid>
|
||||||
|
</form>
|
||||||
104
src/Waldorf.java
Normal file
104
src/Waldorf.java
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
/*
|
||||||
|
* 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 org.json.JSONObject;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.event.WindowAdapter;
|
||||||
|
import java.awt.event.WindowEvent;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import static javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE;
|
||||||
|
|
||||||
|
public class Waldorf implements ActionListener {
|
||||||
|
private JFrame frame = new JFrame();
|
||||||
|
private JPanel frameContainer;
|
||||||
|
private JButton okbtn;
|
||||||
|
private JButton cancelbtn;
|
||||||
|
private JTextField fOutpath;
|
||||||
|
private JButton resetbtn;
|
||||||
|
private JButton bOpenFolder;
|
||||||
|
MissPiggy invoker;
|
||||||
|
|
||||||
|
public void Action(MissPiggy inv) {
|
||||||
|
invoker = inv;
|
||||||
|
|
||||||
|
frame.add(frameContainer);
|
||||||
|
frame.setSize(600, 200); // 1280 800
|
||||||
|
frame.setMinimumSize(new Dimension(200,100));
|
||||||
|
frame.setTitle("Options");
|
||||||
|
frame.setResizable(false);
|
||||||
|
frame.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||||
|
frame.setLayout(new GridLayout());
|
||||||
|
frame.setLocationRelativeTo(null);
|
||||||
|
frame.setAlwaysOnTop(true);
|
||||||
|
|
||||||
|
cancelbtn.addActionListener(this);
|
||||||
|
okbtn.addActionListener(this);
|
||||||
|
resetbtn.addActionListener(this);
|
||||||
|
bOpenFolder.addActionListener(this);
|
||||||
|
|
||||||
|
fOutpath.setText(Main.outpath);
|
||||||
|
|
||||||
|
frame.setVisible(true);
|
||||||
|
frame.addWindowListener(new WindowAdapter() {
|
||||||
|
@Override
|
||||||
|
public void windowClosing(WindowEvent e)
|
||||||
|
{
|
||||||
|
invoker.frame.setEnabled(true);
|
||||||
|
e.getWindow().dispose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent actionEvent) {
|
||||||
|
if (actionEvent.getSource() == cancelbtn) {
|
||||||
|
invoker.frame.setEnabled(true);
|
||||||
|
frame.dispose();
|
||||||
|
} else
|
||||||
|
if (actionEvent.getSource() == okbtn) {
|
||||||
|
Main.outpath = fOutpath.getText();
|
||||||
|
Main.writeConf();
|
||||||
|
|
||||||
|
invoker.frame.setEnabled(true);
|
||||||
|
frame.dispose();
|
||||||
|
} else
|
||||||
|
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) {
|
||||||
|
new File(System.getProperty("user.home") + "/.firestar/firestar.conf").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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if (actionEvent.getSource() == bOpenFolder) {
|
||||||
|
try {
|
||||||
|
Desktop.getDesktop().open(new File(Main.inpath));
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user