1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-14 20:45:22 +02:00
cdt/releng/org.eclipse.rse.build/setup.sh

274 lines
8.6 KiB
Bash
Raw Normal View History

2006-09-29 22:28:05 +00:00
#!/bin/sh
2006-11-09 12:34:44 +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
# 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-06-05 21:51:49 +00:00
ep_ver=3.6RC4
ep_date="-201006031500"
2008-06-05 21:03:21 +00:00
P2_disabled=false
2008-06-06 01:23:18 +00:00
P2_no_dropins=false
2010-06-05 21:51:49 +00:00
if [ ! -f eclipse/plugins/org.eclipse.swt_3.6.0.v3650b.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
if [ -d eclipse-${ep_ver}-${ep_arch} ]; then
rm -rf eclipse-${ep_ver}-${ep_arch}
2007-03-29 11:01:11 +00:00
fi
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
# 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"
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
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
if [ ! -f eclipse/startup.jar ]; then
2007-02-27 22:05:43 +00:00
curdir2=`pwd`
cd eclipse/plugins
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`
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-06 01:23:18 +00:00
if ${P2_no_dropins} ; then
#P2 disabled?
2008-06-05 21:06:01 +00:00
DROPIN=.
DROPUP=.
else
#P2 enabled
2008-06-05 21:06:01 +00:00
DROPIN=eclipse/dropins
DROPUP=../..
fi
# EMF 2.5.0
2008-09-16 17:22:41 +00:00
EMFBRANCH=2.5.0
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
# Need EMF 2.4 SDK for Service Discovery ISV Docs Backlinks
echo "Getting EMF SDK..."
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
cd ${DROPUP}
2006-09-29 22:28:05 +00:00
fi
2010-05-20 04:12:29 +00:00
if [ ! -f eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/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"
unzip -o eclipse-test-framework-${ep_ver}.zip
rm eclipse-test-framework-${ep_ver}.zip
fi
2008-06-05 21:06:01 +00:00
if [ ! -f ${DROPIN}/eclipse/plugins/gnu.io.rxtx_2.1.7.4_v20071016.jar ]; then
echo "Getting RXTX..."
cd ${DROPIN}
2010-05-20 04:12:29 +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
wget "http://download.eclipse.org/athena/runnables/RXTX-runtime-I20071016-1945.zip"
unzip -o RXTX-runtime-I20071016-1945.zip
rm RXTX-runtime-I20071016-1945.zip
cd ${DROPUP}
2007-01-17 19:38:27 +00:00
fi
2006-09-29 22:28:05 +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-06-05 21:51:49 +00:00
CDTVER=201006041510
CDTNAME=cdt-master-${CDTREL}-I${CDTVER}.zip
CDTLOC=builds/${CDTREL}/I.I${CDTVER}/${CDTNAME}
2010-03-15 20:56:03 +00:00
if [ ! -f eclipse/plugins/org.eclipse.cdt_${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} \
-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} \
-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
baseBuilderTag=R36_RC2
if [ ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.core_3.6.0.v20100519.jar \
-o ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.build_3.6.0.v20100512/pdebuild.jar \
-o ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.p2.metadata.generator_1.0.200.v20100503a.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
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`
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
2010-03-16 12:41:37 +00:00
cvs -q update -A -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
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
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
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
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
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
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 ""
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"
echo "cvs update"
2006-09-29 22:28:05 +00:00
echo "./mkTestUpdates.sh"
exit 0