aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/scripts
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-08-08 14:01:35 -0700
committerTor Norbye <tnorbye@google.com>2011-08-09 12:21:00 -0700
commitaa80cb71bbff31f0646f6ffe78fe5c291b9d2cc3 (patch)
treeb65c39ec1e544b402e660a1bf3c02c209de0954e /eclipse/scripts
parentc72282ce8f29daa26dcbaf977e24dade7148c380 (diff)
downloadsdk-aa80cb71bbff31f0646f6ffe78fe5c291b9d2cc3.zip
sdk-aa80cb71bbff31f0646f6ffe78fe5c291b9d2cc3.tar.gz
sdk-aa80cb71bbff31f0646f6ffe78fe5c291b9d2cc3.tar.bz2
Make the plugin build script for for Mac OSX
The build_server script used to build the plugin zip file was Linux specific. This changeset tweaks the scripts such that they will also run on Mac OSX. It also adds various .gitignore filters such that the temporary files created by the build script are ignored by git. Change-Id: I77cfe6bfb65be86c11beb50bcab9c345433b5a8e
Diffstat (limited to 'eclipse/scripts')
-rwxr-xr-xeclipse/scripts/build_plugins.sh21
-rwxr-xr-xeclipse/scripts/build_server.sh2
2 files changed, 19 insertions, 4 deletions
diff --git a/eclipse/scripts/build_plugins.sh b/eclipse/scripts/build_plugins.sh
index 71d5533..20217b9 100755
--- a/eclipse/scripts/build_plugins.sh
+++ b/eclipse/scripts/build_plugins.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# build script for eclipse adt build on linux platform
+# build script for eclipse adt build on the Linux and Mac platforms
#
# Usage: sdk/eclipse/scripts/build_plugins <build_version>
#
@@ -18,7 +18,7 @@
# - Build does not properly clean up after itself (build server always executes from
# a clean state.)
# - Script will fail if current absolute path has spaces in it.
-# - Only linux is supported for now
+# - Only linux and OSX are supported for now
# - Do NOT manually invoke this script. Instead use the build_server.sh wrapper
# which does some extra preliminary steps (it builds a few libs needed here.)
@@ -59,7 +59,18 @@ function dieWithUsage() {
# build.properties file. We can easily support other platforms but would need
# to override those values in this script.
HOST=`uname`
-[ "$HOST" == "Linux" ] || die "ERROR: This script is currently only supported on Linux platform"
+if [ "$HOST" == "Linux" ]; then
+ BASEOS=linux
+ BASEWS=gtk
+ BASEARCH=x86
+elif [ "$HOST" == "Darwin" ]; then
+ BASEOS=macosx
+ BASEWS=cocoa
+ BASEARCH=x86
+else
+ die "ERROR: This script is currently only supported on Linux and MacOSX."
+fi
+
# Make sure this runs from the sdk/eclipse plugin.
D=`dirname "$0"`
@@ -188,6 +199,7 @@ find . -name "@*" | xargs rm -rfv
set +e # don't stop on errors anymore, we want to catch them here
+
java \
-jar $LAUNCHER \
-data "$CONFIG_DIR" \
@@ -198,6 +210,9 @@ java \
-DbuildDirectory=$PWD \
-DforceContextQualifier=$BUILD_VERSION \
-DECLIPSE_HOME=$ECLIPSE_HOME \
+ -Dbaseos=$BASEOS \
+ -Dbasews=$BASEWS \
+ -Dbasearch=$BASEARCH \
$SITE_PARAM
RESULT=$?
diff --git a/eclipse/scripts/build_server.sh b/eclipse/scripts/build_server.sh
index bff14bd..4a6093d 100755
--- a/eclipse/scripts/build_server.sh
+++ b/eclipse/scripts/build_server.sh
@@ -52,7 +52,7 @@ function check_params() {
cd "$D/../../../" && echo "Switched to directory $PWD"
# The current Eclipse build has some Linux dependency in its config files
- [ `uname` == "Linux" ] || die "This must run from a Linux box."
+ [ `uname` == "Linux" -o `uname` == "Darwin" ] || die "This must run from a Linux or Mac OSX box."
# Check dest dir exists
[ -n "$DEST_DIR" ] || die "Usage: $0 <destination-directory> [build-number]"