add: missing integrations parameter

This commit is contained in:
oSumAtrIX 2022-04-11 04:08:20 +02:00
parent 4624384f28
commit 967fac48d0
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -20,11 +20,13 @@ class Main {
inApk: String,
inSignatures: String,
inPatches: String,
integrations: String,
inOutput: String,
) {
val apk = Preconditions.isFile(inApk)
val signatures = Preconditions.isFile(inSignatures)
val patchesFile = Preconditions.isFile(inPatches)
val integrationsFile = Preconditions.isFile(integrations)
val output = Preconditions.isDirectory(inOutput)
val patcher = Patcher(
@ -34,6 +36,8 @@ class Main {
.toTypedArray()
)
patcher.addFiles(integrationsFile)
PatchLoader.injectPatches(patchesFile)
val patches = Patches.loadPatches()
patcher.addPatches(*patches.map { it() }.toTypedArray())
@ -72,19 +76,25 @@ class Main {
shortName = "p",
description = "Patches JAR file"
).required()
val integrations by parser.option(
ArgType.String,
fullName = "integrations",
shortName = "i",
description = "Integrations APK file"
).required()
val output by parser.option(
ArgType.String,
fullName = "output",
shortName = "o",
description = "Output directory"
).required()
// TODO: merge dex file
parser.parse(args)
runCLI(
apk,
signatures,
patches,
integrations,
output,
)
}