2018-09-17 10:07:32 +03:00
|
|
|
package ru.gravit.launchserver.binary;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.nio.file.Files;
|
|
|
|
|
2018-12-06 05:29:34 +03:00
|
|
|
import ru.gravit.launchserver.LaunchServer;
|
2018-09-17 10:20:34 +03:00
|
|
|
import ru.gravit.utils.helper.IOHelper;
|
|
|
|
import ru.gravit.utils.helper.LogHelper;
|
2018-09-17 10:07:32 +03:00
|
|
|
|
|
|
|
public class EXELauncherBinary extends LauncherBinary {
|
|
|
|
|
2018-09-22 17:33:00 +03:00
|
|
|
public EXELauncherBinary(LaunchServer server) {
|
|
|
|
super(server, server.dir.resolve(server.config.binaryName + ".exe"));
|
|
|
|
}
|
2018-09-17 10:07:32 +03:00
|
|
|
|
2018-09-22 17:33:00 +03:00
|
|
|
@Override
|
|
|
|
public void build() throws IOException {
|
2018-09-17 10:07:32 +03:00
|
|
|
if (IOHelper.isFile(binaryFile)) {
|
|
|
|
LogHelper.subWarning("Deleting obsolete launcher EXE binary file");
|
|
|
|
Files.delete(binaryFile);
|
|
|
|
}
|
2018-09-22 17:33:00 +03:00
|
|
|
}
|
2018-09-17 10:07:32 +03:00
|
|
|
|
|
|
|
}
|