Now supports modpack description!

This commit is contained in:
huangyuhui
2016-02-07 14:39:47 +08:00
parent c60b04caf6
commit fdc2570945
26 changed files with 501 additions and 390 deletions

BIN
HMCL/modpack.zip Normal file

Binary file not shown.

View File

@@ -21,7 +21,7 @@ import org.jackhuang.hellominecraft.util.C;
import org.jackhuang.hellominecraft.util.code.DigestUtils;
import org.jackhuang.hellominecraft.util.NetUtils;
import org.jackhuang.hellominecraft.util.lang.SupportedLocales;
import org.jackhuang.hellominecraft.util.ui.Selector;
import org.jackhuang.hellominecraft.util.ui.SwingUtils;
/**
*
@@ -61,15 +61,14 @@ public final class SkinmeAuthenticator extends IAuthenticator {
if (sl[1].contains("No Valid Character"))
sl[1] = C.i18n("login.no_valid_character");
throw new AuthenticationException(sl[1]);
case "1": {
case "1":
String[] s = parseType1(sl[1]);
req.setUserName(s[0]);
req.setSession(s[1]);
req.setUserId(s[1]);
req.setAccessToken(s[1]);
break;
}
case "2": {
case "2":
String[] charators = sl[1].split(";");
int len = charators.length;
String[] $char = new String[len];
@@ -80,12 +79,10 @@ public final class SkinmeAuthenticator extends IAuthenticator {
$char[i] = charator[0];
user[i] = charator[1];
}
Selector s = new Selector(null, user, C.i18n("login.choose_charactor"));
s.setVisible(true);
if (s.sel == Selector.FAILED_TO_SELECT)
int index = SwingUtils.select(user, C.i18n("login.choose_charactor"));
if (index == -1)
throw new AuthenticationException(C.i18n("message.cancelled"));
else {
int index = s.sel;
String character = $char[index];
sl = getCharacter(usr, hashCode, character).split(":");
String[] s2 = parseType1(sl[1]);
@@ -96,7 +93,6 @@ public final class SkinmeAuthenticator extends IAuthenticator {
}
break;
}
}
req.setUserType("Legacy");
return req;

View File

@@ -23,11 +23,11 @@ import java.util.Map;
import javax.swing.JOptionPane;
import org.jackhuang.hellominecraft.util.C;
import org.jackhuang.hellominecraft.util.ArrayUtils;
import org.jackhuang.hellominecraft.util.ui.Selector;
import org.jackhuang.hellominecraft.launcher.core.auth.yggdrasil.GameProfile;
import org.jackhuang.hellominecraft.launcher.core.auth.yggdrasil.PropertyMap;
import org.jackhuang.hellominecraft.launcher.core.auth.yggdrasil.YggdrasilAuthentication;
import org.jackhuang.hellominecraft.launcher.core.auth.yggdrasil.UUIDTypeAdapter;
import org.jackhuang.hellominecraft.util.ui.SwingUtils;
/**
*
@@ -69,12 +69,11 @@ public final class YggdrasilAuthenticator extends IAuthenticator {
String[] names = new String[profiles.length];
for (int i = 0; i < profiles.length; i++)
names[i] = profiles[i].name;
Selector s = new Selector(null, names, C.i18n("login.choose_charactor"));
s.setVisible(true);
if (s.sel == Selector.FAILED_TO_SELECT)
int sel = SwingUtils.select(names, C.i18n("login.choose_charactor"));
if (sel == -1)
throw new AuthenticationException("No selection");
selectedProfile = profiles[s.sel];
username = names[s.sel];
selectedProfile = profiles[sel];
username = names[sel];
} else
username = JOptionPane.showInputDialog(C.i18n("login.no_charactor"));
else

View File

@@ -20,18 +20,23 @@ package org.jackhuang.hellominecraft.launcher.core.mod;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.FileSystemException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.zip.ZipFile;
import org.jackhuang.hellominecraft.util.C;
import org.jackhuang.hellominecraft.util.logging.HMCLog;
import org.jackhuang.hellominecraft.launcher.core.GameException;
import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftProvider;
import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftService;
import org.jackhuang.hellominecraft.launcher.core.version.MinecraftVersion;
import org.jackhuang.hellominecraft.util.MessageBox;
import org.jackhuang.hellominecraft.util.func.BiFunction;
import org.jackhuang.hellominecraft.util.system.Compressor;
import org.jackhuang.hellominecraft.util.system.FileUtils;
@@ -59,12 +64,25 @@ import org.jackhuang.hellominecraft.util.version.MinecraftVersionRequest;
*/
public final class ModpackManager {
public static Task install(final File input, final IMinecraftService service, final String id) {
/**
* Install the compressed modpack.
*
* @param input modpack.zip
* @param service MinecraftService, whose version service only supports
* MinecraftVersionManager.
* @param id new version id, if null, will use suggested name from
* modpack
*
* @return The installing Task, may take long time, please consider
* TaskWindow.
*/
public static Task install(final File input, final IMinecraftService service, final String idFUCK) {
return new Task() {
Collection<Task> c = new ArrayList<>();
@Override
public void executeTask() throws Throwable {
String id = idFUCK;
File versions = new File(service.baseDirectory(), "versions");
File oldFile = new File(versions, "minecraft"), newFile = null;
if (oldFile.exists()) {
@@ -78,6 +96,24 @@ public final class ModpackManager {
HMCLog.warn("Failed to rename " + oldFile + " to " + newFile);
}
String description = C.i18n("modpack.install.will_install");
try (ZipFile zip = new ZipFile(input)) {
HashMap map = C.GSON.fromJson(new InputStreamReader(zip.getInputStream(zip.getEntry("modpack.json"))), HashMap.class);
if (map != null) {
if (id == null)
if (map.containsKey("name") && map.get("name") instanceof String)
id = (String) map.get("name");
if (map.containsKey("description") && map.get("description") instanceof String)
description += "\n" + (String) map.get("description");
}
if (id == null)
throw new IllegalStateException("Illegal modpack id!");
}
if (MessageBox.Show(description, C.i18n("modpack.install.task"), MessageBox.YES_NO_OPTION) == MessageBox.NO_OPTION)
return;
File preVersion = new File(versions, id), preVersionRenamed = null;
if (preVersion.exists()) {
HMCLog.log("Backing up the game");
@@ -184,7 +220,7 @@ public final class ModpackManager {
*
* @throws IOException if create tmp directory failed
*/
public static void export(File output, IMinecraftProvider provider, String version, List<String> blacklist) throws IOException, GameException {
public static void export(File output, IMinecraftProvider provider, String version, List<String> blacklist, Map modpackJson) throws IOException, GameException {
final ArrayList<String> b = new ArrayList<>(MODPACK_BLACK_LIST);
if (blacklist != null)
b.addAll(blacklist);
@@ -211,6 +247,7 @@ public final class ModpackManager {
mv.jar = r.version;
mv.runDir = "version";
zip.putTextFile(C.GSON.toJson(mv), "minecraft/pack.json");
zip.putTextFile(C.GSON.toJson(modpackJson), "modpack.json");
} finally {
if (zip != null)
zip.closeFile();

View File

@@ -31,7 +31,8 @@ import org.jackhuang.hellominecraft.util.StrUtils;
public class MinecraftLibrary extends IMinecraftLibrary {
public ArrayList<Rules> rules;
public String url, formatted = null;
public String url;
public transient String formatted = null;
public Natives natives;
public Extract extract;

View File

@@ -85,69 +85,67 @@ public class MinecraftVersionManager extends IMinecraftProvider {
File version = new File(service.baseDirectory(), "versions");
File[] files = version.listFiles();
if (files == null || files.length == 0)
return;
if (files != null && files.length > 0)
for (File dir : files) {
String id = dir.getName();
File jsonFile = new File(dir, id + ".json");
for (File dir : files) {
String id = dir.getName();
File jsonFile = new File(dir, id + ".json");
if (!dir.isDirectory())
continue;
boolean ask = false;
File[] jsons = null;
if (!jsonFile.exists()) {
jsons = FileUtils.searchSuffix(dir, "json");
if (jsons.length == 1)
ask = true;
}
if (ask) {
HMCLog.warn("Found not matched filenames version: " + id + ", json: " + jsons[0].getName());
if (MessageBox.Show(String.format(C.i18n("launcher.versions_json_not_matched"), id, jsons[0].getName()), MessageBox.YES_NO_OPTION) == MessageBox.YES_OPTION)
if (!jsons[0].renameTo(new File(jsons[0].getParent(), id + ".json")))
HMCLog.warn("Failed to rename version json " + jsons[0]);
}
if (!jsonFile.exists()) {
if (MessageBox.Show(C.i18n("launcher.versions_json_not_matched_cannot_auto_completion", id), MessageBox.YES_NO_OPTION) == MessageBox.YES_OPTION)
FileUtils.deleteDirectoryQuietly(dir);
continue;
}
MinecraftVersion mcVersion;
try {
mcVersion = C.GSON.fromJson(FileUtils.readFileToString(jsonFile), MinecraftVersion.class);
if (mcVersion == null)
throw new GameException("Wrong json format, got null.");
} catch (IOException | GameException e) {
HMCLog.warn("Found wrong format json, try to fix it.", e);
if (MessageBox.Show(C.i18n("launcher.versions_json_not_formatted", id), MessageBox.YES_NO_OPTION) == MessageBox.YES_OPTION) {
service.download().downloadMinecraftVersionJson(id);
try {
mcVersion = C.GSON.fromJson(FileUtils.readFileToString(jsonFile), MinecraftVersion.class);
if (mcVersion == null)
throw new GameException("Wrong json format, got null.");
} catch (IOException | GameException ex) {
HMCLog.warn("Ignoring: " + dir + ", the json of this Minecraft is malformed.", ex);
continue;
}
} else
if (!dir.isDirectory())
continue;
}
try {
if (!id.equals(mcVersion.id)) {
HMCLog.warn("Found: " + dir + ", it contains id: " + mcVersion.id + ", expected: " + id + ", this app will fix this problem.");
mcVersion.id = id;
FileUtils.writeQuietly(jsonFile, C.GSON.toJson(mcVersion));
boolean ask = false;
File[] jsons = null;
if (!jsonFile.exists()) {
jsons = FileUtils.searchSuffix(dir, "json");
if (jsons.length == 1)
ask = true;
}
if (ask) {
HMCLog.warn("Found not matched filenames version: " + id + ", json: " + jsons[0].getName());
if (MessageBox.Show(String.format(C.i18n("launcher.versions_json_not_matched"), id, jsons[0].getName()), MessageBox.YES_NO_OPTION) == MessageBox.YES_OPTION)
if (!jsons[0].renameTo(new File(jsons[0].getParent(), id + ".json")))
HMCLog.warn("Failed to rename version json " + jsons[0]);
}
if (!jsonFile.exists()) {
if (MessageBox.Show(C.i18n("launcher.versions_json_not_matched_cannot_auto_completion", id), MessageBox.YES_NO_OPTION) == MessageBox.YES_OPTION)
FileUtils.deleteDirectoryQuietly(dir);
continue;
}
MinecraftVersion mcVersion;
try {
mcVersion = C.GSON.fromJson(FileUtils.readFileToString(jsonFile), MinecraftVersion.class);
if (mcVersion == null)
throw new GameException("Wrong json format, got null.");
} catch (IOException | GameException e) {
HMCLog.warn("Found wrong format json, try to fix it.", e);
if (MessageBox.Show(C.i18n("launcher.versions_json_not_formatted", id), MessageBox.YES_NO_OPTION) == MessageBox.YES_OPTION) {
service.download().downloadMinecraftVersionJson(id);
try {
mcVersion = C.GSON.fromJson(FileUtils.readFileToString(jsonFile), MinecraftVersion.class);
if (mcVersion == null)
throw new GameException("Wrong json format, got null.");
} catch (IOException | GameException ex) {
HMCLog.warn("Ignoring: " + dir + ", the json of this Minecraft is malformed.", ex);
continue;
}
} else
continue;
}
try {
if (!id.equals(mcVersion.id)) {
HMCLog.warn("Found: " + dir + ", it contains id: " + mcVersion.id + ", expected: " + id + ", this app will fix this problem.");
mcVersion.id = id;
FileUtils.writeQuietly(jsonFile, C.GSON.toJson(mcVersion));
}
if (mcVersion.libraries != null)
for (MinecraftLibrary ml : mcVersion.libraries)
ml.init();
versions.put(id, mcVersion);
onLoadedVersion.execute(id);
} catch (Exception e) {
HMCLog.warn("Ignoring: " + dir + ", the json of this Minecraft is malformed.", e);
if (mcVersion.libraries != null)
for (MinecraftLibrary ml : mcVersion.libraries)
ml.init();
versions.put(id, mcVersion);
onLoadedVersion.execute(id);
} catch (Exception e) {
HMCLog.warn("Ignoring: " + dir + ", the json of this Minecraft is malformed.", e);
}
}
}
onRefreshedVersions.execute(null);
}

View File

@@ -35,8 +35,10 @@ import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftModService;
import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftProvider;
import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftService;
import org.jackhuang.hellominecraft.launcher.core.mod.MinecraftModService;
import org.jackhuang.hellominecraft.launcher.core.mod.ModpackManager;
import org.jackhuang.hellominecraft.util.C;
import org.jackhuang.hellominecraft.util.system.FileUtils;
import org.jackhuang.hellominecraft.util.tasks.TaskWindow;
/**
*
@@ -52,6 +54,7 @@ public class DefaultMinecraftService extends IMinecraftService {
this.provider = new HMCLGameProvider(this);
provider.initializeMiencraft();
provider.onRefreshingVersions.register(versionSettings::clear);
provider.onRefreshedVersions.register(this::checkModpack);
provider.onLoadedVersion.register(this::loadVersionSetting);
this.mms = new MinecraftModService(this);
this.mds = new MinecraftDownloadService(this);
@@ -67,6 +70,14 @@ public class DefaultMinecraftService extends IMinecraftService {
});
}
private void checkModpack() {
if (version().getVersionCount() == 0) {
File modpack = new File("modpack.zip");
if (modpack.exists())
TaskWindow.factory().append(ModpackManager.install(modpack, this, null)).create();
}
}
private void loadVersionSetting(String id) {
if (provider.getVersionById(id) == null)
return;

View File

@@ -68,10 +68,9 @@ public final class Profile {
private transient final VersionSetting defaultVersionSetting = new VersionSetting();
public VersionSetting getSelectedVersionSetting() {
String s = getSelectedVersion();
VersionSetting vs = defaultVersionSetting;
if (s != null)
vs = getVersionSetting(getSelectedVersion());
VersionSetting vs = getVersionSetting(getSelectedVersion());
if (vs == null)
vs = defaultVersionSetting;
return vs;
}

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" alignment="1" pref="400" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" alignment="1" pref="300" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextPane" name="txtDescription">
<Events>
<EventHandler event="caretUpdate" listener="javax.swing.event.CaretListener" parameters="javax.swing.event.CaretEvent" handler="txtDescriptionCaretUpdate"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>

View File

@@ -0,0 +1,84 @@
/*
* Hello Minecraft! Launcher.
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see {http://www.gnu.org/licenses/}.
*/
package org.jackhuang.hellominecraft.launcher.ui.modpack;
import java.util.Map;
import org.jackhuang.hellominecraft.util.ui.wizard.spi.WizardController;
/**
*
* @author huangyuhui
*/
public class ModpackDescriptionPanel extends javax.swing.JPanel {
public static final String KEY_MODPACK_DESCRITION = "modpackDescription";
private final transient WizardController controller;
private final Map wizardData;
/**
* Creates new form ModpackDescriptionPanel
*/
public ModpackDescriptionPanel(WizardController controller, Map wizardData) {
initComponents();
this.controller = controller;
this.wizardData = wizardData;
}
/**
* This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
txtDescription = new javax.swing.JTextPane();
txtDescription.addCaretListener(new javax.swing.event.CaretListener() {
public void caretUpdate(javax.swing.event.CaretEvent evt) {
txtDescriptionCaretUpdate(evt);
}
});
jScrollPane1.setViewportView(txtDescription);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
private void txtDescriptionCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_txtDescriptionCaretUpdate
wizardData.put(KEY_MODPACK_DESCRITION, txtDescription.getText());
}//GEN-LAST:event_txtDescriptionCaretUpdate
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextPane txtDescription;
// End of variables declaration//GEN-END:variables
}

View File

@@ -16,12 +16,13 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="txtModpackName" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="lblModpackLocation" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace pref="353" max="32767" attributes="0"/>
<Component id="cboModpackLocation" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="txtModpackLocation" max="32767" attributes="0"/>
@@ -30,8 +31,9 @@
<Group type="103" groupAlignment="0" attributes="0">
<Component id="lblGameVersion" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="67" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
@@ -43,7 +45,11 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="120" max="32767" attributes="0"/>
<EmptySpace pref="70" max="32767" attributes="0"/>
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="txtModpackName" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblModpackLocation" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="cboModpackLocation" alignment="3" min="-2" max="-2" attributes="0"/>
@@ -63,7 +69,7 @@
<Component class="javax.swing.JLabel" name="lblModpackLocation">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="modpack.save" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
<ResourceString bundle="org/jackhuang/hellominecraft/lang/I18N.properties" key="modpack.save" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
@@ -105,5 +111,20 @@
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/jackhuang/hellominecraft/lang/I18N.properties" key="modpack.name" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="txtModpackName">
<Properties>
<Property name="toolTipText" type="java.lang.String" value=""/>
</Properties>
<Events>
<EventHandler event="caretUpdate" listener="javax.swing.event.CaretListener" parameters="javax.swing.event.CaretEvent" handler="txtModpackNameCaretUpdate"/>
</Events>
</Component>
</SubComponents>
</Form>

View File

@@ -32,6 +32,7 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
public static final String KEY_GAME_VERSION = "gameVersion";
public static final String KEY_MODPACK_LOCATION = "modpackLocation";
public static final String KEY_MODPACK_NAME = "modpackName";
private final transient WizardController controller;
private final Map wizardData;
@@ -73,6 +74,8 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
lblGameVersion = new javax.swing.JLabel();
cboGameVersion = new javax.swing.JComboBox<>();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
txtModpackName = new javax.swing.JTextField();
lblModpackLocation.setText(C.i18n("modpack.save")); // NOI18N
@@ -99,6 +102,15 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
jLabel1.setText(C.i18n("modpack.warning")); // NOI18N
jLabel2.setText(C.i18n("modpack.name")); // NOI18N
txtModpackName.setToolTipText("");
txtModpackName.addCaretListener(new javax.swing.event.CaretListener() {
public void caretUpdate(javax.swing.event.CaretEvent evt) {
txtModpackNameCaretUpdate(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -106,25 +118,31 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtModpackName)
.addGroup(layout.createSequentialGroup()
.addComponent(lblModpackLocation)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 353, Short.MAX_VALUE)
.addComponent(cboModpackLocation))
.addComponent(txtModpackLocation)
.addComponent(cboGameVersion, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblGameVersion)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 67, Short.MAX_VALUE)))
.addComponent(jLabel1)
.addComponent(jLabel2))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 120, Short.MAX_VALUE)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 70, Short.MAX_VALUE)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtModpackName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lblModpackLocation)
.addComponent(cboModpackLocation))
@@ -162,12 +180,23 @@ public class ModpackInitializationPanel extends javax.swing.JPanel {
wizardData.put(KEY_GAME_VERSION, cboGameVersion.getSelectedItem());
}//GEN-LAST:event_cboGameVersionItemStateChanged
private void txtModpackNameCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_txtModpackNameCaretUpdate
wizardData.put(KEY_MODPACK_NAME, txtModpackName.getText());
if (txtModpackName.getText().trim().isEmpty())
controller.setProblem(C.i18n("modpack.not_a_valid_name"));
else
controller.setProblem(null);
}//GEN-LAST:event_txtModpackNameCaretUpdate
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JComboBox<String> cboGameVersion;
private javax.swing.JButton cboModpackLocation;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel lblGameVersion;
private javax.swing.JLabel lblModpackLocation;
private javax.swing.JTextField txtModpackLocation;
private javax.swing.JTextField txtModpackName;
// End of variables declaration//GEN-END:variables
}

View File

@@ -21,6 +21,7 @@ import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -60,7 +61,7 @@ public class ModpackWizard extends WizardBranchController {
}
public ModpackWizard(IMinecraftService service) {
super(new WizardPanelProvider(C.i18n("modpack.wizard"), new String[] { C.i18n("modpack.wizard.step.1"), C.i18n("modpack.wizard.step.2") }, new String[] { C.i18n("modpack.wizard.step.1.title"), C.i18n("modpack.wizard.step.2.title") }) {
super(new WizardPanelProvider(C.i18n("modpack.wizard"), new String[] { C.i18n("modpack.wizard.step.1"), C.i18n("modpack.wizard.step.2"), C.i18n("modpack.wizard.step.3") }, new String[] { C.i18n("modpack.wizard.step.1.title"), C.i18n("modpack.wizard.step.2.title"), C.i18n("modpack.wizard.step.3.title") }) {
@Override
protected Object finish(Map settings) throws WizardException {
@@ -71,12 +72,16 @@ public class ModpackWizard extends WizardBranchController {
ArrayList<String> blackList = new ArrayList<>(ModpackManager.MODPACK_BLACK_LIST);
CheckBoxTreeNode root = (CheckBoxTreeNode) settings.get("blackList");
process(root, "minecraft", blackList);
HashMap map = new HashMap();
map.put("name", (String) settings.get(ModpackInitializationPanel.KEY_MODPACK_NAME));
if (settings.containsKey(ModpackDescriptionPanel.KEY_MODPACK_DESCRITION))
map.put("description", (String) settings.get(ModpackDescriptionPanel.KEY_MODPACK_DESCRITION));
try {
File loc = new File((String) settings.get(ModpackInitializationPanel.KEY_MODPACK_LOCATION));
ModpackManager.export(loc,
service.version(),
(String) settings.get(ModpackInitializationPanel.KEY_GAME_VERSION),
blackList);
blackList, map);
progress.finished(new Summary(C.i18n("modpack.export_finished") + ": " + loc.getAbsolutePath(), null));
} catch (IOException | GameException ex) {
HMCLog.err("Failed to export modpack", ex);
@@ -99,9 +104,13 @@ public class ModpackWizard extends WizardBranchController {
return new ModpackInitializationPanel(controller, settings, s);
case 1:
controller.setForwardNavigationMode(WizardController.MODE_CAN_FINISH);
controller.setForwardNavigationMode(WizardController.MODE_CAN_CONTINUE_OR_FINISH);
return new ModpackFileSelectionPanel(controller, settings, service.baseDirectory(), ModpackManager.MODPACK_PREDICATE);
case 2:
controller.setForwardNavigationMode(WizardController.MODE_CAN_FINISH);
return new ModpackDescriptionPanel(controller, settings);
default:
throw new IllegalArgumentException(id);
}

View File

@@ -43,6 +43,24 @@ public class CrashReporter implements Thread.UncaughtExceptionHandler {
private static final Logger LOGGER = Logger.getLogger(CrashReporter.class.getName());
private static final HashMap<String, String> SOURCE = new HashMap<String, String>() {
{
put("MessageBox", "");
put("AWTError", "");
put("JFileChooser", "Has your operating system been installed completely or is a ghost system? ");
put("JceSecurityManager", "Has your operating system been installed completely or is a ghost system? ");
put("sun.awt.shell.Win32ShellFolder2", "crash.user_fault");
put("UnsatisfiedLinkError", "crash.user_fault");
put("java.awt.HeadlessException", "crash.headless");
put("java.lang.NoClassDefFoundError", "crash.NoClassDefFound");
put("java.lang.VerifyError", "crash.NoClassDefFound");
put("java.lang.NoSuchMethodError", "crash.NoClassDefFound");
put("java.lang.IncompatibleClassChangeError", "crash.NoClassDefFound");
put("java.lang.ClassFormatError", "crash.NoClassDefFound");
put("java.lang.OutOfMemoryError", "FUCKING MEMORY LIMIT!");
}
};
boolean enableLogger = false;
public CrashReporter(boolean enableLogger) {
@@ -51,47 +69,26 @@ public class CrashReporter implements Thread.UncaughtExceptionHandler {
public boolean checkThrowable(Throwable e) {
String s = StrUtils.getStackTrace(e);
if (s.contains("MessageBox") || s.contains("AWTError"))
return false;
else if (s.contains("JFileChooser") || s.contains("JceSecurityManager")) {
LOGGER.severe("Is not your operating system installed completely? ");
return false;
}
if (s.contains("sun.awt.shell.Win32ShellFolder2") || s.contains("UnsatisfiedLinkError")) {
LOGGER.severe(C.i18n("crash.user_fault"));
try {
showMessage(C.i18n("crash.user_fault"));
} catch (Throwable t) {
LOGGER.log(Level.SEVERE, "Failed to show message", t);
for (HashMap.Entry<String, String> entry : SOURCE.entrySet())
if (s.contains(entry.getKey())) {
if (StrUtils.isNotBlank(entry.getValue())) {
String info = C.i18n(entry.getKey());
LOGGER.severe(info);
try {
showMessage(info);
} catch (Throwable t) {
LOGGER.log(Level.SEVERE, "Failed to show message", t);
}
}
return false;
}
return false;
} else if (s.contains("java.awt.HeadlessException")) {
LOGGER.severe(C.i18n("crash.headless"));
try {
showMessage(C.i18n("crash.headless"));
} catch (Throwable t) {
LOGGER.log(Level.SEVERE, "Failed to show message", t);
}
return false;
} else if (s.contains("java.lang.NoClassDefFoundError") || s.contains("java.lang.VerifyError") || s.contains("java.lang.NoSuchMethodError") || s.contains("java.lang.IncompatibleClassChangeError") || s.contains("java.lang.ClassFormatError")) {
LOGGER.severe(C.i18n("crash.NoClassDefFound"));
try {
showMessage(C.i18n("crash.NoClassDefFound"));
} catch (Throwable t) {
LOGGER.log(Level.SEVERE, "Failed to show message", t);
}
return false;
} else if (s.contains("java.lang.OutOfMemoryError")) {
LOGGER.severe("FUCKING MEMORY LIMIT!");
return false;
}
return true;
}
@Override
public void uncaughtException(Thread t, Throwable e) {
String s = StrUtils.getStackTrace(e);
if (!s.contains("org.jackhuang.hellominecraft"))
if (!s.contains("org.jackhuang"))
return;
try {
String text = "\n---- Hello Minecraft! Crash Report ----\n";

View File

@@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
<Properties>
<Property name="defaultCloseOperation" type="int" value="2"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jComboBox1" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace pref="212" max="32767" attributes="0"/>
<Component id="btnCancel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnOK" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jComboBox1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="btnOK" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnCancel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="selector.choose" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="jComboBox1">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="0"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="btnOK">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="button.ok" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnOKActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="btnCancel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/jackhuang/hellominecraft/launcher/I18N.properties" key="button.cancel" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnCancelActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Form>

View File

@@ -1,146 +0,0 @@
/*
* Hello Minecraft!.
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see {http://www.gnu.org/licenses/}.
*/
package org.jackhuang.hellominecraft.util.ui;
import org.jackhuang.hellominecraft.util.C;
/**
* The frame given to choose things.
*
* @author huangyuhui
*/
public class Selector extends javax.swing.JDialog {
String[] selList;
String msg;
/**
* The index of the chosen in select list.
*/
public int sel;
public static final int FAILED_TO_SELECT = -1;
/**
* @param parent null
* @param selList Selection List
* @param msg Message
*/
public Selector(java.awt.Frame parent, String[] selList, String msg) {
super(parent, true);
initComponents();
setLocationRelativeTo(null);
this.selList = selList;
this.sel = FAILED_TO_SELECT;
this.msg = msg;
jLabel1.setText(msg);
for (String s : selList)
jComboBox1.addItem(s);
}
public int getChoice() {
setVisible(true);
return sel;
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jComboBox1 = new javax.swing.JComboBox();
btnOK = new javax.swing.JButton();
btnCancel = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jLabel1.setText(C.i18n("selector.choose")); // NOI18N
btnOK.setText(C.i18n("button.ok")); // NOI18N
btnOK.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnOKActionPerformed(evt);
}
});
btnCancel.setText(C.i18n("button.cancel")); // NOI18N
btnCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCancelActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(0, 0, Short.MAX_VALUE))))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(212, Short.MAX_VALUE)
.addComponent(btnCancel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnOK)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnOK)
.addComponent(btnCancel))
.addContainerGap())
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelActionPerformed
sel = FAILED_TO_SELECT;
this.dispose();
}//GEN-LAST:event_btnCancelActionPerformed
private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOKActionPerformed
sel = jComboBox1.getSelectedIndex();
this.dispose();
}//GEN-LAST:event_btnOKActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnCancel;
private javax.swing.JButton btnOK;
private javax.swing.JComboBox jComboBox1;
private javax.swing.JLabel jLabel1;
// End of variables declaration//GEN-END:variables
}

View File

@@ -26,8 +26,10 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import javax.swing.DefaultListModel;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.JTable;
@@ -253,4 +255,14 @@ public class SwingUtils {
r.run();
}
}
public static int select(String[] selList, String msg) {
Object msgs[] = new Object[2];
msgs[0] = msg;
msgs[1] = new JComboBox(selList);
int result = JOptionPane.showOptionDialog(null, msgs, msg, JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);
if (result == JOptionPane.CANCEL_OPTION)
return -1;
return ((JComboBox) msgs[1]).getSelectedIndex();
}
}

View File

@@ -213,6 +213,7 @@ modpack=整合包
modpack.choose=选择要导入的游戏整合包文件,如果您希望更新整合包,请输入要更新的版本名
modpack.install.task=导入整合包
modpack.install_error=安装失败,可能是整合包格式不正确或操作文件失败
modpack.install.will_install=将会安装整合包:
modpack.save=选择要导出到的游戏整合包位置
modpack.save.task=导出整合包
modpack.export_error=导出失败,可能是您的游戏文件夹格式不正确或操作文件失败
@@ -223,11 +224,15 @@ modpack.wizard.step.1=基本设置
modpack.wizard.step.1.title=设置整合包的主要信息
modpack.wizard.step.2=文件选择
modpack.wizard.step.2.title=选中你不想加到整合包中的文件(夹)
modpack.wizard.step.3=整合包描述
modpack.wizard.step.3.title=描述你要制作的整合包比如整合包注意事项和更新记录支持HTML 3。
modpack.incorrect_format.no_json=整合包格式错误pack.json丢失
modpack.incorrect_format.no_jar=整合包格式错误pack.json丢失jar字段
modpack.cannot_read_version=读取游戏版本失败
modpack.not_a_valid_location=不是一个有效整合包位置
modpack.warning=<html>在制作整合包前,请您确认您选择的版本可以正常启动,<br/>并保证您的Minecraft是正式版而非快照版<br/>而且不应当将不允许非官方途径传播的Mod纳入整合包。</html>
modpack.name=整合包名称
modpack.not_a_valid_name=整合包名称不能为空
mods=Mod管理
mods.choose_mod=选择模组
@@ -353,7 +358,7 @@ color.red=红色
color.blue=蓝色
color.green=绿色
color.orange=橙色
color.dark_blue=深蓝色失败
color.dark_blue=深蓝色
color.purple=紫色
wizard.next_>=下一步 >
@@ -373,4 +378,4 @@ wizard.failed=失败
wizard.steps=步骤
lang=简体中文
lang.default=跟随系统语言
lang.default=跟随系统语言

View File

@@ -213,6 +213,7 @@ modpack=\u6574\u5408\u5305
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.install.will_install=\u5c06\u4f1a\u5b89\u88c5\u6574\u5408\u5305\uff1a
modpack.save=\u9009\u62e9\u8981\u5bfc\u51fa\u5230\u7684\u6e38\u620f\u6574\u5408\u5305\u4f4d\u7f6e
modpack.save.task=\u5bfc\u51fa\u6574\u5408\u5305
modpack.export_error=\u5bfc\u51fa\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u60a8\u7684\u6e38\u620f\u6587\u4ef6\u5939\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25
@@ -223,11 +224,15 @@ modpack.wizard.step.1=\u57fa\u672c\u8bbe\u7f6e
modpack.wizard.step.1.title=\u8bbe\u7f6e\u6574\u5408\u5305\u7684\u4e3b\u8981\u4fe1\u606f
modpack.wizard.step.2=\u6587\u4ef6\u9009\u62e9
modpack.wizard.step.2.title=\u9009\u4e2d\u4f60\u4e0d\u60f3\u52a0\u5230\u6574\u5408\u5305\u4e2d\u7684\u6587\u4ef6(\u5939)
modpack.wizard.step.3=\u6574\u5408\u5305\u63cf\u8ff0
modpack.wizard.step.3.title=\u63cf\u8ff0\u4f60\u8981\u5236\u4f5c\u7684\u6574\u5408\u5305\uff0c\u6bd4\u5982\u6574\u5408\u5305\u6ce8\u610f\u4e8b\u9879\u548c\u66f4\u65b0\u8bb0\u5f55\uff0c\u652f\u6301HTML 3\u3002
modpack.incorrect_format.no_json=\u6574\u5408\u5305\u683c\u5f0f\u9519\u8bef\uff0cpack.json\u4e22\u5931
modpack.incorrect_format.no_jar=\u6574\u5408\u5305\u683c\u5f0f\u9519\u8bef\uff0cpack.json\u4e22\u5931jar\u5b57\u6bb5
modpack.cannot_read_version=\u8bfb\u53d6\u6e38\u620f\u7248\u672c\u5931\u8d25
modpack.not_a_valid_location=\u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u6574\u5408\u5305\u4f4d\u7f6e
modpack.warning=<html>\u5728\u5236\u4f5c\u6574\u5408\u5305\u524d\uff0c\u8bf7\u60a8\u786e\u8ba4\u60a8\u9009\u62e9\u7684\u7248\u672c\u53ef\u4ee5\u6b63\u5e38\u542f\u52a8\uff0c<br/>\u5e76\u4fdd\u8bc1\u60a8\u7684Minecraft\u662f\u6b63\u5f0f\u7248\u800c\u975e\u5feb\u7167\u7248\uff0c<br/>\u800c\u4e14\u4e0d\u5e94\u5f53\u5c06\u4e0d\u5141\u8bb8\u975e\u5b98\u65b9\u9014\u5f84\u4f20\u64ad\u7684Mod\u7eb3\u5165\u6574\u5408\u5305\u3002</html>
modpack.name=\u6574\u5408\u5305\u540d\u79f0
modpack.not_a_valid_name=\u6574\u5408\u5305\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a
mods=Mod\u7ba1\u7406
mods.choose_mod=\u9009\u62e9\u6a21\u7ec4
@@ -353,7 +358,7 @@ color.red=\u7ea2\u8272
color.blue=\u84dd\u8272
color.green=\u7eff\u8272
color.orange=\u6a59\u8272
color.dark_blue=\u6df1\u84dd\u8272\u5931\u8d25
color.dark_blue=\u6df1\u84dd\u8272
color.purple=\u7d2b\u8272
wizard.next_>=\u4e0b\u4e00\u6b65 >
@@ -373,4 +378,4 @@ wizard.failed=\u5931\u8d25
wizard.steps=\u6b65\u9aa4
lang=\u7b80\u4f53\u4e2d\u6587
lang.default=\u8ddf\u968f\u7cfb\u7edf\u8bed\u8a00
lang.default=\u8ddf\u968f\u7cfb\u7edf\u8bed\u8a00

View File

@@ -213,6 +213,7 @@ modpack=Mod pack
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.install.will_install=Will install the modpack:
modpack.save=Choose a location which you want to export the game files to.
modpack.save.task=Export the modpack
modpack.export_error=Failed to export the modpack, maybe the format of your game directory is incorrect or failed to manage files.
@@ -223,11 +224,15 @@ modpack.wizard.step.1=Basic options
modpack.wizard.step.1.title=Set the basic options to the modpack.
modpack.wizard.step.2=Files selection
modpack.wizard.step.2.title=Choose the files you do not want to put in the modpack.
modpack.wizard.step.3=Description
modpack.wizard.step.3.title=Describe your modpack, including precautions, changlog, supporting HTML 3.
modpack.incorrect_format.no_json=The format of the modpack is incorrect, pack.json is missing.
modpack.incorrect_format.no_jar=The format of the modpack is incorrect, pack.json does not have attribute 'jar'
modpack.cannot_read_version=Failed to gather the game version
modpack.not_a_valid_location=Not a valid modpack location
modpack.warning=<html>Before making modpack, you should ensure that your game can launch successfully,<br/>and that your Minecraft is release, not snapshot.<br/>and that it is not allowed to add mods which is not allowed to distribute to the modpack.</html>
modpack.name=Modpack Name
modpack.not_a_valid_name=Modpack Name cannot be empty.
mods=Mods
mods.choose_mod=Choose your mods

View File

@@ -213,6 +213,7 @@ modpack=Mod pack
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.install.will_install=Will install the modpack:
modpack.save=Choose a location which you want to export the game files to.
modpack.save.task=Export the modpack
modpack.export_error=Failed to export the modpack, maybe the format of your game directory is incorrect or failed to manage files.
@@ -223,11 +224,15 @@ modpack.wizard.step.1=Basic options
modpack.wizard.step.1.title=Set the basic options to the modpack.
modpack.wizard.step.2=Files selection
modpack.wizard.step.2.title=Choose the files you do not want to put in the modpack.
modpack.wizard.step.3=Description
modpack.wizard.step.3.title=Describe your modpack, including precautions, changlog, supporting HTML 3.
modpack.incorrect_format.no_json=The format of the modpack is incorrect, pack.json is missing.
modpack.incorrect_format.no_jar=The format of the modpack is incorrect, pack.json does not have attribute 'jar'
modpack.cannot_read_version=Failed to gather the game version
modpack.not_a_valid_location=Not a valid modpack location
modpack.warning=<html>Before making modpack, you should ensure that your game can launch successfully,<br/>and that your Minecraft is release, not snapshot.<br/>and that it is not allowed to add mods which is not allowed to distribute to the modpack.</html>
modpack.name=Modpack Name
modpack.not_a_valid_name=Modpack Name cannot be empty.
mods=Mods
mods.choose_mod=Choose your mods

View File

@@ -201,8 +201,8 @@ settings.game_directory=游戏路径
settings.dimension=游戏窗口分辨率
settings.fullscreen=全屏
settings.update_version=更新版本文件
settings.physical_memory=物理内存大小
settings.run_directory=运行路径(版本隔离)
settings.physical_memory=物理内存大小
settings.choose_javapath=选择Java路径
settings.default=默认
settings.custom=自定义
@@ -213,6 +213,7 @@ modpack=整合包
modpack.choose=选择要导入的游戏整合包文件,如果您希望更新整合包,请输入要更新的版本名
modpack.install.task=导入整合包
modpack.install_error=安装失败,可能是整合包格式不正确或操作文件失败
modpack.install.will_install=将会安装整合包:
modpack.save=选择要导出到的游戏整合包位置
modpack.save.task=导出整合包
modpack.export_error=导出失败,可能是您的游戏文件夹格式不正确或操作文件失败
@@ -223,11 +224,15 @@ modpack.wizard.step.1=基本设置
modpack.wizard.step.1.title=设置整合包的主要信息
modpack.wizard.step.2=文件选择
modpack.wizard.step.2.title=选中你不想加到整合包中的文件(夹)
modpack.wizard.step.3=整合包描述
modpack.wizard.step.3.title=描述你要制作的整合包比如整合包注意事项和更新记录支持HTML 3。
modpack.incorrect_format.no_json=整合包格式错误pack.json丢失
modpack.incorrect_format.no_jar=整合包格式错误pack.json丢失jar字段
modpack.cannot_read_version=读取游戏版本失败
modpack.not_a_valid_location=不是一个有效整合包位置
modpack.warning=<html>在制作整合包前,请您确认您选择的版本可以正常启动,<br/>并保证您的Minecraft是正式版而非快照版<br/>而且不应当将不允许非官方途径传播的Mod纳入整合包。</html>
modpack.name=整合包名称
modpack.not_a_valid_name=整合包名称不能为空
mods=Mod管理
mods.choose_mod=选择模组
@@ -373,4 +378,4 @@ wizard.failed=失败
wizard.steps=步骤
lang=简体中文
lang.default=跟随系统语言
lang.default=跟随系统语言

View File

@@ -201,8 +201,8 @@ settings.game_directory=\u6e38\u620f\u8def\u5f84
settings.dimension=\u6e38\u620f\u7a97\u53e3\u5206\u8fa8\u7387
settings.fullscreen=\u5168\u5c4f
settings.update_version=\u66f4\u65b0\u7248\u672c\u6587\u4ef6
settings.physical_memory=\u7269\u7406\u5185\u5b58\u5927\u5c0f
settings.run_directory=\u8fd0\u884c\u8def\u5f84(\u7248\u672c\u9694\u79bb)
settings.physical_memory=\u7269\u7406\u5185\u5b58\u5927\u5c0f
settings.choose_javapath=\u9009\u62e9Java\u8def\u5f84
settings.default=\u9ed8\u8ba4
settings.custom=\u81ea\u5b9a\u4e49
@@ -213,6 +213,7 @@ modpack=\u6574\u5408\u5305
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.install.will_install=\u5c06\u4f1a\u5b89\u88c5\u6574\u5408\u5305\uff1a
modpack.save=\u9009\u62e9\u8981\u5bfc\u51fa\u5230\u7684\u6e38\u620f\u6574\u5408\u5305\u4f4d\u7f6e
modpack.save.task=\u5bfc\u51fa\u6574\u5408\u5305
modpack.export_error=\u5bfc\u51fa\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u60a8\u7684\u6e38\u620f\u6587\u4ef6\u5939\u683c\u5f0f\u4e0d\u6b63\u786e\u6216\u64cd\u4f5c\u6587\u4ef6\u5931\u8d25
@@ -223,11 +224,15 @@ modpack.wizard.step.1=\u57fa\u672c\u8bbe\u7f6e
modpack.wizard.step.1.title=\u8bbe\u7f6e\u6574\u5408\u5305\u7684\u4e3b\u8981\u4fe1\u606f
modpack.wizard.step.2=\u6587\u4ef6\u9009\u62e9
modpack.wizard.step.2.title=\u9009\u4e2d\u4f60\u4e0d\u60f3\u52a0\u5230\u6574\u5408\u5305\u4e2d\u7684\u6587\u4ef6(\u5939)
modpack.wizard.step.3=\u6574\u5408\u5305\u63cf\u8ff0
modpack.wizard.step.3.title=\u63cf\u8ff0\u4f60\u8981\u5236\u4f5c\u7684\u6574\u5408\u5305\uff0c\u6bd4\u5982\u6574\u5408\u5305\u6ce8\u610f\u4e8b\u9879\u548c\u66f4\u65b0\u8bb0\u5f55\uff0c\u652f\u6301HTML 3\u3002
modpack.incorrect_format.no_json=\u6574\u5408\u5305\u683c\u5f0f\u9519\u8bef\uff0cpack.json\u4e22\u5931
modpack.incorrect_format.no_jar=\u6574\u5408\u5305\u683c\u5f0f\u9519\u8bef\uff0cpack.json\u4e22\u5931jar\u5b57\u6bb5
modpack.cannot_read_version=\u8bfb\u53d6\u6e38\u620f\u7248\u672c\u5931\u8d25
modpack.not_a_valid_location=\u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u6574\u5408\u5305\u4f4d\u7f6e
modpack.warning=<html>\u5728\u5236\u4f5c\u6574\u5408\u5305\u524d\uff0c\u8bf7\u60a8\u786e\u8ba4\u60a8\u9009\u62e9\u7684\u7248\u672c\u53ef\u4ee5\u6b63\u5e38\u542f\u52a8\uff0c<br/>\u5e76\u4fdd\u8bc1\u60a8\u7684Minecraft\u662f\u6b63\u5f0f\u7248\u800c\u975e\u5feb\u7167\u7248\uff0c<br/>\u800c\u4e14\u4e0d\u5e94\u5f53\u5c06\u4e0d\u5141\u8bb8\u975e\u5b98\u65b9\u9014\u5f84\u4f20\u64ad\u7684Mod\u7eb3\u5165\u6574\u5408\u5305\u3002</html>
modpack.name=\u6574\u5408\u5305\u540d\u79f0
modpack.not_a_valid_name=\u6574\u5408\u5305\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a
mods=Mod\u7ba1\u7406
mods.choose_mod=\u9009\u62e9\u6a21\u7ec4
@@ -373,4 +378,4 @@ wizard.failed=\u5931\u8d25
wizard.steps=\u6b65\u9aa4
lang=\u7b80\u4f53\u4e2d\u6587
lang.default=\u8ddf\u968f\u7cfb\u7edf\u8bed\u8a00
lang.default=\u8ddf\u968f\u7cfb\u7edf\u8bed\u8a00

View File

@@ -210,9 +210,10 @@ settings.choose_gamedir=选择游戏路径
settings.failed_load=設定資料加載失敗,可能是升級了啟動器或被人工修改造成錯誤,是否清除?
modpack=懶人包
modpack.choose=選擇要導入的遊戲懶人包資料,如果您希望更新整合包,请输入要更新的版本名
modpack.choose=選擇要導入的遊戲懶人包資料,如果您希望更新懶人包,请输入要更新的版本名
modpack.install.task=導入懶人包
modpack.install_error=安裝失敗,可能是整合包格式不正確或操作資料失敗
modpack.install_error=安裝失敗,可能是懶人包格式不正確或操作資料失敗
modpack.install.will_install=將會安裝懶人包:
modpack.save=選擇要導出到的遊戲懶人包位置
modpack.save.task=導出懶人包
modpack.export_error=導出失敗,可能是您的遊戲資料夾格式不正確或操作資料失敗
@@ -222,12 +223,16 @@ modpack.wizard=導出懶人包嚮導
modpack.wizard.step.1=基本設定
modpack.wizard.step.1.title=設置懶人包的主要信息
modpack.wizard.step.2=資料選擇
modpack.wizard.step.2.title=選中你不想加到整合包中的資料(夾)
modpack.wizard.step.2.title=選中你不想加到懶人包中的資料(夾)
modpack.wizard.step.3=懶人包描述
modpack.wizard.step.3.title=描述你要製作的懶人包,比如懶人包注意事項和更新記錄,支持HTML 3。
modpack.incorrect_format.no_json=懶人包格式錯誤pack.json丟失
modpack.incorrect_format.no_jar=懶人包格式錯誤pack.json丟失jar字段
modpack.cannot_read_version=讀取遊戲版本失敗
modpack.not_a_valid_location=不是一个有效懒人包位置
modpack.warning=<html>在製作整合包前,請您確認您選擇的版本可以正常啟動,<br/>並保證您的Minecraft是正式版而非快照版,<br/>而且不應當將不允許非官方途徑傳播的Mod納入整合包。 </html>
modpack.warning=<html>在製作懶人包前,請您確認您選擇的版本可以正常啟動,<br/>並保證您的Minecraft是正式版而非快照版,<br/>而且不應當將不允許非官方途徑傳播的Mod納入整合包。 </html>
modpack.name=懶人包名稱
modpack.not_a_valid_name=懶人包名稱不能為空
mods=Mod管理
mods.choose_mod=选择模组

View File

@@ -210,9 +210,10 @@ settings.choose_gamedir=\u9009\u62e9\u6e38\u620f\u8def\u5f84
settings.failed_load=\u8a2d\u5b9a\u8cc7\u6599\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\u8cc7\u6599\uff0c\u5982\u679c\u60a8\u5e0c\u671b\u66f4\u65b0\u6574\u5408\u5305\uff0c\u8bf7\u8f93\u5165\u8981\u66f4\u65b0\u7684\u7248\u672c\u540d
modpack.choose=\u9078\u64c7\u8981\u5c0e\u5165\u7684\u904a\u6232\u61f6\u4eba\u5305\u8cc7\u6599\uff0c\u5982\u679c\u60a8\u5e0c\u671b\u66f4\u65b0\u61f6\u4eba\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\u8cc7\u6599\u5931\u6557
modpack.install_error=\u5b89\u88dd\u5931\u6557\uff0c\u53ef\u80fd\u662f\u61f6\u4eba\u5305\u683c\u5f0f\u4e0d\u6b63\u78ba\u6216\u64cd\u4f5c\u8cc7\u6599\u5931\u6557
modpack.install.will_install=\u5c07\u6703\u5b89\u88dd\u61f6\u4eba\u5305\uff1a
modpack.save=\u9078\u64c7\u8981\u5c0e\u51fa\u5230\u7684\u904a\u6232\u61f6\u4eba\u5305\u4f4d\u7f6e
modpack.save.task=\u5c0e\u51fa\u61f6\u4eba\u5305
modpack.export_error=\u5c0e\u51fa\u5931\u6557\uff0c\u53ef\u80fd\u662f\u60a8\u7684\u904a\u6232\u8cc7\u6599\u593e\u683c\u5f0f\u4e0d\u6b63\u78ba\u6216\u64cd\u4f5c\u8cc7\u6599\u5931\u6557
@@ -222,12 +223,16 @@ modpack.wizard=\u5c0e\u51fa\u61f6\u4eba\u5305\u56ae\u5c0e
modpack.wizard.step.1=\u57fa\u672c\u8a2d\u5b9a
modpack.wizard.step.1.title=\u8a2d\u7f6e\u61f6\u4eba\u5305\u7684\u4e3b\u8981\u4fe1\u606f
modpack.wizard.step.2=\u8cc7\u6599\u9078\u64c7
modpack.wizard.step.2.title=\u9078\u4e2d\u4f60\u4e0d\u60f3\u52a0\u5230\u6574\u5408\u5305\u4e2d\u7684\u8cc7\u6599(\u593e)
modpack.wizard.step.2.title=\u9078\u4e2d\u4f60\u4e0d\u60f3\u52a0\u5230\u61f6\u4eba\u5305\u4e2d\u7684\u8cc7\u6599(\u593e)
modpack.wizard.step.3=\u61f6\u4eba\u5305\u63cf\u8ff0
modpack.wizard.step.3.title=\u63cf\u8ff0\u4f60\u8981\u88fd\u4f5c\u7684\u61f6\u4eba\u5305,\u6bd4\u5982\u61f6\u4eba\u5305\u6ce8\u610f\u4e8b\u9805\u548c\u66f4\u65b0\u8a18\u9304,\u652f\u6301HTML 3\u3002
modpack.incorrect_format.no_json=\u61f6\u4eba\u5305\u683c\u5f0f\u932f\u8aa4\uff0cpack.json\u4e1f\u5931
modpack.incorrect_format.no_jar=\u61f6\u4eba\u5305\u683c\u5f0f\u932f\u8aa4\uff0cpack.json\u4e1f\u5931jar\u5b57\u6bb5
modpack.cannot_read_version=\u8b80\u53d6\u904a\u6232\u7248\u672c\u5931\u6557
modpack.not_a_valid_location=\u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u61d2\u4eba\u5305\u4f4d\u7f6e
modpack.warning=<html>\u5728\u88fd\u4f5c\u6574\u5408\u5305\u524d,\u8acb\u60a8\u78ba\u8a8d\u60a8\u9078\u64c7\u7684\u7248\u672c\u53ef\u4ee5\u6b63\u5e38\u555f\u52d5,\u200b\u200b<br/>\u4e26\u4fdd\u8b49\u60a8\u7684Minecraft\u662f\u6b63\u5f0f\u7248\u800c\u975e\u5feb\u7167\u7248,<br/>\u800c\u4e14\u4e0d\u61c9\u7576\u5c07\u4e0d\u5141\u8a31\u975e\u5b98\u65b9\u9014\u5f91\u50b3\u64ad\u7684Mod\u7d0d\u5165\u6574\u5408\u5305\u3002 </html>
modpack.warning=<html>\u5728\u88fd\u4f5c\u61f6\u4eba\u5305\u524d,\u8acb\u60a8\u78ba\u8a8d\u60a8\u9078\u64c7\u7684\u7248\u672c\u53ef\u4ee5\u6b63\u5e38\u555f\u52d5,\u200b\u200b<br/>\u4e26\u4fdd\u8b49\u60a8\u7684Minecraft\u662f\u6b63\u5f0f\u7248\u800c\u975e\u5feb\u7167\u7248,<br/>\u800c\u4e14\u4e0d\u61c9\u7576\u5c07\u4e0d\u5141\u8a31\u975e\u5b98\u65b9\u9014\u5f91\u50b3\u64ad\u7684Mod\u7d0d\u5165\u6574\u5408\u5305\u3002 </html>
modpack.name=\u61f6\u4eba\u5305\u540d\u7a31
modpack.not_a_valid_name=\u61f6\u4eba\u5305\u540d\u7a31\u4e0d\u80fd\u70ba\u7a7a
mods=Mod\u7ba1\u7406
mods.choose_mod=\u9009\u62e9\u6a21\u7ec4

81
common.gradle~ Executable file
View File

@@ -0,0 +1,81 @@
/*
* Hello Minecraft! Launcher.
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see {http://www.gnu.org/licenses/}.
*/
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'findbugs'
//sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories {
mavenCentral();
}
buildscript {
repositories {
mavenCentral();
}
}
dependencies {
// Adding dependencies here will add the dependencies to each subproject.
compile 'com.google.code.gson:gson:2.2.4' // Apache License 2.0
}
task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives sourcesJar
}
task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
sourceSets*.allSource*.srcDirs*.each { File srcDir ->
if (!srcDir.isDirectory()) {
println "Creating source folder: ${srcDir}"
srcDir.mkdirs()
}
}
}
task makeExecutable(dependsOn: jar) << {
ext {
jar.classifier = ''
makeExecutableinjar = jar.archivePath
jar.classifier = ''
makeExecutableoutjar = jar.archivePath
jar.classifier = ''
}
def loc = new File(project.buildDir, "libs/" + makeExecutableoutjar.getName().substring(0, makeExecutableoutjar.getName().length()-4)+".exe")
def fos = new FileOutputStream(loc)
def is = new FileInputStream(new File(project.buildDir, '../HMCLauncher.exe'))
int read
def bytes = new byte[8192]
while((read = is.read(bytes)) != -1)
fos.write(bytes, 0, read);
is.close()
is = new FileInputStream(makeExecutableinjar)
while((read = is.read(bytes)) != -1)
fos.write(bytes, 0, read);
is.close()
fos.close()
}