From e6a92ea0aa40809c2daab92db207d3c9dd6c640b Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 12 Apr 2020 14:38:21 +0100 Subject: [PATCH] Switch to FHS-style layout Signed-off-by: Graham --- README.md | 14 +++++++------- all/build.gradle.kts | 6 +++--- .../main/java/dev/openrs2/bundler/BundleCommand.kt | 2 +- .../main/java/dev/openrs2/crypto/RsaKeyProvider.kt | 4 ++-- .../dev/openrs2/decompiler/DecompileCommand.kt | 2 +- .../java/dev/openrs2/deob/DeobfuscateCommand.kt | 2 +- {conf => etc}/.gitignore | 0 {data => share}/.gitignore | 0 {docs => share/doc}/client-parameters.md | 0 {docs => share/doc}/faq.md | 0 10 files changed, 15 insertions(+), 15 deletions(-) rename {conf => etc}/.gitignore (100%) rename {data => share}/.gitignore (100%) rename {docs => share/doc}/client-parameters.md (100%) rename {docs => share/doc}/faq.md (100%) diff --git a/README.md b/README.md index 5ab2360e03..576ef58b22 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ beneath the root of the repository), in the following structure: ``` nonfree -└── code +└── lib    ├── jaggl.pack200    ├── loader_gl.jar    ├── loader.jar @@ -37,12 +37,12 @@ nonfree The SHA-256 checksums of the correct files are: ``` -d39578f4a88a376bcb2571f05da1939a14a80d8c4ed89a4eb172d9e525795fe2 nonfree/code/jaggl.pack200 -31182683ba04dc0ad45859161c13f66424b10deb0b2df10aa58b48bba57402db nonfree/code/loader_gl.jar -ccdfaa86be07452ddd69f869ade86ea900dbb916fd853db16602edf2eb54211b nonfree/code/loader.jar -4a5032ea8079d2154617ae1f21dfcc46a10e023c8ba23a4827d5e25e75c73045 nonfree/code/runescape_gl.pack200 -0ab28a95e7c5993860ff439ebb331c0df02ad40aa1f544777ed91b46d30d3d24 nonfree/code/runescape.jar -7c090e07f8d754d09804ff6e9733ef3ba227893b6b639436db90977b39122590 nonfree/code/unpackclass.pack +d39578f4a88a376bcb2571f05da1939a14a80d8c4ed89a4eb172d9e525795fe2 nonfree/lib/jaggl.pack200 +31182683ba04dc0ad45859161c13f66424b10deb0b2df10aa58b48bba57402db nonfree/lib/loader_gl.jar +ccdfaa86be07452ddd69f869ade86ea900dbb916fd853db16602edf2eb54211b nonfree/lib/loader.jar +4a5032ea8079d2154617ae1f21dfcc46a10e023c8ba23a4827d5e25e75c73045 nonfree/lib/runescape_gl.pack200 +0ab28a95e7c5993860ff439ebb331c0df02ad40aa1f544777ed91b46d30d3d24 nonfree/lib/runescape.jar +7c090e07f8d754d09804ff6e9733ef3ba227893b6b639436db90977b39122590 nonfree/lib/unpackclass.pack ``` The `nonfree` directory is included in the `.gitignore` file to prevent any diff --git a/all/build.gradle.kts b/all/build.gradle.kts index 0b4d015836..30995db686 100644 --- a/all/build.gradle.kts +++ b/all/build.gradle.kts @@ -50,13 +50,13 @@ distributions { from("${rootProject.projectDir}/DCO") from("${rootProject.projectDir}/LICENSE") from("${rootProject.projectDir}/README.md") - from("${rootProject.projectDir}/docs") { + from("${rootProject.projectDir}/share/doc") { include("*.md") - into("docs") + into("share/doc") } from("$buildDir/reports/dependency-license/THIRD-PARTY-NOTICES.txt") { rename { "third-party-licenses.txt" } - into("docs") + into("share/doc") } } } diff --git a/bundler/src/main/java/dev/openrs2/bundler/BundleCommand.kt b/bundler/src/main/java/dev/openrs2/bundler/BundleCommand.kt index b7b071c459..5d7a74f84e 100644 --- a/bundler/src/main/java/dev/openrs2/bundler/BundleCommand.kt +++ b/bundler/src/main/java/dev/openrs2/bundler/BundleCommand.kt @@ -10,6 +10,6 @@ class BundleCommand : CliktCommand(name = "bundle") { override fun run() { val injector = Guice.createInjector(BundlerModule()) val bundler = injector.getInstance(Bundler::class.java) - bundler.run(Paths.get("nonfree/code"), Paths.get("nonfree/code/bundle"), Paths.get("conf/loader.p12")) + bundler.run(Paths.get("nonfree/lib"), Paths.get("nonfree/var/cache/bundle"), Paths.get("etc/loader.p12")) } } diff --git a/crypto/src/main/java/dev/openrs2/crypto/RsaKeyProvider.kt b/crypto/src/main/java/dev/openrs2/crypto/RsaKeyProvider.kt index e8594d754e..6c592abb36 100644 --- a/crypto/src/main/java/dev/openrs2/crypto/RsaKeyProvider.kt +++ b/crypto/src/main/java/dev/openrs2/crypto/RsaKeyProvider.kt @@ -18,7 +18,7 @@ class RsaKeyProvider : Provider { } companion object { - private val PUBLIC_PATH = Paths.get("conf/public.key") - private val PRIVATE_PATH = Paths.get("conf/private.key") + private val PUBLIC_PATH = Paths.get("etc/public.key") + private val PRIVATE_PATH = Paths.get("etc/private.key") } } diff --git a/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt b/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt index db0c2587ce..a55b9044f6 100644 --- a/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt +++ b/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt @@ -8,7 +8,7 @@ fun main(args: Array) = DecompileCommand().main(args) class DecompileCommand : CliktCommand(name = "decompile") { override fun run() { - val deobOutput = Paths.get("nonfree/code/deob") + val deobOutput = Paths.get("nonfree/var/cache/deob") val sources = listOf( deobOutput.resolve("runescape_gl.jar"), deobOutput.resolve("jaggl.jar"), diff --git a/deob/src/main/java/dev/openrs2/deob/DeobfuscateCommand.kt b/deob/src/main/java/dev/openrs2/deob/DeobfuscateCommand.kt index 5c7d968d64..e8e38c0d61 100644 --- a/deob/src/main/java/dev/openrs2/deob/DeobfuscateCommand.kt +++ b/deob/src/main/java/dev/openrs2/deob/DeobfuscateCommand.kt @@ -7,7 +7,7 @@ fun main(args: Array) = DeobfuscateCommand().main(args) class DeobfuscateCommand : CliktCommand(name = "deob") { override fun run() { - val deobfuscator = Deobfuscator(Paths.get("nonfree/code"), Paths.get("nonfree/code/deob")) + val deobfuscator = Deobfuscator(Paths.get("nonfree/lib"), Paths.get("nonfree/var/cache/deob")) deobfuscator.run() } } diff --git a/conf/.gitignore b/etc/.gitignore similarity index 100% rename from conf/.gitignore rename to etc/.gitignore diff --git a/data/.gitignore b/share/.gitignore similarity index 100% rename from data/.gitignore rename to share/.gitignore diff --git a/docs/client-parameters.md b/share/doc/client-parameters.md similarity index 100% rename from docs/client-parameters.md rename to share/doc/client-parameters.md diff --git a/docs/faq.md b/share/doc/faq.md similarity index 100% rename from docs/faq.md rename to share/doc/faq.md