mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 12:26:16 -04:00
Adds some suggested files to remove
This commit is contained in:
parent
a5504a4b74
commit
dfc6e91321
@ -202,8 +202,8 @@ public final class ModpackManager {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final List<String> MODPACK_BLACK_LIST = Arrays.asList(new String[] { "usernamecache.json", "asm", "logs", "backups", "versions", "assets", "usercache.json", "libraries", "crash-reports", "launcher_profiles.json", "NVIDIA", "AMD", "TCNodeTracker", "screenshots", "natives", "native", "$native", "pack.json", "launcher.jar", "launcher.pack.lzma", "hmclmc.log" });
|
public static final List<String> MODPACK_BLACK_LIST = Arrays.asList(new String[] { "usernamecache.json", "asm", "logs", "backups", "versions", "assets", "usercache.json", "libraries", "crash-reports", "launcher_profiles.json", "NVIDIA", "AMD", "TCNodeTracker", "screenshots", "natives", "native", "$native", "pack.json", "launcher.jar", "minetweaker.log", "launcher.pack.lzma", "hmclmc.log" });
|
||||||
public static final List<String> MODPACK_SUGGESTED_BLACK_LIST = Arrays.asList(new String[] { "saves", "servers.dat", "options.txt", "optionsshaders.txt", "mods/VoxelMods" });
|
public static final List<String> MODPACK_SUGGESTED_BLACK_LIST = Arrays.asList(new String[] { "fonts", "saves", "servers.dat", "options.txt", "optionsof.txt", "journeymap", "optionsshaders.txt", "mods/VoxelMods" });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* < String, Boolean, Boolean >: Folder/File name, Is Directory,
|
* < String, Boolean, Boolean >: Folder/File name, Is Directory,
|
||||||
|
@ -178,8 +178,7 @@ public class ModpackWizard extends WizardBranchController {
|
|||||||
throw new IllegalArgumentException(id);
|
throw new IllegalArgumentException(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -100,6 +100,8 @@ public class ZipEngine {
|
|||||||
zos.putNextEntry(new ZipEntry(pathName));
|
zos.putNextEntry(new ZipEntry(pathName));
|
||||||
putDirectoryImpl(file, basePath, pathNameCallback);
|
putDirectoryImpl(file, basePath, pathNameCallback);
|
||||||
} else {
|
} else {
|
||||||
|
if (".DS_Store".equals(file.getName())) // For mac computers.
|
||||||
|
continue;
|
||||||
pathName = file.getPath().substring(basePath.length() + 1);
|
pathName = file.getPath().substring(basePath.length() + 1);
|
||||||
if (pathNameCallback != null)
|
if (pathNameCallback != null)
|
||||||
pathName = pathNameCallback.apply(pathName, false);
|
pathName = pathNameCallback.apply(pathName, false);
|
||||||
|
@ -64,15 +64,17 @@ public class NavProgress implements ResultProgressHandle {
|
|||||||
|
|
||||||
public void setProgress(final int currentStep, final int totalSteps) {
|
public void setProgress(final int currentStep, final int totalSteps) {
|
||||||
invoke(() -> {
|
invoke(() -> {
|
||||||
if (totalSteps == -1)
|
if (totalSteps == -1) {
|
||||||
|
if (!progressBar.isIndeterminate())
|
||||||
progressBar.setIndeterminate(true);
|
progressBar.setIndeterminate(true);
|
||||||
else {
|
} else {
|
||||||
if (currentStep > totalSteps || currentStep < 0) {
|
if (currentStep > totalSteps || currentStep < 0) {
|
||||||
if (currentStep == -1 && totalSteps == -1)
|
if (currentStep == -1 && totalSteps == -1)
|
||||||
return;
|
return;
|
||||||
throw new IllegalArgumentException("Bad step values: "
|
throw new IllegalArgumentException("Bad step values: "
|
||||||
+ currentStep + " out of " + totalSteps);
|
+ currentStep + " out of " + totalSteps);
|
||||||
}
|
}
|
||||||
|
if (progressBar.isIndeterminate())
|
||||||
progressBar.setIndeterminate(false);
|
progressBar.setIndeterminate(false);
|
||||||
progressBar.setMaximum(totalSteps);
|
progressBar.setMaximum(totalSteps);
|
||||||
progressBar.setValue(currentStep);
|
progressBar.setValue(currentStep);
|
||||||
@ -83,7 +85,7 @@ public class NavProgress implements ResultProgressHandle {
|
|||||||
public void setBusy(final String description) {
|
public void setBusy(final String description) {
|
||||||
invoke(() -> {
|
invoke(() -> {
|
||||||
lbl.setText(description == null ? " " : description);
|
lbl.setText(description == null ? " " : description);
|
||||||
|
if (!progressBar.isIndeterminate())
|
||||||
progressBar.setIndeterminate(true);
|
progressBar.setIndeterminate(true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ import javax.swing.JTextArea;
|
|||||||
* SimpleWizard created for it, acting as the WizardController for
|
* SimpleWizard created for it, acting as the WizardController for
|
||||||
* calls to WizardPanelProvider.createPanel().
|
* calls to WizardPanelProvider.createPanel().
|
||||||
*/
|
*/
|
||||||
final class SimpleWizardInfo implements WizardControllerImplementation {
|
public final class SimpleWizardInfo implements WizardControllerImplementation {
|
||||||
|
|
||||||
private WeakReference wizard = null;
|
private WeakReference wizard = null;
|
||||||
private final String[] descriptions;
|
private final String[] descriptions;
|
||||||
@ -318,4 +318,8 @@ final class SimpleWizardInfo implements WizardControllerImplementation {
|
|||||||
boolean cancel(Map settings) {
|
boolean cancel(Map settings) {
|
||||||
return provider.cancel(settings);
|
return provider.cancel(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WizardPanelProvider getProvider() {
|
||||||
|
return provider;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,15 +13,17 @@ enclosed by brackets [] replaced by your own identifying information:
|
|||||||
*
|
*
|
||||||
* Created on March 5, 2005, 6:33 PM
|
* Created on March 5, 2005, 6:33 PM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jackhuang.hellominecraft.util.ui.wizard.spi;
|
package org.jackhuang.hellominecraft.util.ui.wizard.spi;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend this class to create wizards which have branch points in them -
|
* Extend this class to create wizards which have branch points in them -
|
||||||
* either override <code>getWizardForStep</code> to return one or another a wizard which
|
* either override <code>getWizardForStep</code> to return one or another a
|
||||||
|
* wizard which
|
||||||
* represents the subsequent steps after a decision point, or override
|
* represents the subsequent steps after a decision point, or override
|
||||||
* <code>getPanelProviderForStep</code> to provide instances of <code>WizardPanelProvider</code>
|
* <code>getPanelProviderForStep</code> to provide instances of
|
||||||
|
* <code>WizardPanelProvider</code>
|
||||||
* if there are no subsequent branch points and the continuation is a
|
* if there are no subsequent branch points and the continuation is a
|
||||||
* simple wizard.
|
* simple wizard.
|
||||||
* <p>
|
* <p>
|
||||||
@ -39,7 +41,8 @@ import java.util.Map;
|
|||||||
* another <code>WizardBranchController</code> and return the result of its
|
* another <code>WizardBranchController</code> and return the result of its
|
||||||
* <code>createWizard</code> method.
|
* <code>createWizard</code> method.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that it is important to cache the instances of <code>WizardPanelProvider</code>
|
* Note that it is important to cache the instances of
|
||||||
|
* <code>WizardPanelProvider</code>
|
||||||
* or <code>Wizard</code> which are returned here - this class's methods may
|
* or <code>Wizard</code> which are returned here - this class's methods may
|
||||||
* be called frequently to determine if the sequence of steps (the next wizard)
|
* be called frequently to determine if the sequence of steps (the next wizard)
|
||||||
* have changed.
|
* have changed.
|
||||||
@ -47,6 +50,7 @@ import java.util.Map;
|
|||||||
* @author Tim Boudreau
|
* @author Tim Boudreau
|
||||||
*/
|
*/
|
||||||
public abstract class WizardBranchController {
|
public abstract class WizardBranchController {
|
||||||
|
|
||||||
private final SimpleWizardInfo base;
|
private final SimpleWizardInfo base;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,6 +69,7 @@ public abstract class WizardBranchController {
|
|||||||
/**
|
/**
|
||||||
* Create a new WizardBranchController using the passed WizardPage
|
* Create a new WizardBranchController using the passed WizardPage
|
||||||
* instances as the initial pages of the wizard.
|
* instances as the initial pages of the wizard.
|
||||||
|
*
|
||||||
* @param pages An array of WizardPage instances
|
* @param pages An array of WizardPage instances
|
||||||
*/
|
*/
|
||||||
protected WizardBranchController(WizardPage[] pages) {
|
protected WizardBranchController(WizardPage[] pages) {
|
||||||
@ -75,17 +80,21 @@ public abstract class WizardBranchController {
|
|||||||
* Create a new WizardBranchController using the passed WizardPage
|
* Create a new WizardBranchController using the passed WizardPage
|
||||||
* as the initial page of the wizard. The initial page should
|
* as the initial page of the wizard. The initial page should
|
||||||
* determine the subsequent steps of the wizard.
|
* determine the subsequent steps of the wizard.
|
||||||
|
*
|
||||||
* @param onlyPage An instance of WizardPage
|
* @param onlyPage An instance of WizardPage
|
||||||
*/
|
*/
|
||||||
protected WizardBranchController(WizardPage onlyPage) {
|
protected WizardBranchController(WizardPage onlyPage) {
|
||||||
this(WizardPage.createWizardPanelProvider(onlyPage));
|
this(WizardPage.createWizardPanelProvider(onlyPage));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new WizardBranchController, using the passed <code>SimpleWizardInfo</code>
|
* Create a new WizardBranchController, using the passed
|
||||||
|
* <code>SimpleWizardInfo</code>
|
||||||
* for the initial panes of the wizard.
|
* for the initial panes of the wizard.
|
||||||
*/
|
*/
|
||||||
WizardBranchController(SimpleWizardInfo base) {
|
WizardBranchController(SimpleWizardInfo base) {
|
||||||
if (base == null) throw new NullPointerException ("No base");
|
if (base == null)
|
||||||
|
throw new NullPointerException("No base");
|
||||||
this.base = base;
|
this.base = base;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +103,8 @@ public abstract class WizardBranchController {
|
|||||||
* The UI for the current step should have put sufficient data into the
|
* The UI for the current step should have put sufficient data into the
|
||||||
* settings map to decide what to return; return null if not.
|
* settings map to decide what to return; return null if not.
|
||||||
* <p>
|
* <p>
|
||||||
* The default implementation delegates to <code>getPanelProviderForStep()</code>
|
* The default implementation delegates to
|
||||||
|
* <code>getPanelProviderForStep()</code>
|
||||||
* and returns a <code>Wizard</code> representing the result of that
|
* and returns a <code>Wizard</code> representing the result of that
|
||||||
* call.
|
* call.
|
||||||
* <p>
|
* <p>
|
||||||
@ -122,7 +132,8 @@ public abstract class WizardBranchController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override this method to return a <code>WizardPanelProvider</code> representing the
|
* Override this method to return a <code>WizardPanelProvider</code>
|
||||||
|
* representing the
|
||||||
* steps from here to the final step of the wizard, varying the returned
|
* steps from here to the final step of the wizard, varying the returned
|
||||||
* object based on the contents of the map and the step in question.
|
* object based on the contents of the map and the step in question.
|
||||||
* The default implementation of this method throws an <code>Error</code> -
|
* The default implementation of this method throws an <code>Error</code> -
|
||||||
@ -139,8 +150,8 @@ public abstract class WizardBranchController {
|
|||||||
* will have written content into
|
* will have written content into
|
||||||
*/
|
*/
|
||||||
protected WizardPanelProvider getPanelProviderForStep(String step, Map settings) {
|
protected WizardPanelProvider getPanelProviderForStep(String step, Map settings) {
|
||||||
throw new Error ("Override either createInfoForStep or " +
|
throw new Error("Override either createInfoForStep or "
|
||||||
"createWizardForStep");
|
+ "createWizardForStep");
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleWizardInfo getBase() {
|
SimpleWizardInfo getBase() {
|
||||||
@ -149,6 +160,7 @@ public abstract class WizardBranchController {
|
|||||||
|
|
||||||
private WizardImplementation wizard = null;
|
private WizardImplementation wizard = null;
|
||||||
private Wizard real = null;
|
private Wizard real = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a Wizard to represent this branch controller. The resulting
|
* Create a Wizard to represent this branch controller. The resulting
|
||||||
* Wizard instance is cached; subsequent calls to this method will return
|
* Wizard instance is cached; subsequent calls to this method will return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user