Home | History | Annotate | Download | only in Launcher3
      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 
     44 if len(sys.argv) != 2:
     45     print "Usage: python update_gallery_files.py <gallery_dir>"
     46     exit()
     47 gallery_dir = sys.argv[1]
     48 for file_path in files.split():
     49     dir = os.path.dirname(file_path)
     50     if file_path.find('exif') != -1 or file_path.find('common') != -1:
     51         file_path = 'gallerycommon/' + file_path
     52     cmd = 'cp %s/%s WallpaperPicker/%s/' % (gallery_dir, file_path, dir)
     53     print cmd
     54     os.system(cmd)
     55