From 7b7d4a206e5ad2b6609ba2340acef2e6bd1c3f62 Mon Sep 17 00:00:00 2001 From: Wirlaburla Date: Sun, 21 Jul 2024 18:36:24 -0500 Subject: [PATCH] add post fscript support and change input to fileinput on rizzo --- firestar/src/main/java/Gonzo.java | 9 ++++++++- firestar/src/main/java/Rizzo.java | 2 +- firestar/src/main/resources/post.fscript | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 firestar/src/main/resources/post.fscript diff --git a/firestar/src/main/java/Gonzo.java b/firestar/src/main/java/Gonzo.java index 88af28a..c16a7a4 100644 --- a/firestar/src/main/java/Gonzo.java +++ b/firestar/src/main/java/Gonzo.java @@ -170,7 +170,7 @@ public class Gonzo { File fscript = new File(Main.inpath + "temp/fscript"); if (fscript.exists()) { - new Rizzo(fscript, Main.inpath + "temp/"); // Lets rizz this mod up + new Rizzo(new FileInputStream(fscript), Main.inpath + "temp/"); // Lets rizz this mod up } if (new File(System.getProperty("user.home") + "/.firestar/temp/delete.txt").isFile()) { @@ -214,6 +214,13 @@ public class Gonzo { } } } + + // Post fscript changes + try (InputStream is = Main.class.getResourceAsStream("/post.fscript")) { + new Rizzo(is, Main.inpath + "temp/"); + } catch (IOException ex) { + Logger.getLogger(Gonzo.class.getName()).log(Level.SEVERE, null, ex); + } // create a list of the contents of data/ for psp2psarc.exe to read from List oFilesList = new ArrayList(); diff --git a/firestar/src/main/java/Rizzo.java b/firestar/src/main/java/Rizzo.java index 03fc2c5..23a75bd 100644 --- a/firestar/src/main/java/Rizzo.java +++ b/firestar/src/main/java/Rizzo.java @@ -59,7 +59,7 @@ public class Rizzo { private int ver = 1; private String workingDir; - public Rizzo(File infile, String workingDir) throws FileNotFoundException, FirescriptFormatException { + public Rizzo(FileInputStream infile, String workingDir) throws FileNotFoundException, FirescriptFormatException { if (!workingDir.endsWith("/")) this.workingDir = workingDir + "/"; else this.workingDir = workingDir; scanner = new Scanner(infile); diff --git a/firestar/src/main/resources/post.fscript b/firestar/src/main/resources/post.fscript new file mode 100644 index 0000000..bbcd742 --- /dev/null +++ b/firestar/src/main/resources/post.fscript @@ -0,0 +1,2 @@ +# POST INSTALL FSCRIPT +fscript 1