Launcher/LaunchServer/src/main/java/pro/gravit/launchserver/binary/SimpleEXELauncherBinary.java

26 lines
785 B
Java
Raw Normal View History

2019-07-12 16:33:25 +03:00
package pro.gravit.launchserver.binary;
import pro.gravit.launchserver.LaunchServer;
import pro.gravit.utils.helper.IOHelper;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Path;
public class SimpleEXELauncherBinary extends LauncherBinary {
public Path exeTemplate;
protected SimpleEXELauncherBinary(LaunchServer server) {
super(server, LauncherBinary.resolve(server, ".exe"));
exeTemplate = server.dir.resolve("SimpleTemplate.exe");
}
@Override
public void build() throws IOException {
try(OutputStream output = IOHelper.newOutput(syncBinaryFile))
{
IOHelper.transfer(exeTemplate, output);
IOHelper.transfer(server.launcherBinary.syncBinaryFile, output);
}
}
}