Fix eclipse setup scripts.
The fix will work for Linux and Mac, however for Windows the DDMS icons will have an invalid path. I can address the Windows DDMS issue in a next CL if necessary by merging in a different CL from upstream.
This commit is contained in:
@@ -6,36 +6,38 @@ function die() {
|
||||
|
||||
set -e # fail early
|
||||
|
||||
# This may run either from the //device directory or from the
|
||||
# eclipse/script directory. Allow for both.
|
||||
D="device/tools/eclipse/scripts"
|
||||
[ -d "$D" ] && cd "$D"
|
||||
[ -d "../$D" ] && cd "../$D"
|
||||
# CD to the top android directory
|
||||
D=`dirname "$0"`
|
||||
cd "$D/../../../../"
|
||||
|
||||
DEST="development/tools/eclipse/plugins/com.android.ide.eclipse.adt"
|
||||
# computes "../.." from DEST to here (in /android)
|
||||
BACK=`echo $DEST | sed 's@[^/]*@..@g'`
|
||||
|
||||
LIBS="jarutils androidprefs"
|
||||
|
||||
echo "make java libs ..."
|
||||
make -j3 showcommands $LIBS || die "Fail to build one of $LIBS."
|
||||
|
||||
echo "Copying java libs to $DEST"
|
||||
|
||||
cd ../plugins/com.android.ide.eclipse.adt
|
||||
HOST=`uname`
|
||||
if [ "$HOST" == "Linux" ]; then
|
||||
ln -svf ../../../../out/host/linux-x86/framework/jarutils.jar .
|
||||
ln -svf ../../../../out/host/linux-x86/framework/androidprefs.jar .
|
||||
for LIB in $LIBS; do
|
||||
ln -svf $BACK/out/host/linux-x86/framework/$LIB.jar "$DEST/"
|
||||
done
|
||||
|
||||
elif [ "$HOST" == "Darwin" ]; then
|
||||
ln -svf ../../../../out/host/darwin-x86/framework/jarutils.jar .
|
||||
ln -svf ../../../../out/host/darwin-x86/framework/androidprefs.jar .
|
||||
for LIB in $LIBS; do
|
||||
ln -svf $BACK/out/host/darwin-x86/framework/$LIB.jar "$DEST/"
|
||||
done
|
||||
|
||||
elif [ "${HOST:0:6}" == "CYGWIN" ]; then
|
||||
|
||||
DEVICE_DIR="../../../.."
|
||||
echo "make java libs ..."
|
||||
( cd "$DEVICE_DIR" &&
|
||||
make -j3 showcommands jarutils androidprefs ) || \
|
||||
die "Define javac and retry."
|
||||
|
||||
for DIR in "$PWD" ; do
|
||||
echo "Copying java libs to $DIR"
|
||||
for JAR in jarutils.jar androidprefs.jar ; do
|
||||
cp -vf "$DEVICE_DIR/out/host/windows-x86/framework/$JAR" "$DIR"
|
||||
done
|
||||
for LIB in $LIBS; do
|
||||
cp -vf $BACK/out/host/windows-x86/framework/$LIB.jar "$DEST/"
|
||||
done
|
||||
|
||||
chmod a+rx *.jar
|
||||
chmod -v a+rx "$DEST"/*.jar
|
||||
else
|
||||
echo "Unsupported platform ($HOST). Nothing done."
|
||||
fi
|
||||
|
||||
@@ -7,26 +7,25 @@ function die() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
D="device/tools/eclipse/scripts"
|
||||
if [ -d "../$D" ]; then
|
||||
cd "../$D"
|
||||
else
|
||||
[ "${PWD: -28}" == "$D" ] || die "Please execute this from the $D directory"
|
||||
fi
|
||||
# CD to the top android directory
|
||||
D=`dirname "$0"`
|
||||
cd "$D/../../../../"
|
||||
|
||||
DEST="development/tools/eclipse/scripts"
|
||||
|
||||
set -e # fail early
|
||||
|
||||
echo ; echo "### ADT ###" ; echo
|
||||
./create_adt_symlinks.sh "$*"
|
||||
$DEST/create_adt_symlinks.sh "$*"
|
||||
echo ; echo "### COMMON ###" ; echo
|
||||
./create_common_symlinks.sh "$*"
|
||||
$DEST/create_common_symlinks.sh "$*"
|
||||
echo ; echo "### EDITORS ###" ; echo
|
||||
./create_editors_symlinks.sh "$*"
|
||||
$DEST/create_editors_symlinks.sh "$*"
|
||||
echo ; echo "### DDMS ###" ; echo
|
||||
./create_ddms_symlinks.sh "$*"
|
||||
$DEST/create_ddms_symlinks.sh "$*"
|
||||
echo ; echo "### TEST ###" ; echo
|
||||
./create_test_symlinks.sh "$*"
|
||||
$DEST/create_test_symlinks.sh "$*"
|
||||
echo ; echo "### BRIDGE ###" ; echo
|
||||
./create_bridge_symlinks.sh "$*"
|
||||
$DEST/create_bridge_symlinks.sh "$*"
|
||||
|
||||
echo "### $0 done"
|
||||
|
||||
@@ -6,19 +6,17 @@ function die() {
|
||||
|
||||
set -e # fail early
|
||||
|
||||
# This may run either from the //device directory or from the
|
||||
# eclipse/script directory. Allow for both.
|
||||
D="device/tools/eclipse/scripts"
|
||||
[ -d "$D" ] && cd "$D"
|
||||
[ -d "../$D" ] && cd "../$D"
|
||||
|
||||
cd ../../layoutlib
|
||||
# CD to the top android directory
|
||||
D=`dirname "$0"`
|
||||
cd "$D/../../../../"
|
||||
|
||||
HOST=`uname`
|
||||
if [ "$HOST" == "Linux" ]; then
|
||||
echo # nothing to do
|
||||
|
||||
elif [ "$HOST" == "Darwin" ]; then
|
||||
echo # nothing to do
|
||||
|
||||
elif [ "${HOST:0:6}" == "CYGWIN" ]; then
|
||||
if [ "x$1" == "x" ]; then
|
||||
echo "Usage: $0 sdk/tools/lib/"
|
||||
@@ -28,17 +26,16 @@ elif [ "${HOST:0:6}" == "CYGWIN" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEVICE_DIR="../../"
|
||||
echo "make java libs ..."
|
||||
( cd "$DEVICE_DIR" &&
|
||||
make -j3 showcommands layoutlib ninepatch ) || \
|
||||
die "Define javac and retry."
|
||||
LIBS="layoutlib ninepatch"
|
||||
make -j3 showcommands $LIBS || die "Define javac and retry."
|
||||
|
||||
for DIR in "$PWD" "$1" ; do
|
||||
for DIR in frameworks/base/tools/layoutlib "$1" ; do
|
||||
echo "Copying java libs to $DIR"
|
||||
for JAR in ninepatch.jar layoutlib.jar ; do
|
||||
cp -vf "$DEVICE_DIR/out/host/windows-x86/framework/$JAR" "$DIR"
|
||||
for LIB in $LIBS; do
|
||||
cp -vf "out/host/windows-x86/framework/$LIB.jar" "$DIR"
|
||||
done
|
||||
chmod -v a+rx "$LIB"/*.jar
|
||||
done
|
||||
|
||||
else
|
||||
|
||||
@@ -6,36 +6,38 @@ function die() {
|
||||
|
||||
set -e # fail early
|
||||
|
||||
# This may run either from the //device directory or from the
|
||||
# eclipse/script directory. Allow for both.
|
||||
D="device/tools/eclipse/scripts"
|
||||
[ -d "$D" ] && cd "$D"
|
||||
[ -d "../$D" ] && cd "../$D"
|
||||
# CD to the top android directory
|
||||
D=`dirname "$0"`
|
||||
cd "$D/../../../../"
|
||||
|
||||
DEST="development/tools/eclipse/plugins/com.android.ide.eclipse.common"
|
||||
# computes "../.." from DEST to here (in /android)
|
||||
BACK=`echo $DEST | sed 's@[^/]*@..@g'`
|
||||
|
||||
LIBS="sdkstats androidprefs"
|
||||
|
||||
echo "make java libs ..."
|
||||
make -j3 showcommands $LIBS || die "Fail to build one of $LIBS."
|
||||
|
||||
echo "Copying java libs to $DEST"
|
||||
|
||||
cd ../plugins/com.android.ide.eclipse.common
|
||||
HOST=`uname`
|
||||
if [ "$HOST" == "Linux" ]; then
|
||||
ln -svf ../../../../out/host/linux-x86/framework/sdkstats.jar .
|
||||
ln -svf ../../../../out/host/linux-x86/framework/androidprefs.jar .
|
||||
for LIB in $LIBS; do
|
||||
ln -svf $BACK/out/host/linux-x86/framework/$LIB.jar "$DEST/"
|
||||
done
|
||||
|
||||
elif [ "$HOST" == "Darwin" ]; then
|
||||
ln -svf ../../../../out/host/darwin-x86/framework/sdkstats.jar .
|
||||
ln -svf ../../../../out/host/darwin-x86/framework/androidprefs.jar .
|
||||
for LIB in $LIBS; do
|
||||
ln -svf $BACK/out/host/darwin-x86/framework/$LIB.jar "$DEST/"
|
||||
done
|
||||
|
||||
elif [ "${HOST:0:6}" == "CYGWIN" ]; then
|
||||
|
||||
DEVICE_DIR="../../../.."
|
||||
echo "make java libs ..."
|
||||
( cd "$DEVICE_DIR" &&
|
||||
make -j3 sdkstats androidprefs ) || \
|
||||
die "Define javac and retry."
|
||||
|
||||
for DIR in "$PWD" ; do
|
||||
echo "Copying java libs to $DIR"
|
||||
for JAR in sdkstats.jar androidprefs.jar ; do
|
||||
cp -vf "$DEVICE_DIR/out/host/windows-x86/framework/$JAR" "$DIR"
|
||||
chmod a+rx "$DIR/$JAR"
|
||||
done
|
||||
for LIB in $LIBS; do
|
||||
cp -vf $BACK/out/host/windows-x86/framework/$LIB.jar "$DEST/"
|
||||
done
|
||||
|
||||
chmod -v a+rx "$DEST"/*.jar
|
||||
else
|
||||
echo "Unsupported platform ($HOST). Nothing done."
|
||||
fi
|
||||
|
||||
@@ -12,50 +12,39 @@ if [ "${HOST:0:6}" == "CYGWIN" ]; then
|
||||
DIR="rsync -avW --delete-after"
|
||||
fi
|
||||
|
||||
cd ../plugins/com.android.ide.eclipse.ddms
|
||||
mkdir -p libs
|
||||
cd libs
|
||||
$CMD ../../../../../prebuilt/common/jfreechart/jcommon-1.0.12.jar .
|
||||
$CMD ../../../../../prebuilt/common/jfreechart/jfreechart-1.0.9.jar .
|
||||
$CMD ../../../../../prebuilt/common/jfreechart/jfreechart-1.0.9-swt.jar .
|
||||
# CD to the top android directory
|
||||
D=`dirname "$0"`
|
||||
cd "$D/../../../../"
|
||||
|
||||
cd ../src/com/android
|
||||
$DIR ../../../../../../ddms/libs/ddmlib/src/com/android/ddmlib .
|
||||
$DIR ../../../../../../ddms/libs/ddmuilib/src/com/android/ddmuilib .
|
||||
# computes relative ".." paths from $1 to here (in /android)
|
||||
function back() {
|
||||
echo $1 | sed 's@[^/]*@..@g'
|
||||
}
|
||||
|
||||
# goes back to the icons directory
|
||||
cd ../../../icons/
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/debug-attach.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/debug-wait.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/debug-error.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/device.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/emulator.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/heap.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/thread.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/empty.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/warning.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/d.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/e.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/i.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/v.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/w.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/add.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/delete.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/edit.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/save.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/push.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/pull.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/clear.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/up.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/down.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/gc.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/halt.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/load.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/importBug.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/play.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/pause.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/forward.png .
|
||||
$CMD ../../../../ddms/libs/ddmuilib/src/resources/images/backward.png .
|
||||
BASE="development/tools/eclipse/plugins/com.android.ide.eclipse.ddms"
|
||||
|
||||
DEST=$BASE/libs
|
||||
mkdir -p $D
|
||||
BACK=`back $DEST`
|
||||
for i in prebuilt/common/jfreechart/*.jar; do
|
||||
$CMD $BACK/$i $DEST/
|
||||
done
|
||||
|
||||
DEST=$BASE/src/com/android
|
||||
BACK=`back $DEST`
|
||||
for i in development/tools/ddms/libs/ddmlib/src/com/android/ddmlib \
|
||||
development/tools/ddms/libs/ddmuilib/src/com/android/ddmuilib ; do
|
||||
$DIR $BACK/$i $DEST/
|
||||
done
|
||||
|
||||
DEST=$BASE/icons
|
||||
BACK=`back $DEST`
|
||||
|
||||
for i in debug-attach.png debug-wait.png debug-error.png device.png emulator.png \
|
||||
heap.png thread.png empty.png warning.png d.png e.png i.png \
|
||||
v.png w.png add.png delete.png edit.png save.png push.png pull.png \
|
||||
clear.png up.png down.png gc.png halt.png load.png importBug.png \
|
||||
play.png pause.png forward.png backward.png ; do
|
||||
$CMD $BACK/development/tools/ddms/libs/ddmuilib/src/resources/images/$i $DEST/
|
||||
done
|
||||
|
||||
|
||||
@@ -4,35 +4,46 @@ function die() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
cd ../plugins/com.android.ide.eclipse.editors
|
||||
set -e # fail early
|
||||
|
||||
# CD to the top android directory
|
||||
D=`dirname "$0"`
|
||||
cd "$D/../../../../"
|
||||
|
||||
DEST="development/tools/eclipse/plugins/com.android.ide.eclipse.editors"
|
||||
# computes "../.." from DEST to here (in /android)
|
||||
BACK=`echo $DEST | sed 's@[^/]*@..@g'`
|
||||
|
||||
LIBS="layoutlib_api layoutlib_utils ninepatch"
|
||||
|
||||
echo "make java libs ..."
|
||||
make -j3 showcommands $LIBS || die "Fail to build one of $LIBS."
|
||||
|
||||
echo "Copying java libs to $DEST"
|
||||
|
||||
HOST=`uname`
|
||||
if [ "$HOST" == "Linux" ]; then
|
||||
ln -svf ../../../../out/host/linux-x86/framework/layoutlib_api.jar .
|
||||
ln -svf ../../../../out/host/linux-x86/framework/layoutlib_utils.jar .
|
||||
ln -svf ../../../../out/host/linux-x86/framework/kxml2-2.3.0.jar .
|
||||
ln -svf ../../../../out/host/linux-x86/framework/ninepatch.jar .
|
||||
elif [ "$HOST" == "Darwin" ]; then
|
||||
ln -svf ../../../../out/host/darwin-x86/framework/layoutlib_api.jar .
|
||||
ln -svf ../../../../out/host/darwin-x86/framework/layoutlib_utils.jar .
|
||||
ln -svf ../../../../out/host/darwin-x86/framework/kxml2-2.3.0.jar .
|
||||
ln -svf ../../../../out/host/darwin-x86/framework/ninepatch.jar .
|
||||
elif [ "${HOST:0:6}" == "CYGWIN" ]; then
|
||||
set -e # fail early
|
||||
DEVICE_DIR="../../../../"
|
||||
echo "make java libs ..."
|
||||
( cd "$DEVICE_DIR" &&
|
||||
make -j3 showcommands layoutlib_api layoutlib_utils ninepatch ) || \
|
||||
die "Define javac and 'make layoutlib_api ninepatch' from device."
|
||||
|
||||
echo "Copying java libs to $PWD"
|
||||
for JAR in layoutlib_api.jar layoutlib_utils.jar ninepatch.jar ; do
|
||||
cp -vf "$DEVICE_DIR/out/host/windows-x86/framework/$JAR" .
|
||||
for LIB in $LIBS; do
|
||||
ln -svf $BACK/out/host/linux-x86/framework/$LIB.jar "$DEST/"
|
||||
done
|
||||
if [ ! -f "./kxml2-2.3.0.jar" ]; then
|
||||
cp -v $DEVICE_DIR/prebuilt/common/kxml2/kxml2-2.3.0.jar .
|
||||
chmod -v a+rx *.jar
|
||||
ln -svf $BACK/out/host/linux-x86/framework/kxml2-2.3.0.jar "$DEST/"
|
||||
|
||||
elif [ "$HOST" == "Darwin" ]; then
|
||||
for LIB in $LIBS; do
|
||||
ln -svf $BACK/out/host/darwin-x86/framework/$LIB.jar "$DEST/"
|
||||
done
|
||||
ln -svf $BACK/out/host/darwin-x86/framework/kxml2-2.3.0.jar "$DEST/"
|
||||
|
||||
elif [ "${HOST:0:6}" == "CYGWIN" ]; then
|
||||
for LIB in $LIBS; do
|
||||
cp -vf $BACK/out/host/windows-x86/framework/$LIB.jar "$DEST/"
|
||||
done
|
||||
|
||||
if [ ! -f "$DEST/kxml2-2.3.0.jar" ]; then
|
||||
cp -v "prebuilt/common/kxml2/kxml2-2.3.0.jar" "$DEST/"
|
||||
fi
|
||||
|
||||
chmod -v a+rx "$DEST"/*.jar
|
||||
else
|
||||
echo "Unsupported platform ($HOST). Nothing done."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user