mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
Final fixes.
This commit is contained in:
parent
329f38b1cc
commit
a032e1546a
3 changed files with 6 additions and 4 deletions
|
@ -590,8 +590,8 @@ private void generateConfigIfNotExists() throws IOException {
|
|||
newConfig.threadCount = JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() >= 4 ? JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() / 2 : JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors();
|
||||
|
||||
newConfig.enabledProGuard = true;
|
||||
newConfig.stripLineNumbers = false;
|
||||
newConfig.deleteTempFiles = false;
|
||||
newConfig.stripLineNumbers = true;
|
||||
newConfig.deleteTempFiles = true;
|
||||
// Set server address
|
||||
LogHelper.println("LaunchServer address: ");
|
||||
newConfig.setAddress(commandHandler.readLine());
|
||||
|
|
|
@ -78,7 +78,7 @@ public void build() throws IOException {
|
|||
}
|
||||
|
||||
public String nextName(String taskName) {
|
||||
return String.format("Launcher-%s-%d.jar", server.config.projectName, taskName, count.getAndIncrement());
|
||||
return String.format("Launcher-%s-%d.jar", taskName, count.getAndIncrement());
|
||||
}
|
||||
|
||||
public Path nextPath(String taskName) {
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
import ru.gravit.launchserver.LaunchServer;
|
||||
import ru.gravit.utils.helper.IOHelper;
|
||||
import ru.gravit.utils.helper.LogHelper;
|
||||
|
||||
public class AttachJarsTask implements LauncherBuildTask {
|
||||
private final LaunchServer srv;
|
||||
|
@ -51,11 +52,12 @@ public Path process(Path inputFile) throws IOException {
|
|||
|
||||
private void attach(ZipOutputStream output, List<Path> lst) throws IOException {
|
||||
for (Path p : lst) {
|
||||
LogHelper.debug("Attaching: " + p);
|
||||
try (ZipInputStream input = IOHelper.newZipInput(p)) {
|
||||
ZipEntry e = input.getNextEntry();
|
||||
while (e != null) {
|
||||
String filename = e.getName();
|
||||
if (exclusions.stream().noneMatch(filename::startsWith) && !srv.buildHookManager.isContainsBlacklist(filename)) {
|
||||
if (exclusions.stream().noneMatch(filename::startsWith) && !srv.buildHookManager.isContainsBlacklist(filename) && !e.isDirectory()) {
|
||||
output.putNextEntry(IOHelper.newZipEntry(e));
|
||||
IOHelper.transfer(input, output);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue