diff options
author | Siva Velusamy <vsiva@google.com> | 2011-09-06 09:41:06 -0700 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2011-09-06 14:03:01 -0700 |
commit | e781012662544eaea470c7639097d7aa81620c69 (patch) | |
tree | d4f2f3f5ef02e999fd2524b8b78ab0ae6d73a550 /eclipse/scripts | |
parent | 4c9e531338db8478060defedf58da1a0992e8c11 (diff) | |
download | sdk-e781012662544eaea470c7639097d7aa81620c69.zip sdk-e781012662544eaea470c7639097d7aa81620c69.tar.gz sdk-e781012662544eaea470c7639097d7aa81620c69.tar.bz2 |
Add create dependencies script for gldebugger.
Move common code from ddms & hierarchy viewer scripts into
common_setup.sh, and reuse the same code in
create_gldebugger_symlinks.
The script copies/soft-links all required dependencies
into the libs folder. Update gldebugger project meta data
to pick up dependencies from the libs folder.
Change-Id: I0c9ccaf01ee43168f6b94bf85b2f42b5fc08ffec
Diffstat (limited to 'eclipse/scripts')
-rwxr-xr-x | eclipse/scripts/common_setup.sh | 42 | ||||
-rwxr-xr-x | eclipse/scripts/create_all_symlinks.sh | 2 | ||||
-rwxr-xr-x | eclipse/scripts/create_ddms_symlinks.sh | 49 | ||||
-rwxr-xr-x | eclipse/scripts/create_gldebugger_symlinks.sh | 26 | ||||
-rwxr-xr-x | eclipse/scripts/create_hierarchyviewer_symlinks.sh | 49 |
5 files changed, 76 insertions, 92 deletions
diff --git a/eclipse/scripts/common_setup.sh b/eclipse/scripts/common_setup.sh new file mode 100755 index 0000000..9b1f03d --- /dev/null +++ b/eclipse/scripts/common_setup.sh @@ -0,0 +1,42 @@ +function die() { + echo "Error: $*" + exit 1 +} + +HOST=`uname` + +if [ "${HOST:0:6}" == "CYGWIN" ]; then + PLATFORM="windows-x86" + + # We can't use symlinks under Cygwin + function cpfile { # $1=dest $2=source + cp -fv $2 $1/ + } + + function cpdir() { # $1=dest $2=source + rsync -avW --delete-after $2 $1 + } +else + if [ "$HOST" == "Linux" ]; then + PLATFORM="linux-x86" + elif [ "$HOST" == "Darwin" ]; then + PLATFORM="darwin-x86" + else + echo "Unsupported platform ($HOST). Nothing done." + fi + + # For all other systems which support symlinks + + # computes the "reverse" path, e.g. "a/b/c" => "../../.." + function back() { + echo $1 | sed 's@[^/]*@..@g' + } + + function cpfile { # $1=dest $2=source + ln -svf `back $1`/$2 $1/ + } + + function cpdir() { # $1=dest $2=source + ln -svf `back $1`/$2 $1 + } +fi diff --git a/eclipse/scripts/create_all_symlinks.sh b/eclipse/scripts/create_all_symlinks.sh index f2ce44c..11752d4 100755 --- a/eclipse/scripts/create_all_symlinks.sh +++ b/eclipse/scripts/create_all_symlinks.sh @@ -29,5 +29,7 @@ echo ; echo "### TRACEVIEW ###" ; echo $DEST/create_traceview_symlinks.sh "$*" echo ; echo "### SDKMANAGER ###" ; echo $DEST/create_sdkman_symlinks.sh "$*" +echo ; echo "### GL DEBUGGER ###" ; echo +$DEST/create_gldebugger_symlinks.sh "$*" echo "### $0 done" diff --git a/eclipse/scripts/create_ddms_symlinks.sh b/eclipse/scripts/create_ddms_symlinks.sh index 48f5c51..a370bc5 100755 --- a/eclipse/scripts/create_ddms_symlinks.sh +++ b/eclipse/scripts/create_ddms_symlinks.sh @@ -6,53 +6,10 @@ set -e -function die() { - echo "Error: $*" - exit 1 -} - -HOST=`uname` - -if [ "${HOST:0:6}" == "CYGWIN" ]; then - PLATFORM="windows-x86" - - # We can't use symlinks under Cygwin - - function cpfile { # $1=dest $2=source - cp -fv $2 $1/ - } - - function cpdir() { # $1=dest $2=source - rsync -avW --delete-after $2 $1 - } - -else - if [ "$HOST" == "Linux" ]; then - PLATFORM="linux-x86" - elif [ "$HOST" == "Darwin" ]; then - PLATFORM="darwin-x86" - else - echo "Unsupported platform ($HOST). Nothing done." - fi - - # For all other systems which support symlinks - - # computes the "reverse" path, e.g. "a/b/c" => "../../.." - function back() { - echo $1 | sed 's@[^/]*@..@g' - } - - function cpfile { # $1=dest $2=source - ln -svf `back $1`/$2 $1/ - } - - function cpdir() { # $1=dest $2=source - ln -svf `back $1`/$2 $1 - } -fi - -# CD to the top android directory D=`dirname "$0"` +source $D/common_setup.sh + +# cd to the top android directory cd "$D/../../../" BASE="sdk/eclipse/plugins/com.android.ide.eclipse.ddms" diff --git a/eclipse/scripts/create_gldebugger_symlinks.sh b/eclipse/scripts/create_gldebugger_symlinks.sh new file mode 100755 index 0000000..e28b5b9 --- /dev/null +++ b/eclipse/scripts/create_gldebugger_symlinks.sh @@ -0,0 +1,26 @@ +#!/bin/bash +#----------------------------------------------------------------------------| +# Creates the links to use gldebugger in the eclipse-ide plugin. +# Run this from sdk/eclipse/scripts +#----------------------------------------------------------------------------| + +set -e + +D=`dirname "$0"` +source $D/common_setup.sh + +# cd to the top android directory +cd "$D/../../../" + +BASE="sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger" +DEST=$BASE/libs + +mkdir -p $DEST + +LIBS="host-libprotobuf-java-2.3.0-lite liblzf sdklib" +echo "make java libs ..." +make -j3 $LIBS || die "GL Debugger: Fail to build one of $LIBS." + +for LIB in $LIBS; do + cpfile $DEST out/host/$PLATFORM/framework/$LIB.jar +done diff --git a/eclipse/scripts/create_hierarchyviewer_symlinks.sh b/eclipse/scripts/create_hierarchyviewer_symlinks.sh index 47dbe7f..e4fc281 100755 --- a/eclipse/scripts/create_hierarchyviewer_symlinks.sh +++ b/eclipse/scripts/create_hierarchyviewer_symlinks.sh @@ -6,53 +6,10 @@ set -e -function die() { - echo "Error: $*" - exit 1 -} - -HOST=`uname` - -if [ "${HOST:0:6}" == "CYGWIN" ]; then - PLATFORM="windows-x86" - - # We can't use symlinks under Cygwin - - function cpfile { # $1=dest $2=source - cp -fv $2 $1/ - } - - function cpdir() { # $1=dest $2=source - rsync -avW --delete-after $2 $1 - } - -else - if [ "$HOST" == "Linux" ]; then - PLATFORM="linux-x86" - elif [ "$HOST" == "Darwin" ]; then - PLATFORM="darwin-x86" - else - echo "Unsupported platform ($HOST). Nothing done." - fi - - # For all other systems which support symlinks - - # computes the "reverse" path, e.g. "a/b/c" => "../../.." - function back() { - echo $1 | sed 's@[^/]*@..@g' - } - - function cpfile { # $1=dest $2=source - ln -svf `back $1`/$2 $1/ - } - - function cpdir() { # $1=dest $2=source - ln -svf `back $1`/$2 $1 - } -fi - -# CD to the top android directory D=`dirname "$0"` +source $D/common_setup.sh + +# cd to the top android directory cd "$D/../../../" BASE="sdk/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer" |