update_gallery_files.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # This script is used to pull the most up-to-date files from
  2. # Gallery into Launcher (we use some code from the Gallery
  3. # source). The Launcher versions have some small modifications
  4. # so do this with care, and be sure you are pulling from the
  5. # latest version of Gallery
  6. import os
  7. import sys
  8. files = """
  9. src/android/util/Pools.java
  10. src/com/android/gallery3d/util/IntArray.java
  11. src/com/android/gallery3d/common/Utils.java
  12. src/com/android/gallery3d/exif/ByteBufferInputStream.java
  13. src/com/android/gallery3d/exif/CountedDataInputStream.java
  14. src/com/android/gallery3d/exif/ExifData.java
  15. src/com/android/gallery3d/exif/ExifInterface.java
  16. src/com/android/gallery3d/exif/ExifInvalidFormatException.java
  17. src/com/android/gallery3d/exif/ExifModifier.java
  18. src/com/android/gallery3d/exif/ExifOutputStream.java
  19. src/com/android/gallery3d/exif/ExifParser.java
  20. src/com/android/gallery3d/exif/ExifReader.java
  21. src/com/android/gallery3d/exif/ExifTag.java
  22. src/com/android/gallery3d/exif/IfdData.java
  23. src/com/android/gallery3d/exif/IfdId.java
  24. src/com/android/gallery3d/exif/JpegHeader.java
  25. src/com/android/gallery3d/exif/OrderedDataOutputStream.java
  26. src/com/android/gallery3d/exif/Rational.java
  27. src/com/android/gallery3d/glrenderer/BasicTexture.java
  28. src/com/android/gallery3d/glrenderer/BitmapTexture.java
  29. src/com/android/gallery3d/glrenderer/GLCanvas.java
  30. src/com/android/gallery3d/glrenderer/GLES20Canvas.java
  31. src/com/android/gallery3d/glrenderer/GLES20IdImpl.java
  32. src/com/android/gallery3d/glrenderer/GLId.java
  33. src/com/android/gallery3d/glrenderer/GLPaint.java
  34. src/com/android/gallery3d/glrenderer/RawTexture.java
  35. src/com/android/gallery3d/glrenderer/Texture.java
  36. src/com/android/gallery3d/glrenderer/UploadedTexture.java
  37. src/com/android/photos/BitmapRegionTileSource.java
  38. src/com/android/photos/views/BlockingGLTextureView.java
  39. src/com/android/photos/views/TiledImageRenderer.java
  40. src/com/android/photos/views/TiledImageView.java
  41. src/com/android/gallery3d/common/BitmapUtils.java
  42. """
  43. if len(sys.argv) != 2:
  44. print "Usage: python update_gallery_files.py <gallery_dir>"
  45. exit()
  46. gallery_dir = sys.argv[1]
  47. for file_path in files.split():
  48. dir = os.path.dirname(file_path)
  49. if file_path.find('exif') != -1 or file_path.find('common') != -1:
  50. file_path = 'gallerycommon/' + file_path
  51. cmd = 'cp %s/%s WallpaperPicker/%s/' % (gallery_dir, file_path, dir)
  52. print cmd
  53. os.system(cmd)