diff --git a/src/DateiKopieren/DateiKopierenClass1.java b/src/DateiKopieren/DateiKopierenClass1.java deleted file mode 100644 index d4f8581..0000000 --- a/src/DateiKopieren/DateiKopierenClass1.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package DateiKopieren; - -/** - * - * @author simonr - */ -import forgemodpackbuilder.GUI; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.nio.channels.FileChannel; - -public class DateiKopierenClass1 { - - public static void main(String[] args) throws IOException { - File inF = new File(GUI.datei); - File outF = new File("./modpack/modpack/" + GUI.datei.substring( GUI.datei.lastIndexOf( "/" ) + 1 )); - copyFile(inF, outF); - } - - public static void copyFile(File in, File out) throws IOException { - FileChannel inChannel = null; - FileChannel outChannel = null; - try { - inChannel = new FileInputStream(in).getChannel(); - outChannel = new FileOutputStream(out).getChannel(); - inChannel.transferTo(0, inChannel.size(), outChannel); - } catch (IOException e) { - throw e; - } finally { - try { - if (inChannel != null) - inChannel.close(); - if (outChannel != null) - outChannel.close(); - } catch (IOException e) {} - } - } -} - diff --git a/src/DateiKopieren/DateiKopierenClass2.java b/src/DateiKopieren/DateiKopierenClass2.java deleted file mode 100644 index bf6d50b..0000000 --- a/src/DateiKopieren/DateiKopierenClass2.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package DateiKopieren; - -/** - * - * @author simonr - */ -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.nio.channels.FileChannel; - -public class DateiKopierenClass2 { - - public static void main(String[] args) throws IOException { - File inF = new File("./modpack/Minecraft.jar"); - File outF = new File("./modpack/modpack/Minecraft.jar"); - copyFile(inF, outF); - } - - public static void copyFile(File in, File out) throws IOException { - FileChannel inChannel = null; - FileChannel outChannel = null; - try { - inChannel = new FileInputStream(in).getChannel(); - outChannel = new FileOutputStream(out).getChannel(); - inChannel.transferTo(0, inChannel.size(), outChannel); - } catch (IOException e) { - throw e; - } finally { - try { - if (inChannel != null) - inChannel.close(); - if (outChannel != null) - outChannel.close(); - } catch (IOException e) {} - } - } -} - - diff --git a/src/ModpackDownloader/ModpackDownloader.java b/src/ModpackDownloader/ModpackDownloader.java index 2d8f183..9caf484 100644 --- a/src/ModpackDownloader/ModpackDownloader.java +++ b/src/ModpackDownloader/ModpackDownloader.java @@ -5,6 +5,7 @@ */ package ModpackDownloader; +import Zipper.UnZip; import forgemodpackbuilder.GUI; import java.io.BufferedReader; import java.io.FileReader; @@ -23,6 +24,14 @@ public class ModpackDownloader { public static void main(String[] args) throws MalformedURLException, IOException { + //Modpack-Config Download + ModpackDownloader2.URL = GUI.URL + zeile + ".zip"; + ModpackDownloader2.output = "./modpack/modpack.zip"; + ModpackDownloader2.main(null); + + UnZip.modpack = "./modpack/modpack.zip"; + UnZip.modpack1 = GUI.datei + "/"; + //Modpack URL Suchen ModpackDownloader2.URL = GUI.URL + zeile; ModpackDownloader2.output = "./modpack/modpack.txt"; @@ -40,23 +49,22 @@ public class ModpackDownloader { //Modpack Installieren FileReader fr1 = new FileReader("./modpack/modpack.txt"); BufferedReader br1 = new BufferedReader(fr1); - + version = br1.readLine(); while ((zeile = br1.readLine()) != null) { ModpackDownloader2.URL = GUI.URL + "mods/" + version + "/" + zeile; ModpackDownloader2.output = GUI.datei + "/mods/" + zeile; ModpackDownloader2.main(null); - + System.out.println("URL = " + GUI.URL + version + "/" + zeile); System.out.println("Output = " + GUI.datei + "/mods/" + zeile); //Progressbar GUI.zahl = mods; - GUI.datei2 = zeile; + GUI.datei1 = zeile; GUI c = new GUI(); c.progressnext(); } - } } diff --git a/src/ModpackDownloader/downloader1.java b/src/ModpackDownloader/downloader1.java index e8ab5ce..f9283e6 100644 --- a/src/ModpackDownloader/downloader1.java +++ b/src/ModpackDownloader/downloader1.java @@ -24,7 +24,7 @@ public class downloader1 { public static void main(String[] args) throws Throwable { - String forge10 = "https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.10.2-12.18.2.2107/forge-1.10.2-12.18.2.2107-installer.jar"; + String forge10 = "https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.10.2-12.18.2.2114/forge-1.10.2-12.18.2.2114-installer.jar"; String forge9 = "https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.9.4-12.17.0.2051/forge-1.9.4-12.17.0.2051-installer.jar"; String forge8 = "https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.8.9-11.15.1.1902-1.8.9/forge-1.8.9-11.15.1.1902-1.8.9-installer.jar"; String forge7 = "https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10/forge-1.7.10-10.13.4.1614-1.7.10-installer.jar"; diff --git a/src/forgemodpackbuilder/GUI.java b/src/forgemodpackbuilder/GUI.java index bb11d0d..b776634 100644 --- a/src/forgemodpackbuilder/GUI.java +++ b/src/forgemodpackbuilder/GUI.java @@ -35,7 +35,7 @@ public class GUI extends javax.swing.JFrame { public static ArrayList mods0 = new ArrayList(); public static ArrayList mods1 = new ArrayList(); public static String version = "1.10.2"; - public static String datei2 = null; + public static String datei1 = null; public static int funktion = 0; public static String URL = "http://mgwywbvcwmot7vir.myfritz.net/";