2006-09-29 22:28:05 +00:00
|
|
|
#!/bin/sh
|
2006-11-09 12:34:44 +00:00
|
|
|
#*******************************************************************************
|
2010-02-28 22:30:08 +00:00
|
|
|
# Copyright (c) 2006, 2010 Wind River Systems, Inc.
|
2006-11-09 12:34:44 +00:00
|
|
|
# All rights reserved. This program and the accompanying materials
|
|
|
|
# are made available under the terms of the Eclipse Public License v1.0
|
|
|
|
# which accompanies this distribution, and is available at
|
|
|
|
# http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
#
|
|
|
|
# Contributors:
|
|
|
|
# Martin Oberhuber - initial API and implementation
|
|
|
|
#*******************************************************************************
|
2006-09-29 22:28:05 +00:00
|
|
|
#
|
|
|
|
# setup.sh : Set up an environment for building TM / RSE
|
|
|
|
# Works on build.eclipse.org -- may need to be adjusted
|
|
|
|
# for other hosts.
|
|
|
|
#
|
2007-01-17 19:17:14 +00:00
|
|
|
# This must be run in $HOME/ws2 in order for the mkTestUpdateSite.sh
|
2006-09-29 22:28:05 +00:00
|
|
|
# script to find the published packages
|
2006-09-29 22:42:15 +00:00
|
|
|
#
|
|
|
|
# Bootstrapping: Get this script by
|
2009-11-05 20:13:36 +00:00
|
|
|
# export CVSROOT=:pserver:anonymous@dev.eclipse.org:/cvsroot/dsdp
|
|
|
|
# cvs co -r HEAD org.eclipse.tm.rse/releng/org.eclipse.rse.build
|
|
|
|
# sh org.eclipse.tm.rse/releng/org.eclipse.rse.build/setup.sh
|
|
|
|
#
|
|
|
|
# - OR -
|
|
|
|
#
|
2006-09-29 22:42:15 +00:00
|
|
|
# wget -O setup.sh "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tm.rse/releng/org.eclipse.rse.build/setup.sh?rev=HEAD&cvsroot=DSDP_Project&content-type=text/plain"
|
|
|
|
# sh setup.sh
|
|
|
|
# ./doit_ibuild.sh
|
|
|
|
# cd testUpdates/bin
|
|
|
|
# mkTestUpdates.sh
|
2006-09-29 22:28:05 +00:00
|
|
|
|
|
|
|
curdir=`pwd`
|
|
|
|
|
2007-04-02 07:57:33 +00:00
|
|
|
uname_s=`uname -s`
|
|
|
|
uname_m=`uname -m`
|
|
|
|
case ${uname_s}${uname_m} in
|
|
|
|
Linuxppc*) ep_arch=linux-gtk-ppc
|
|
|
|
cdt_arch=linux.ppc
|
|
|
|
;;
|
|
|
|
Linuxx86_64*) ep_arch=linux-gtk-x86_64
|
|
|
|
cdt_arch=linux.x86_64
|
|
|
|
;;
|
|
|
|
Linuxx86*) ep_arch=linux-gtk
|
|
|
|
cdt_arch=linux.x86
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2006-09-29 22:28:05 +00:00
|
|
|
# prepare the base Eclipse installation in folder "eclipse"
|
2009-05-05 21:54:32 +00:00
|
|
|
ep_rel="S-"
|
2010-03-15 20:28:45 +00:00
|
|
|
ep_ver=3.6M6
|
|
|
|
ep_date="-201003121448"
|
2008-06-05 21:03:21 +00:00
|
|
|
P2_disabled=false
|
2008-06-06 01:23:18 +00:00
|
|
|
P2_no_dropins=false
|
2010-03-15 20:28:45 +00:00
|
|
|
if [ ! -f eclipse/plugins/org.eclipse.swt_3.6.0.v3637e.jar ]; then
|
2007-03-29 11:01:11 +00:00
|
|
|
curdir2=`pwd`
|
2007-03-29 11:11:35 +00:00
|
|
|
if [ ! -d eclipse -o -h eclipse ]; then
|
2008-05-22 14:04:31 +00:00
|
|
|
if [ -d eclipse-${ep_ver}-${ep_arch} ]; then
|
|
|
|
rm -rf eclipse-${ep_ver}-${ep_arch}
|
2007-03-29 11:01:11 +00:00
|
|
|
fi
|
2008-05-22 14:04:31 +00:00
|
|
|
mkdir eclipse-${ep_ver}-${ep_arch}
|
|
|
|
cd eclipse-${ep_ver}-${ep_arch}
|
2007-03-29 11:11:35 +00:00
|
|
|
else
|
2007-03-29 11:01:11 +00:00
|
|
|
rm -rf eclipse
|
|
|
|
fi
|
2008-05-22 14:04:31 +00:00
|
|
|
# Eclipse SDK: Need the SDK so we can link into docs
|
2007-02-27 22:05:43 +00:00
|
|
|
echo "Getting Eclipse SDK..."
|
2009-04-27 14:30:07 +00:00
|
|
|
wget "http://download.eclipse.org/eclipse/downloads/drops/${ep_rel}${ep_ver}${ep_date}/eclipse-SDK-${ep_ver}-${ep_arch}.tar.gz"
|
2008-05-22 14:04:31 +00:00
|
|
|
tar xfvz eclipse-SDK-${ep_ver}-${ep_arch}.tar.gz
|
|
|
|
rm eclipse-SDK-${ep_ver}-${ep_arch}.tar.gz
|
2007-03-29 11:01:11 +00:00
|
|
|
cd "${curdir2}"
|
2007-03-29 11:11:35 +00:00
|
|
|
if [ ! -d eclipse -o -h eclipse ]; then
|
|
|
|
if [ -e eclipse ]; then
|
|
|
|
rm eclipse
|
|
|
|
fi
|
2008-05-22 14:04:31 +00:00
|
|
|
ln -s eclipse-${ep_ver}-${ep_arch}/eclipse eclipse
|
2007-03-29 11:01:11 +00:00
|
|
|
fi
|
2006-09-29 22:28:05 +00:00
|
|
|
fi
|
2007-02-28 10:06:37 +00:00
|
|
|
if [ ! -f eclipse/startup.jar ]; then
|
2007-02-27 22:05:43 +00:00
|
|
|
curdir2=`pwd`
|
|
|
|
cd eclipse/plugins
|
2007-02-28 10:06:37 +00:00
|
|
|
if [ -h ../startup.jar ]; then
|
|
|
|
rm ../startup.jar
|
|
|
|
fi
|
2008-04-03 10:13:30 +00:00
|
|
|
LAUNCHER=`ls org.eclipse.equinox.launcher_*.jar | sort | tail -1`
|
2007-02-28 10:06:37 +00:00
|
|
|
if [ "${LAUNCHER}" != "" ]; then
|
|
|
|
echo "eclipse LAUNCHER=${LAUNCHER}"
|
|
|
|
ln -s plugins/${LAUNCHER} ../startup.jar
|
|
|
|
else
|
|
|
|
echo "Eclipse: NO startup.jar LAUNCHER FOUND!"
|
|
|
|
fi
|
2007-02-27 22:05:43 +00:00
|
|
|
cd ${curdir2}
|
|
|
|
fi
|
2008-06-05 20:37:42 +00:00
|
|
|
|
2008-06-06 01:23:18 +00:00
|
|
|
if ${P2_no_dropins} ; then
|
2008-06-05 20:57:30 +00:00
|
|
|
#P2 disabled?
|
2008-06-05 21:06:01 +00:00
|
|
|
DROPIN=.
|
2008-06-05 20:57:30 +00:00
|
|
|
DROPUP=.
|
|
|
|
else
|
|
|
|
#P2 enabled
|
2008-06-05 21:06:01 +00:00
|
|
|
DROPIN=eclipse/dropins
|
2008-06-05 20:57:30 +00:00
|
|
|
DROPUP=../..
|
|
|
|
fi
|
|
|
|
|
2009-11-05 20:13:36 +00:00
|
|
|
# EMF 2.5.0
|
2008-09-16 17:22:41 +00:00
|
|
|
EMFBRANCH=2.5.0
|
2009-11-05 20:13:36 +00:00
|
|
|
EMFREL=R
|
|
|
|
EMFDATE=200906151043
|
|
|
|
EMFVER=2.5.0
|
2009-02-08 21:56:35 +00:00
|
|
|
if [ ! -f ${DROPIN}/eclipse/plugins/org.eclipse.emf.doc_${EMFBRANCH}.v${EMFDATE}.jar ]; then
|
2008-02-28 15:46:06 +00:00
|
|
|
# Need EMF 2.4 SDK for Service Discovery ISV Docs Backlinks
|
2007-06-11 10:36:03 +00:00
|
|
|
echo "Getting EMF SDK..."
|
2008-06-05 20:57:30 +00:00
|
|
|
cd ${DROPIN}
|
2009-02-08 21:48:16 +00:00
|
|
|
wget "http://download.eclipse.org/modeling/emf/emf/downloads/drops/${EMFBRANCH}/${EMFREL}${EMFDATE}/emf-xsd-SDK-${EMFVER}.zip"
|
|
|
|
unzip -o emf-xsd-SDK-${EMFVER}.zip
|
|
|
|
rm emf-xsd-SDK-${EMFVER}.zip
|
2008-06-05 20:57:30 +00:00
|
|
|
cd ${DROPUP}
|
2006-09-29 22:28:05 +00:00
|
|
|
fi
|
2009-04-27 15:11:46 +00:00
|
|
|
if [ ! -f eclipse/plugins/org.junit_3.8.2.v20090203-1005/junit.jar ]; then
|
2007-01-17 19:38:27 +00:00
|
|
|
# Eclipse Test Framework
|
2007-02-27 22:05:43 +00:00
|
|
|
echo "Getting Eclipse Test Framework..."
|
2009-04-27 14:30:07 +00:00
|
|
|
wget "http://download.eclipse.org/eclipse/downloads/drops/${ep_rel}${ep_ver}${ep_date}/eclipse-test-framework-${ep_ver}.zip"
|
2008-05-22 14:04:31 +00:00
|
|
|
unzip -o eclipse-test-framework-${ep_ver}.zip
|
|
|
|
rm eclipse-test-framework-${ep_ver}.zip
|
2008-02-28 15:46:06 +00:00
|
|
|
fi
|
2008-06-05 21:06:01 +00:00
|
|
|
if [ ! -f ${DROPIN}/eclipse/plugins/gnu.io.rxtx_2.1.7.4_v20071016.jar ]; then
|
2008-02-28 15:46:06 +00:00
|
|
|
echo "Getting RXTX..."
|
2008-06-05 20:57:30 +00:00
|
|
|
cd ${DROPIN}
|
2008-02-28 15:46:06 +00:00
|
|
|
wget "http://rxtx.qbang.org/eclipse/downloads/RXTX-SDK-I20071016-1945.zip"
|
|
|
|
unzip -o RXTX-SDK-I20071016-1945.zip
|
|
|
|
rm RXTX-SDK-I20071016-1945.zip
|
2008-06-05 20:57:30 +00:00
|
|
|
cd ${DROPUP}
|
2007-01-17 19:38:27 +00:00
|
|
|
fi
|
2006-09-29 22:28:05 +00:00
|
|
|
|
2010-02-28 22:30:08 +00:00
|
|
|
# CDT Runtime
|
|
|
|
#CDTREL=6.0.0
|
|
|
|
#CDTVER=200902031437
|
|
|
|
#CDTNAME=cdt-master-5.0.0.zip
|
|
|
|
#CDTLOC=releases/ganymede/dist/${CDTNAME}
|
|
|
|
CDTREL=7.0.0
|
|
|
|
CDTFEAT=7.0.0
|
2010-03-15 20:46:46 +00:00
|
|
|
CDTVER=201003151310
|
2010-02-28 22:30:08 +00:00
|
|
|
CDTNAME=cdt-master-${CDTREL}-I${CDTVER}.zip
|
|
|
|
CDTLOC=builds/${CDTREL}/I.I${CDTVER}/${CDTNAME}
|
|
|
|
if [ ! -f eclipse/plugins/org.eclipse.cdt.core_${CDTFEAT}.${CDTVER}.jar ]; then
|
|
|
|
echo "Getting CDT Runtime..."
|
|
|
|
wget "http://download.eclipse.org/tools/cdt/${CDTLOC}"
|
|
|
|
CDTTMP=`pwd`/tmp.$$
|
|
|
|
mkdir ${CDTTMP}
|
|
|
|
cd ${CDTTMP}
|
|
|
|
unzip ../${CDTNAME}
|
|
|
|
cd ..
|
|
|
|
#java -jar eclipse/startup.jar \
|
2010-02-28 22:40:50 +00:00
|
|
|
LAUNCHER=`ls eclipse/plugins/org.eclipse.equinox.launcher_*.jar | sort | tail -1`
|
2010-02-28 22:39:53 +00:00
|
|
|
java -jar ${LAUNCHER} \
|
2010-02-28 22:30:08 +00:00
|
|
|
-application org.eclipse.update.core.standaloneUpdate \
|
|
|
|
-command install \
|
|
|
|
-from file://${CDTTMP} \
|
|
|
|
-featureId org.eclipse.cdt.platform \
|
|
|
|
-version ${CDTFEAT}.${CDTVER}
|
2010-02-28 22:39:53 +00:00
|
|
|
java -jar ${LAUNCHER} \
|
2010-02-28 22:30:08 +00:00
|
|
|
-application org.eclipse.update.core.standaloneUpdate \
|
|
|
|
-command install \
|
|
|
|
-from file://${CDTTMP} \
|
|
|
|
-featureId org.eclipse.cdt \
|
|
|
|
-version ${CDTFEAT}.${CDTVER}
|
|
|
|
rm -rf ${CDTTMP}
|
|
|
|
rm ${CDTNAME}
|
|
|
|
fi
|
|
|
|
|
2006-09-29 22:28:05 +00:00
|
|
|
# checkout the basebuilder
|
2010-02-28 22:30:08 +00:00
|
|
|
baseBuilderTag=R36_M4
|
|
|
|
if [ ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.core_3.5.100.v20091210.jar \
|
|
|
|
-o ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.build_3.6.0.v20091204/pdebuild.jar \
|
|
|
|
-o ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.p2.metadata.generator_1.0.200.v20091019.jar ]; then
|
2006-09-29 22:28:05 +00:00
|
|
|
if [ -d org.eclipse.releng.basebuilder ]; then
|
2007-02-27 22:05:43 +00:00
|
|
|
echo "Re-getting basebuilder from CVS..."
|
2006-09-29 22:28:05 +00:00
|
|
|
rm -rf org.eclipse.releng.basebuilder
|
2007-02-27 22:05:43 +00:00
|
|
|
else
|
|
|
|
echo "Getting basebuilder from CVS..."
|
2006-09-29 22:28:05 +00:00
|
|
|
fi
|
2007-03-22 12:23:05 +00:00
|
|
|
cvs -Q -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse co -r ${baseBuilderTag} org.eclipse.releng.basebuilder
|
2007-02-28 10:06:37 +00:00
|
|
|
fi
|
|
|
|
if [ ! -f org.eclipse.releng.basebuilder/startup.jar ]; then
|
|
|
|
curdir2=`pwd`
|
|
|
|
cd org.eclipse.releng.basebuilder/plugins
|
|
|
|
if [ -h ../startup.jar ]; then
|
|
|
|
rm ../startup.jar
|
|
|
|
fi
|
2010-02-28 22:40:50 +00:00
|
|
|
LAUNCHER=`ls org.eclipse.equinox.launcher_*.jar | sort | tail -1`
|
2007-02-28 10:06:37 +00:00
|
|
|
if [ "${LAUNCHER}" != "" ]; then
|
|
|
|
echo "basebuilder: LAUNCHER=${LAUNCHER}"
|
|
|
|
ln -s plugins/${LAUNCHER} ../startup.jar
|
|
|
|
else
|
|
|
|
echo "basebuilder: NO LAUNCHER FOUND"
|
|
|
|
fi
|
|
|
|
cd ${curdir2}
|
2006-09-29 22:28:05 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# checkout the RSE builder
|
|
|
|
if [ -f org.eclipse.rse.build/CVS/Entries ]; then
|
2007-02-27 22:05:43 +00:00
|
|
|
echo "Updating org.eclipse.rse.build from CVS"
|
2006-09-29 22:28:05 +00:00
|
|
|
cd org.eclipse.rse.build
|
2007-02-27 22:05:43 +00:00
|
|
|
cvs -q update -dPR
|
2006-09-29 22:28:05 +00:00
|
|
|
cd ..
|
|
|
|
else
|
|
|
|
if [ -d org.eclipse.rse.build ]; then
|
2007-02-27 22:05:43 +00:00
|
|
|
echo "Re-getting org.eclipse.rse.build from CVS"
|
2006-09-29 22:28:05 +00:00
|
|
|
rm -rf org.eclipse.rse.build
|
2007-02-27 22:05:43 +00:00
|
|
|
else
|
|
|
|
echo "Getting org.eclipse.rse.build from CVS"
|
2006-09-29 22:28:05 +00:00
|
|
|
fi
|
2007-02-27 22:05:43 +00:00
|
|
|
cvs -q -d :pserver:anonymous@dev.eclipse.org:/cvsroot/dsdp co -Rd org.eclipse.rse.build org.eclipse.tm.rse/releng/org.eclipse.rse.build
|
2006-09-29 22:28:05 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# prepare directories for the build
|
2007-02-27 22:05:43 +00:00
|
|
|
echo "Preparing directories and symbolic links..."
|
2006-09-29 22:28:05 +00:00
|
|
|
if [ ! -d working/package ]; then
|
|
|
|
mkdir -p working/package
|
|
|
|
fi
|
|
|
|
if [ ! -d working/build ]; then
|
|
|
|
mkdir -p working/build
|
|
|
|
fi
|
2007-03-29 11:11:35 +00:00
|
|
|
if [ ! -d publish ]; then
|
2007-04-02 11:00:45 +00:00
|
|
|
D=/home/data/httpd/download.eclipse.org/dsdp/tm/downloads/drops
|
2007-05-08 16:35:09 +00:00
|
|
|
if [ -d ${D} ]; then ln -s ${D} publish; else mkdir publish; fi
|
2006-09-29 22:28:05 +00:00
|
|
|
fi
|
2007-03-29 11:11:35 +00:00
|
|
|
if [ ! -d testUpdates ]; then
|
2007-04-02 11:00:45 +00:00
|
|
|
D=/home/data/httpd/download.eclipse.org/dsdp/tm/testUpdates
|
2007-05-08 16:35:09 +00:00
|
|
|
if [ -d ${D} ]; then ln -s ${D} testUpdates; else mkdir testUpdates; fi
|
2006-09-29 22:28:05 +00:00
|
|
|
fi
|
2007-03-29 11:15:51 +00:00
|
|
|
if [ ! -d updates ]; then
|
2007-04-02 11:00:45 +00:00
|
|
|
D=/home/data/httpd/download.eclipse.org/dsdp/tm/updates
|
2007-05-08 16:35:09 +00:00
|
|
|
if [ -d ${D} ]; then ln -s ${D} updates; else mkdir updates; fi
|
2006-09-29 22:28:05 +00:00
|
|
|
fi
|
2007-03-29 11:11:35 +00:00
|
|
|
if [ ! -d staging ]; then
|
2007-04-02 11:00:45 +00:00
|
|
|
D=/home/data/httpd/download-staging.priv/dsdp/tm
|
2007-05-08 16:35:09 +00:00
|
|
|
if [ -d ${D} ]; then ln -s ${D} staging; else mkdir staging; fi
|
2007-01-17 19:17:14 +00:00
|
|
|
fi
|
2006-09-29 22:28:05 +00:00
|
|
|
|
|
|
|
# create symlinks as needed
|
2007-03-29 11:11:35 +00:00
|
|
|
if [ ! -h doit_irsbuild.sh ]; then
|
|
|
|
ln -s org.eclipse.rse.build/bin/doit_irsbuild.sh .
|
|
|
|
fi
|
|
|
|
if [ ! -h doit_nightly.sh ]; then
|
|
|
|
ln -s org.eclipse.rse.build/bin/doit_nightly.sh .
|
|
|
|
fi
|
2007-04-02 11:00:45 +00:00
|
|
|
if [ ! -h setup.sh ]; then
|
2007-05-08 16:36:09 +00:00
|
|
|
if [ -f setup.sh ]; then rm -f setup.sh; fi
|
2008-09-16 17:22:41 +00:00
|
|
|
ln -s org.eclipse.rse.build/setup.sh .
|
2007-03-29 11:11:35 +00:00
|
|
|
fi
|
2007-02-28 10:23:19 +00:00
|
|
|
chmod a+x doit_irsbuild.sh doit_nightly.sh
|
2006-09-29 22:28:05 +00:00
|
|
|
cd org.eclipse.rse.build
|
2007-03-29 11:11:35 +00:00
|
|
|
chmod a+x build.pl build.rb go.sh nightly.sh setup.sh
|
2006-09-29 22:28:05 +00:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Your build environment is now created."
|
|
|
|
echo ""
|
2007-02-28 10:23:19 +00:00
|
|
|
echo "Run \"./doit_irsbuild.sh I\" to create an I-build."
|
2006-09-29 22:28:05 +00:00
|
|
|
echo ""
|
|
|
|
echo "Test the testUpdates, then copy them to updates:"
|
|
|
|
echo "cd updates"
|
|
|
|
echo "rm -rf plugins features"
|
|
|
|
echo "cp -R ../testUpdates/plugins ."
|
|
|
|
echo "cp -R ../testUpdates/features ."
|
|
|
|
echo "cd bin"
|
2007-02-28 10:23:19 +00:00
|
|
|
echo "cvs update"
|
2006-09-29 22:28:05 +00:00
|
|
|
echo "./mkTestUpdates.sh"
|
|
|
|
|
|
|
|
exit 0
|