Config lässt sich mit Packen und herunterladen + Code gereinigt
This commit is contained in:
parent
a73961ea28
commit
7d0cdef440
5 changed files with 14 additions and 98 deletions
|
@ -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) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -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) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
*/
|
*/
|
||||||
package ModpackDownloader;
|
package ModpackDownloader;
|
||||||
|
|
||||||
|
import Zipper.UnZip;
|
||||||
import forgemodpackbuilder.GUI;
|
import forgemodpackbuilder.GUI;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
|
@ -23,6 +24,14 @@ public class ModpackDownloader {
|
||||||
|
|
||||||
public static void main(String[] args) throws MalformedURLException, IOException {
|
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
|
//Modpack URL Suchen
|
||||||
ModpackDownloader2.URL = GUI.URL + zeile;
|
ModpackDownloader2.URL = GUI.URL + zeile;
|
||||||
ModpackDownloader2.output = "./modpack/modpack.txt";
|
ModpackDownloader2.output = "./modpack/modpack.txt";
|
||||||
|
@ -53,10 +62,9 @@ public class ModpackDownloader {
|
||||||
|
|
||||||
//Progressbar
|
//Progressbar
|
||||||
GUI.zahl = mods;
|
GUI.zahl = mods;
|
||||||
GUI.datei2 = zeile;
|
GUI.datei1 = zeile;
|
||||||
GUI c = new GUI();
|
GUI c = new GUI();
|
||||||
c.progressnext();
|
c.progressnext();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class downloader1 {
|
||||||
|
|
||||||
public static void main(String[] args) throws Throwable {
|
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 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 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";
|
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";
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class GUI extends javax.swing.JFrame {
|
||||||
public static ArrayList<String> mods0 = new ArrayList<String>();
|
public static ArrayList<String> mods0 = new ArrayList<String>();
|
||||||
public static ArrayList<String> mods1 = new ArrayList<String>();
|
public static ArrayList<String> mods1 = new ArrayList<String>();
|
||||||
public static String version = "1.10.2";
|
public static String version = "1.10.2";
|
||||||
public static String datei2 = null;
|
public static String datei1 = null;
|
||||||
public static int funktion = 0;
|
public static int funktion = 0;
|
||||||
public static String URL = "http://mgwywbvcwmot7vir.myfritz.net/";
|
public static String URL = "http://mgwywbvcwmot7vir.myfritz.net/";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue