build changes + windows compatibility

This commit is contained in:
Downforce Agent 2024-05-08 04:51:25 -05:00
parent 7a0f224505
commit 81069fbb5d
2 changed files with 22 additions and 3 deletions

View File

@ -0,0 +1,13 @@
<component name="ArtifactManager">
<artifact type="jar" build-on-make="true" name="firestar:jar">
<output-path>$PROJECT_DIR$/out/artifacts/firestar_jar</output-path>
<root id="archive" name="firestar.jar">
<element id="directory" name="META-INF">
<element id="file-copy" path="$PROJECT_DIR$/bin/META-INF/MANIFEST.MF" />
</element>
<element id="module-output" name="firestar" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/net/lingala/zip4j/zip4j/2.11.5/zip4j-2.11.5.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/json/json/20240303/json-20240303.jar" path-in-jar="/" />
</root>
</artifact>
</component>

View File

@ -115,7 +115,9 @@ public class Gonzo {
System.out.println("Firestar is extracting " + s); System.out.println("Firestar is extracting " + s);
consoleDisplay.append("Firestar is extracting " + s + "\n"); consoleDisplay.append("Firestar is extracting " + s + "\n");
//Process p = Runtime.getRuntime().exec(new String[]{"bash","-c","aplay /home/bonkyboo/kittens_loop.wav"}); // DEBUG //Process p = Runtime.getRuntime().exec(new String[]{"bash","-c","aplay /home/bonkyboo/kittens_loop.wav"}); // DEBUG
Process p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + System.getProperty("user.home") + "/.firestar/temp/" + ";wine ../psp2psarc.exe extract -y ../" + s}); Process p;
if (!Main.wine) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + System.getProperty("user.home") + "/.firestar/temp/" + ";wine ../psp2psarc.exe extract -y ../" + s});}
else {p = Runtime.getRuntime().exec(new String[]{"cd " + System.getProperty("user.home") + "/.firestar/temp/" + " && ../psp2psarc.exe extract -y ../" + s});}
final Thread ioThread = new Thread() { final Thread ioThread = new Thread() {
@Override @Override
public void run() { public void run() {
@ -215,7 +217,9 @@ public class Gonzo {
try { try {
System.out.println("Firestar is compiling the final build"); System.out.println("Firestar is compiling the final build");
consoleDisplay.append("Firestar is compiling the final build" + "\n"); consoleDisplay.append("Firestar is compiling the final build" + "\n");
Process p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + System.getProperty("user.home") + "/.firestar/temp" + ";wine ../psp2psarc.exe create --skip-missing-files -j12 -a -i --input-file=list.txt -o " + oArcTarget}); Process p;
if (!Main.wine) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","cd " + System.getProperty("user.home") + "/.firestar/temp" + ";wine ../psp2psarc.exe create --skip-missing-files -j12 -a -i --input-file=list.txt -o " + oArcTarget});}
else {p = Runtime.getRuntime().exec(new String[]{"cd " + System.getProperty("user.home") + "/.firestar/temp" + " && ../psp2psarc.exe create --skip-missing-files -j12 -a -i --input-file=list.txt -o " + oArcTarget});}
final Thread ioThread = new Thread() { final Thread ioThread = new Thread() {
@Override @Override
public void run() { public void run() {
@ -247,7 +251,9 @@ public class Gonzo {
new File(Main.outpath).mkdirs(); new File(Main.outpath).mkdirs();
new File(System.getProperty("user.home") + "/.firestar/temp/" + oArcTarget).renameTo(new File(Main.outpath + oArcTarget)); new File(System.getProperty("user.home") + "/.firestar/temp/" + oArcTarget).renameTo(new File(Main.outpath + oArcTarget));
try { try {
Process p = Runtime.getRuntime().exec(new String[]{"bash","-c","rm -rf " + System.getProperty("user.home") + "/.firestar/temp/"}); // Scary! Process p;
if (!Main.wine) {p = Runtime.getRuntime().exec(new String[]{"bash","-c","rm -rf " + System.getProperty("user.home") + "/.firestar/temp/"});} // Scary!
else {p = Runtime.getRuntime().exec(new String[]{"rmdir " + System.getProperty("user.home") + "\\.firestar\\temp\\ /s /q"});}
//new File(System.getProperty("user.home") + "/.firestar/temp/").delete(); //new File(System.getProperty("user.home") + "/.firestar/temp/").delete();
} catch (IOException e) { } catch (IOException e) {
System.out.println("WARNING: Temporary files may not have been properly cleared.\n" + e.getMessage()); System.out.println("WARNING: Temporary files may not have been properly cleared.\n" + e.getMessage());