mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FEATURE] SimpleEXELauncherBinary
This commit is contained in:
parent
12162de22f
commit
3bf744debe
1 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue