2019-06-02 05:03:08 +03:00
|
|
|
package pro.gravit.launchserver.binary;
|
2018-09-17 10:07:32 +03:00
|
|
|
|
2019-06-03 10:58:10 +03:00
|
|
|
import java.io.IOException;
|
|
|
|
import java.nio.file.Files;
|
|
|
|
|
2019-06-02 05:03:08 +03:00
|
|
|
import pro.gravit.launchserver.LaunchServer;
|
|
|
|
import pro.gravit.utils.helper.IOHelper;
|
|
|
|
import pro.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) {
|
2019-04-28 15:06:12 +03:00
|
|
|
super(server, LauncherBinary.resolve(server, ".exe"));
|
2018-09-22 17:33:00 +03:00
|
|
|
}
|
2018-09-17 10:07:32 +03:00
|
|
|
|
2018-09-22 17:33:00 +03:00
|
|
|
@Override
|
|
|
|
public void build() throws IOException {
|
2019-01-05 18:15:19 +03:00
|
|
|
if (IOHelper.isFile(syncBinaryFile)) {
|
2018-09-17 10:07:32 +03:00
|
|
|
LogHelper.subWarning("Deleting obsolete launcher EXE binary file");
|
2019-01-05 18:15:19 +03:00
|
|
|
Files.delete(syncBinaryFile);
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|
2018-09-22 17:33:00 +03:00
|
|
|
}
|
2018-09-17 10:07:32 +03:00
|
|
|
|
|
|
|
}
|