Bugfixing
This commit is contained in:
parent
62b284dbc8
commit
e96a5a3077
5 changed files with 3 additions and 35 deletions
Binary file not shown.
BIN
Xerxes.zip
Normal file
BIN
Xerxes.zip
Normal file
Binary file not shown.
|
@ -1,29 +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 Zipper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author simonr
|
|
||||||
*/
|
|
||||||
import Zipper.Zip;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
|
|
||||||
public class AktuellesDatumJava8 {
|
|
||||||
|
|
||||||
static void formatDateTime() {
|
|
||||||
LocalDateTime now = LocalDateTime.now();
|
|
||||||
DateTimeFormatter df;
|
|
||||||
df = DateTimeFormatter.ISO_LOCAL_DATE; // 2016-18-31
|
|
||||||
System.out.println(now.format(df));
|
|
||||||
Zip.datum = now.format(df);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
formatDateTime();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -22,10 +22,10 @@ public class Zip {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// Initiate ZipFile object with the path/name of the zip file.
|
// Initiate ZipFile object with the path/name of the zip file.
|
||||||
ZipFile zipFile = new ZipFile(modpack + "-" + datum + ".zip");
|
ZipFile zipFile = new ZipFile(modpack + ".zip");
|
||||||
|
|
||||||
// Folder to add
|
// Folder to add
|
||||||
String folderToAdd = "./modpack/modpack/";
|
String folderToAdd = "./modpack/modpack/config";
|
||||||
|
|
||||||
// Initiate Zip Parameters which define various properties such
|
// Initiate Zip Parameters which define various properties such
|
||||||
// as compression method, etc.
|
// as compression method, etc.
|
||||||
|
@ -38,7 +38,7 @@ public class Zip {
|
||||||
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
|
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
|
||||||
|
|
||||||
// Set the root folder
|
// Set the root folder
|
||||||
parameters.setIncludeRootFolder(false);
|
//parameters.setIncludeRootFolder(false);
|
||||||
|
|
||||||
// Add folder to the zip file
|
// Add folder to the zip file
|
||||||
zipFile.addFolder(folderToAdd, parameters);
|
zipFile.addFolder(folderToAdd, parameters);
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
*/
|
*/
|
||||||
package Zipper;
|
package Zipper;
|
||||||
|
|
||||||
import Zipper.AktuellesDatumJava8;
|
|
||||||
import Zipper.Zip;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
@ -82,7 +80,6 @@ public class frage extends javax.swing.JFrame {
|
||||||
// TODO add your handling code here:
|
// TODO add your handling code here:
|
||||||
String name = jTextField1.getText();
|
String name = jTextField1.getText();
|
||||||
System.out.println(name);
|
System.out.println(name);
|
||||||
AktuellesDatumJava8.main(null);
|
|
||||||
Zip a = new Zip();
|
Zip a = new Zip();
|
||||||
a.modpack = name;
|
a.modpack = name;
|
||||||
a.archiveDir(null);
|
a.archiveDir(null);
|
||||||
|
|
Loading…
Reference in a new issue