Ship TeamSpeak's icon packs with both clients
Default, Default Colored 2014 and Default Mono 2014 now come inside the desktop JAR and the APK, so the default pack is there without a TeamSpeak 3 install; before, a desktop without one had no icons at all. As with the sound packs, the builds take them from the TeamSpeak 3 client next to the repository (ts3.client.dir to point elsewhere) and ship none without it. Core reads them from the classpath in memory; a pack of the same name found on disk, in an install or imported, still comes first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,9 +2,23 @@ plugins {
|
||||
`java-library`
|
||||
}
|
||||
|
||||
val ts3ClientDir: String = providers.gradleProperty("ts3.client.dir")
|
||||
.orElse(providers.environmentVariable("TS3_CLIENT_DIR"))
|
||||
.getOrElse(rootDir.resolve("../TeamSpeak3-Client-linux_amd64").path)
|
||||
|
||||
/** TeamSpeak's own icon packs, proprietary and so taken from an install, as the desktop's build does. */
|
||||
val teamspeakIconPacks = tasks.register<Sync>("teamspeakIconPacks") {
|
||||
into(layout.buildDirectory.dir("generated/iconPacks"))
|
||||
from(File(ts3ClientDir, "gfx")) {
|
||||
include("default.zip", "default_colored_2014.zip", "default_mono_2014.zip")
|
||||
into("gfx/teamspeak")
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceSets["main"].java.setSrcDirs(listOf(rootDir.resolve("../ts3-client/core/src/main/java")))
|
||||
sourceSets["main"].resources.setSrcDirs(listOf(rootDir.resolve("../ts3-client/core/src/main/resources")))
|
||||
sourceSets["main"].resources.srcDir(teamspeakIconPacks)
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
|
||||
Reference in New Issue
Block a user