Added build-clients.d script.
This commit is contained in:
parent
2fb608de08
commit
9b7908fd60
|
@ -1,5 +1,6 @@
|
||||||
.idea/
|
.idea/
|
||||||
target/
|
target/
|
||||||
|
client-builds/
|
||||||
|
|
||||||
# Ignore the ./config directory so that developers can put their config files
|
# Ignore the ./config directory so that developers can put their config files
|
||||||
# there for server and client apps.
|
# there for server and client apps.
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
#!/usr/bin/env dub
|
||||||
|
/+ dub.sdl:
|
||||||
|
dependency "dsh" version="~>1.6.1"
|
||||||
|
+/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds OS-dependent client application versions.
|
||||||
|
*/
|
||||||
|
module build_clients;
|
||||||
|
|
||||||
|
import dsh;
|
||||||
|
import std.array;
|
||||||
|
import std.algorithm;
|
||||||
|
import std.string;
|
||||||
|
import std.regex;
|
||||||
|
import std.path;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
string[] profiles = [
|
||||||
|
"linux-aarch64",
|
||||||
|
"linux-amd64",
|
||||||
|
"linux-arm",
|
||||||
|
"linux-arm32",
|
||||||
|
"macos-aarch64",
|
||||||
|
"macos-x86_64",
|
||||||
|
"windows-aarch64",
|
||||||
|
"windows-amd64",
|
||||||
|
"windows-x86"
|
||||||
|
];
|
||||||
|
string outDir = "client-builds";
|
||||||
|
removeIfExists(outDir);
|
||||||
|
mkdir(outDir);
|
||||||
|
foreach (profile; profiles) {
|
||||||
|
print("Building profile: %s", profile);
|
||||||
|
string cmd = format!"mvn -B -Plwjgl-natives-%s --projects client --also-make clean package"(profile);
|
||||||
|
new ProcessBuilder()
|
||||||
|
.outputTo(buildPath(outDir, "output-" ~ profile ~ ".txt"))
|
||||||
|
.run(cmd);
|
||||||
|
string jarFile = findFile("client/target", ".+-jar-with-dependencies\\.jar");
|
||||||
|
string finalName = replaceFirst(baseName(jarFile), regex("jar-with-dependencies"), profile);
|
||||||
|
copy(jarFile, outDir ~ "/" ~ finalName);
|
||||||
|
}
|
||||||
|
}
|
|
@ -144,7 +144,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>nl.andrewl</groupId>
|
<groupId>nl.andrewl</groupId>
|
||||||
<artifactId>aos2-core</artifactId>
|
<artifactId>aos2-core</artifactId>
|
||||||
<version>${parent.version}</version>
|
<version>${project.parent.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.javagl</groupId>
|
<groupId>de.javagl</groupId>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>nl.andrewl</groupId>
|
<groupId>nl.andrewl</groupId>
|
||||||
<artifactId>aos2-core</artifactId>
|
<artifactId>aos2-core</artifactId>
|
||||||
<version>${parent.version}</version>
|
<version>${project.parent.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>info.picocli</groupId>
|
<groupId>info.picocli</groupId>
|
||||||
|
|
Loading…
Reference in New Issue