]> git.saurik.com Git - android/aapt.git/blobdiff - Main.cpp
am b4f41119: am a1d08886: Merge "Only output proguard keep for nonempty attribute...
[android/aapt.git] / Main.cpp
index 0b51ad8eb9c8274f3d0c7c94d8fe37ea7efafaf3..1e6b52ef1c906c3cae8f20a46b6c16fa2dec168d 100644 (file)
--- a/Main.cpp
+++ b/Main.cpp
@@ -59,7 +59,7 @@ void usage(void)
         "        [-0 extension [-0 extension ...]] [-g tolerance] [-j jarfile] \\\n"
         "        [--min-sdk-version VAL] [--target-sdk-version VAL] \\\n"
         "        [--max-sdk-version VAL] [--app-version VAL] \\\n"
-        "        [--app-version-name TEXT] [--custom-package VAL] \\\n"
+        "        [--app-version-name TEXT] [--custom-package VAL] [--utf16] \\\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 ...]] "
@@ -122,7 +122,8 @@ void usage(void)
         "       be stored compressed in the .apk.  An empty string means to not\n"
         "       compress any files at all.\n"
         "   --min-sdk-version\n"
-        "       inserts android:minSdkVersion in to manifest.\n"
+        "       inserts android:minSdkVersion in to manifest.  If the version is 7 or\n"
+        "       higher, the default encoding for resources will be in UTF-8.\n"
         "   --target-sdk-version\n"
         "       inserts android:targetSdkVersion in to manifest.\n"
         "   --max-sdk-version\n"
@@ -134,7 +135,10 @@ void usage(void)
         "   --version-name\n"
         "       inserts android:versionName in to manifest.\n"
         "   --custom-package\n"
-        "       generates R.java into a different package.\n");
+        "       generates R.java into a different package.\n"
+        "   --utf16\n"
+        "       changes default encoding for resources to UTF-16.  Only useful when API\n"
+        "       level is set to 7 or higher where the default encoding is UTF-8.\n");
 }
 
 /*
@@ -429,6 +433,9 @@ int main(int argc, char* const argv[])
                         goto bail;
                     }
                     bundle.setCustomPackage(argv[0]);
+                } else if (strcmp(cp, "-utf16") == 0) {
+                    bundle.setEncodingSpecified(true);
+                    bundle.setUTF8(false);
                 } else {
                     fprintf(stderr, "ERROR: Unknown option '-%s'\n", cp);
                     wantUsage = true;