modpack update
This commit is contained in:
@@ -140,7 +140,7 @@ public class Compressor {
|
||||
}
|
||||
|
||||
public static void unzip(File zipFileName, File extPlace) throws IOException {
|
||||
unzip(zipFileName, extPlace, null);
|
||||
unzip(zipFileName, extPlace, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,7 +153,7 @@ public class Compressor {
|
||||
*
|
||||
* @throws java.io.IOException 解压失败或无法写入
|
||||
*/
|
||||
public static void unzip(File zipFileName, File extPlace, Predicate<String> callback) throws IOException {
|
||||
public static void unzip(File zipFileName, File extPlace, Predicate<String> callback, boolean ignoreExistsFile) throws IOException {
|
||||
extPlace.mkdirs();
|
||||
try (ZipInputStream zipFile = new ZipInputStream(new FileInputStream(zipFileName))) {
|
||||
if (zipFileName.exists()) {
|
||||
@@ -182,6 +182,8 @@ public class Compressor {
|
||||
if (!subdir.exists())
|
||||
subdir.mkdir();
|
||||
}
|
||||
if (ignoreExistsFile && new File(strtemp).exists())
|
||||
continue;
|
||||
try (FileOutputStream fos = new FileOutputStream(strtemp); BufferedOutputStream bos = new BufferedOutputStream(fos)) {
|
||||
int c;
|
||||
while ((c = zipFile.read()) != -1)
|
||||
@@ -192,43 +194,4 @@ public class Compressor {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将zip1合并到zip2里面,即保留zip2
|
||||
*
|
||||
* @param destFile zip1
|
||||
* @param srcFile zip2
|
||||
*
|
||||
* @throws java.io.IOException 无法写入或读取
|
||||
*//*
|
||||
* public static void merge(File destFile, File srcFile) throws IOException
|
||||
* {
|
||||
* try (ZipOutputStream os = new ZipOutputStream(new
|
||||
* FileOutputStream(destFile))) {
|
||||
* if (destFile.exists()) {
|
||||
* File extPlace = new File(IOUtils.currentDir(), "HMCL-MERGE-TEMP");
|
||||
* unzip(srcFile, extPlace);
|
||||
* ZipFile zipFile = new ZipFile(srcFile);
|
||||
* if (srcFile.exists()) {
|
||||
* String gbkPath;//, strtemp, strPath;
|
||||
* //strPath = extPlace.getAbsolutePath();
|
||||
* java.util.Enumeration e = zipFile.entries();
|
||||
* while (e.hasMoreElements()) {
|
||||
* ZipEntry zipEnt = (ZipEntry) e.nextElement();
|
||||
* //gbkPath = zipEnt.getName();
|
||||
* if (zipEnt.isDirectory()) {
|
||||
* //strtemp = strPath + File.separator + gbkPath;
|
||||
* } else {
|
||||
* gbkPath = zipEnt.getName();
|
||||
* //strtemp = strPath + File.separator + gbkPath;
|
||||
* os.putNextEntry(zipEnt);
|
||||
* os.write(gbkPath.getBytes("UTF-8"));
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* os.closeEntry();
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ settings.choose_gamedir=\u9009\u62e9\u6e38\u620f\u8def\u5f84
|
||||
settings.failed_load=\u8bbe\u7f6e\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u5347\u7ea7\u4e86\u542f\u52a8\u5668\u6216\u88ab\u4eba\u5de5\u4fee\u6539\u9020\u6210\u9519\u8bef\uff0c\u662f\u5426\u6e05\u9664\uff1f
|
||||
|
||||
modpack=\u6574\u5408\u5305
|
||||
modpack.choose=\u9009\u62e9\u8981\u5bfc\u5165\u7684\u6e38\u620f\u6574\u5408\u5305\u6587\u4ef6
|
||||
modpack.choose=\u9009\u62e9\u8981\u5bfc\u5165\u7684\u6e38\u620f\u6574\u5408\u5305\u6587\u4ef6\uff0c\u5982\u679c\u60a8\u5e0c\u671b\u66f4\u65b0\u6574\u5408\u5305\uff0c\u8bf7\u8f93\u5165\u8981\u66f4\u65b0\u7684\u7248\u672c\u540d
|
||||
modpack.install.task=\u5bfc\u5165\u6574\u5408\u5305
|
||||
modpack.install_error=\u5b89\u88c5\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u6574\u5408\u5305\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25
|
||||
modpack.save=\u9009\u62e9\u8981\u5bfc\u51fa\u5230\u7684\u6e38\u620f\u6574\u5408\u5305\u4f4d\u7f6e
|
||||
|
||||
@@ -209,7 +209,7 @@ settings.choose_gamedir=Choose Game Directory
|
||||
settings.failed_load=Failed to load settings file. Remove it?
|
||||
|
||||
modpack=Mod pack
|
||||
modpack.choose=Choose a modpack zip file which you want to import.
|
||||
modpack.choose=Choose a modpack zip file which you want to import. If you want to update the modpack, please enter the version you want to update.
|
||||
modpack.install.task=Import the modpack
|
||||
modpack.install_error=Failed to install the modpack, maybe the modpack file is incorrect or failed to manage files.
|
||||
modpack.save=Choose a location which you want to export the game files to.
|
||||
|
||||
@@ -209,7 +209,7 @@ settings.choose_gamedir=\u9009\u62e9\u6e38\u620f\u8def\u5f84
|
||||
settings.failed_load=\u8a2d\u5b9a\u6587\u4ef6\u52a0\u8f09\u5931\u6557\uff0c\u53ef\u80fd\u662f\u5347\u7d1a\u4e86\u555f\u52d5\u5668\u6216\u88ab\u4eba\u5de5\u4fee\u6539\u9020\u6210\u932f\u8aa4\uff0c\u662f\u5426\u6e05\u9664\uff1f
|
||||
|
||||
modpack=\u61f6\u4eba\u5305
|
||||
modpack.choose=\u9078\u64c7\u8981\u5c0e\u5165\u7684\u904a\u6232\u61f6\u4eba\u5305\u6587\u4ef6
|
||||
modpack.choose=\u9078\u64c7\u8981\u5c0e\u5165\u7684\u904a\u6232\u61f6\u4eba\u5305\u6587\u4ef6\uff0c\u5982\u679c\u60a8\u5e0c\u671b\u66f4\u65b0\u6574\u5408\u5305\uff0c\u8bf7\u8f93\u5165\u8981\u66f4\u65b0\u7684\u7248\u672c\u540d
|
||||
modpack.install.task=\u5c0e\u5165\u61f6\u4eba\u5305
|
||||
modpack.install_error=\u5b89\u88dd\u5931\u6557\uff0c\u53ef\u80fd\u662f\u6574\u5408\u5305\u683c\u5f0f\u4e0d\u6b63\u78ba\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u6557
|
||||
modpack.save=\u9078\u64c7\u8981\u5c0e\u51fa\u5230\u7684\u904a\u6232\u61f6\u4eba\u5305\u4f4d\u7f6e
|
||||
|
||||
@@ -209,7 +209,7 @@ settings.choose_gamedir=\u9009\u62e9\u6e38\u620f\u8def\u5f84
|
||||
settings.failed_load=\u8bbe\u7f6e\u6587\u4ef6\u52a0\u8f7d\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u5347\u7ea7\u4e86\u542f\u52a8\u5668\u6216\u88ab\u4eba\u5de5\u4fee\u6539\u9020\u6210\u9519\u8bef\uff0c\u662f\u5426\u6e05\u9664\uff1f
|
||||
|
||||
modpack=\u6574\u5408\u5305
|
||||
modpack.choose=\u9009\u62e9\u8981\u5bfc\u5165\u7684\u6e38\u620f\u6574\u5408\u5305\u6587\u4ef6
|
||||
modpack.choose=\u9009\u62e9\u8981\u5bfc\u5165\u7684\u6e38\u620f\u6574\u5408\u5305\u6587\u4ef6\uff0c\u5982\u679c\u60a8\u5e0c\u671b\u66f4\u65b0\u6574\u5408\u5305\uff0c\u8bf7\u8f93\u5165\u8981\u66f4\u65b0\u7684\u7248\u672c\u540d
|
||||
modpack.install.task=\u5bfc\u5165\u6574\u5408\u5305
|
||||
modpack.install_error=\u5b89\u88c5\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u6574\u5408\u5305\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25
|
||||
modpack.save=\u9009\u62e9\u8981\u5bfc\u51fa\u5230\u7684\u6e38\u620f\u6574\u5408\u5305\u4f4d\u7f6e
|
||||
|
||||
Reference in New Issue
Block a user