diff options
| author | 2011-07-20 17:45:11 -0700 | |
|---|---|---|
| committer | 2011-07-20 17:45:11 -0700 | |
| commit | 84be06e4ce0778fbf0c1ac72f94795ef8433439b (patch) | |
| tree | ea9b35882420896cfba281f17293bce74e564089 /tools/aapt/Main.cpp | |
| parent | a125c937de06b1cc43368743592f47513eb88b76 (diff) | |
| parent | ea9e6d24a458c06df6237fddd22b6165b2f92cb5 (diff) | |
resolved conflicts for merge of ea9e6d24 to honeycomb-plus-aosp
Change-Id: I8e047147a4d2c899b6654c03a5f32b04d929e602
Diffstat (limited to 'tools/aapt/Main.cpp')
| -rw-r--r-- | tools/aapt/Main.cpp | 21 | 
1 files changed, 20 insertions, 1 deletions
diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp index 9887268abd7e..5135787050f9 100644 --- a/tools/aapt/Main.cpp +++ b/tools/aapt/Main.cpp @@ -83,6 +83,9 @@ void usage(void)          " %s a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]\n"          "   Add specified files to Zip-compatible archive.\n\n", gProgName);      fprintf(stderr, +        " %s c[runch] [-v] -S resource-sources ... -C output-folder ...\n" +        "   Do PNG preprocessing and store the results in output folder.\n\n", gProgName); +    fprintf(stderr,          " %s v[ersion]\n"          "   Print program version.\n\n", gProgName);      fprintf(stderr, @@ -190,6 +193,7 @@ int handleCommand(Bundle* bundle)      case kCommandAdd:       return doAdd(bundle);      case kCommandRemove:    return doRemove(bundle);      case kCommandPackage:   return doPackage(bundle); +    case kCommandCrunch:    return doCrunch(bundle);      default:          fprintf(stderr, "%s: requested command not yet supported\n", gProgName);          return 1; @@ -227,6 +231,8 @@ int main(int argc, char* const argv[])          bundle.setCommand(kCommandRemove);      else if (argv[1][0] == 'p')          bundle.setCommand(kCommandPackage); +    else if (argv[1][0] == 'c') +        bundle.setCommand(kCommandCrunch);      else {          fprintf(stderr, "ERROR: Unknown command '%s'\n", argv[1]);          wantUsage = true; @@ -397,6 +403,17 @@ int main(int argc, char* const argv[])                  convertPath(argv[0]);                  bundle.addResourceSourceDir(argv[0]);                  break; +            case 'C': +                argc--; +                argv++; +                if (!argc) { +                    fprintf(stderr, "ERROR: No argument supplied for '-C' option\n"); +                    wantUsage = true; +                    goto bail; +                } +                convertPath(argv[0]); +                bundle.setCrunchedOutputDir(argv[0]); +                break;              case '0':                  argc--;                  argv++; @@ -523,7 +540,9 @@ int main(int argc, char* const argv[])                      bundle.setProduct(argv[0]);                  } else if (strcmp(cp, "-non-constant-id") == 0) {                      bundle.setNonConstantId(true); -                } else { +                } else if (strcmp(cp, "-no-crunch") == 0) { +                    bundle.setUseCrunchCache(true); +                }else {                      fprintf(stderr, "ERROR: Unknown option '-%s'\n", cp);                      wantUsage = true;                      goto bail;  |