X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/af945cf38e6121bb5066e4591493f78d09cba4e3..f347b212f43c46efa93fc5d5966d38c4763337ee:/Main.cpp diff --git a/Main.cpp b/Main.cpp index dd98c85..f457cc8 100644 --- a/Main.cpp +++ b/Main.cpp @@ -62,6 +62,7 @@ void usage(void) " [--rename-manifest-package PACKAGE] \\\n" " [--rename-instrumentation-target-package PACKAGE] \\\n" " [--utf16] [--auto-add-overlay] \\\n" + " [--max-res-version VAL] \\\n" " [-I base-package [-I base-package ...]] \\\n" " [-A asset-source-dir] [-G class-list-file] [-P public-definitions-file] \\\n" " [-S resource-sources [-S resource-sources ...]] " @@ -128,6 +129,8 @@ void usage(void) " higher, the default encoding for resources will be in UTF-8.\n" " --target-sdk-version\n" " inserts android:targetSdkVersion in to manifest.\n" + " --max-res-version\n" + " ignores versioned resource directories above the given value.\n" " --values\n" " when used with \"dump resources\" also includes resource values.\n" " --version-code\n" @@ -416,6 +419,15 @@ int main(int argc, char* const argv[]) goto bail; } bundle.setMaxSdkVersion(argv[0]); + } else if (strcmp(cp, "-max-res-version") == 0) { + argc--; + argv++; + if (!argc) { + fprintf(stderr, "ERROR: No argument supplied for '--max-res-version' option\n"); + wantUsage = true; + goto bail; + } + bundle.setMaxResVersion(argv[0]); } else if (strcmp(cp, "-version-code") == 0) { argc--; argv++; @@ -446,8 +458,7 @@ int main(int argc, char* const argv[]) } bundle.setCustomPackage(argv[0]); } else if (strcmp(cp, "-utf16") == 0) { - bundle.setEncodingSpecified(true); - bundle.setUTF8(false); + bundle.setWantUTF16(true); } else if (strcmp(cp, "-rename-manifest-package") == 0) { argc--; argv++;