Loading tools/aapt/Bundle.h +8 −5 Original line number Diff line number Diff line Loading @@ -80,6 +80,8 @@ public: void setValues(bool val) { mValues = val; } int getCompressionMethod(void) const { return mCompressionMethod; } void setCompressionMethod(int val) { mCompressionMethod = val; } bool getJunkPath(void) const { return mJunkPath; } void setJunkPath(bool val) { mJunkPath = val; } const char* getOutputAPKFile() const { return mOutputAPKFile; } void setOutputAPKFile(const char* val) { mOutputAPKFile = val; } Loading Loading @@ -161,6 +163,7 @@ private: bool mPseudolocalize; bool mValues; int mCompressionMethod; bool mJunkPath; const char* mOutputAPKFile; const char* mAssetSourceDir; const char* mProguardFile; Loading tools/aapt/Command.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -996,10 +996,17 @@ int doAdd(Bundle* bundle) if (strcasecmp(String8(fileName).getPathExtension().string(), ".gz") == 0) { printf(" '%s'... (from gzip)\n", fileName); result = zip->addGzip(fileName, String8(fileName).getBasePath().string(), NULL); } else { if (bundle->getJunkPath()) { String8 storageName = String8(fileName).getPathLeaf(); printf(" '%s' as '%s'...\n", fileName, storageName.string()); result = zip->add(fileName, storageName.string(), bundle->getCompressionMethod(), NULL); } else { printf(" '%s'...\n", fileName); result = zip->add(fileName, bundle->getCompressionMethod(), NULL); } } if (result != NO_ERROR) { fprintf(stderr, "Unable to add '%s' to '%s'", bundle->getFileSpecEntry(i), zipFileName); if (result == NAME_NOT_FOUND) Loading tools/aapt/Main.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ void usage(void) " -f force overwrite of existing files\n" " -g specify a pixel tolerance to force images to grayscale, default 0\n" " -j specify a jar or zip file containing classes to include\n" " -k junk path of file(s) added\n" " -m make package directories under location specified by -J\n" #if 0 " -p pseudolocalize the default configuration\n" Loading Loading @@ -236,6 +237,9 @@ int main(int argc, char* const argv[]) bundle.setGrayscaleTolerance(tolerance); printf("%s: Images with deviation <= %d will be forced to grayscale.\n", prog, tolerance); break; case 'k': bundle.setJunkPath(true); break; case 'm': bundle.setMakePackageDirs(true); break; Loading Loading
tools/aapt/Bundle.h +8 −5 Original line number Diff line number Diff line Loading @@ -80,6 +80,8 @@ public: void setValues(bool val) { mValues = val; } int getCompressionMethod(void) const { return mCompressionMethod; } void setCompressionMethod(int val) { mCompressionMethod = val; } bool getJunkPath(void) const { return mJunkPath; } void setJunkPath(bool val) { mJunkPath = val; } const char* getOutputAPKFile() const { return mOutputAPKFile; } void setOutputAPKFile(const char* val) { mOutputAPKFile = val; } Loading Loading @@ -161,6 +163,7 @@ private: bool mPseudolocalize; bool mValues; int mCompressionMethod; bool mJunkPath; const char* mOutputAPKFile; const char* mAssetSourceDir; const char* mProguardFile; Loading
tools/aapt/Command.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -996,10 +996,17 @@ int doAdd(Bundle* bundle) if (strcasecmp(String8(fileName).getPathExtension().string(), ".gz") == 0) { printf(" '%s'... (from gzip)\n", fileName); result = zip->addGzip(fileName, String8(fileName).getBasePath().string(), NULL); } else { if (bundle->getJunkPath()) { String8 storageName = String8(fileName).getPathLeaf(); printf(" '%s' as '%s'...\n", fileName, storageName.string()); result = zip->add(fileName, storageName.string(), bundle->getCompressionMethod(), NULL); } else { printf(" '%s'...\n", fileName); result = zip->add(fileName, bundle->getCompressionMethod(), NULL); } } if (result != NO_ERROR) { fprintf(stderr, "Unable to add '%s' to '%s'", bundle->getFileSpecEntry(i), zipFileName); if (result == NAME_NOT_FOUND) Loading
tools/aapt/Main.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ void usage(void) " -f force overwrite of existing files\n" " -g specify a pixel tolerance to force images to grayscale, default 0\n" " -j specify a jar or zip file containing classes to include\n" " -k junk path of file(s) added\n" " -m make package directories under location specified by -J\n" #if 0 " -p pseudolocalize the default configuration\n" Loading Loading @@ -236,6 +237,9 @@ int main(int argc, char* const argv[]) bundle.setGrayscaleTolerance(tolerance); printf("%s: Images with deviation <= %d will be forced to grayscale.\n", prog, tolerance); break; case 'k': bundle.setJunkPath(true); break; case 'm': bundle.setMakePackageDirs(true); break; Loading