Home | History | Annotate | Download | only in scripts
      1 #!/bin/bash
      2 #----------------------------------------------------------------------------|
      3 # Creates the links to use ddm{ui}lib in the eclipse-ide plugin.
      4 # Run this from sdk/eclipse/scripts
      5 #----------------------------------------------------------------------------|
      6 
      7 set -e
      8 
      9 D=`dirname "$0"`
     10 source $D/common_setup.sh
     11 
     12 # cd to the top android directory
     13 cd "$D/../../../"
     14 
     15 BASE="sdk/eclipse/plugins/com.android.ide.eclipse.ddms"
     16 DEST=$BASE/libs
     17 
     18 mkdir -p $DEST
     19 for i in prebuilt/common/jfreechart/*.jar; do
     20   cpfile $DEST $i
     21 done
     22 
     23 COPY_LIBS="ddmlib ddmuilib"
     24 ALL_LIBS="$COPY_LIBS swtmenubar"
     25 echo "make java libs ..."
     26 make -j3 showcommands $ALL_LIBS || die "DDMS: Fail to build one of $ALL_LIBS."
     27 
     28 for LIB in $COPY_LIBS; do
     29     cpfile $DEST out/host/$PLATFORM/framework/$LIB.jar
     30 done
     31 
     32 if [ "${HOST:0:6}" == "CYGWIN" ]; then
     33     # On Windows we used to make a hard copy of the ddmlib/ddmuilib
     34     # under the plugin source tree. Now that we're using external JARs
     35     # we need to actually remove these obsolete sources.
     36     for i in ddmlib ddmuilib ; do
     37         DIR=$BASE/src/com/android/$i
     38         if [ -d $DIR ]; then
     39             rm -rfv $BASE/src/com/android/$i
     40         fi
     41     done
     42 fi
     43