527
|
1 |
#!/bin/bash
|
|
2 |
|
|
3 |
# ------------------------------------------------------------------
|
|
4 |
|
|
5 |
thisDir=`dirname $0`
|
|
6 |
[ "$thisDir" = "." ] && thisDir=`pwd`
|
|
7 |
source $thisDir/../scripts/Utils.sh
|
|
8 |
|
|
9 |
# ------------------------------------------------------------------
|
|
10 |
#
|
|
11 |
# parse command line args
|
|
12 |
#
|
|
13 |
|
|
14 |
argsText="WORKSPACE:<folder> --CARBIDE_VERSION_2DIGITS:<value> --CARBIDE_VERSION_3DIGITS:<value> [--BUILD_NUM:<value>] --HG_SFL_HOST:<value> --HG_EPL_HOST:<value> --HG_REVISION:<value> --HG_USERNAME:<value> --HG_PASSWORD:<value> --ATF_REVISION:<value> --BASE_CARBIDE:<value>"
|
|
15 |
prepare_parse_args WORKSPACE CARBIDE_VERSION_2DIGITS CARBIDE_VERSION_3DIGITS BUILD_NUM HG_SFL_HOST HG_EPL_HOST HG_REVISION HG_USERNAME HG_PASSWORD ATF_REVISION BASE_CARBIDE > /tmp/$$.parse_args
|
|
16 |
source /tmp/$$.parse_args
|
|
17 |
rm -f /tmp/$$.parse_args
|
|
18 |
|
|
19 |
# ------------------------------------------------------------------
|
|
20 |
|
|
21 |
# NOTE: BUILD_ID and BUILD_NUMBER are set by Hudson
|
|
22 |
if [ "$BUILD_NUM" = "" ]; then
|
|
23 |
if [ "$BUILD_ID" = "" ]; then
|
|
24 |
BUILD_NUM=v`date +%Y%m%d%H%M`
|
|
25 |
else
|
|
26 |
BUILD_NUM=v`echo $BUILD_ID | sed "s/[-_]//g" | cut -c1-12`
|
|
27 |
BUILD_NUM=${BUILD_NUM}_$BUILD_NUMBER
|
|
28 |
fi
|
|
29 |
fi
|
|
30 |
LONG_VERSION=$CARBIDE_VERSION_3DIGITS.$BUILD_NUM
|
|
31 |
|
|
32 |
# change paths to unix style so cp will work correctly
|
|
33 |
thisDir=`cygpath -m $thisDir`
|
|
34 |
WORKSPACE=`cygpath -m $WORKSPACE`
|
|
35 |
CHECKOUT_FOLDER=$WORKSPACE/co
|
|
36 |
BUILD_FOLDER=$WORKSPACE/bld
|
|
37 |
BASE_CARBIDE=`cygpath -m $BASE_CARBIDE`
|
|
38 |
|
|
39 |
echo thisDir=$thisDir
|
|
40 |
echo WORKSPACE=$WORKSPACE
|
|
41 |
echo CHECKOUT_FOLDER=$CHECKOUT_FOLDER
|
|
42 |
echo BUILD_FOLDER=$BUILD_FOLDER
|
|
43 |
echo LONG_VERSION=$LONG_VERSION
|
|
44 |
echo BASE_CARBIDE=$BASE_CARBIDE
|
|
45 |
|
|
46 |
# create files that are R/W by all
|
|
47 |
umask 0
|
|
48 |
|
|
49 |
DO_ADT_LAYOUT=yes
|
|
50 |
DO_PDT_LAYOUT=yes
|
|
51 |
DO_PDL_LAYOUT=yes
|
|
52 |
DO_PUBLIC_UPDATE_SITE=yes
|
|
53 |
|
|
54 |
# ------------------------------------------------------------------
|
|
55 |
|
|
56 |
if [ "yes" = "yes" ]; then
|
|
57 |
if [ -d $BUILD_FOLDER ]; then
|
|
58 |
run cmd /C rmdir /S /Q `cygpath -w $BUILD_FOLDER`
|
|
59 |
fi
|
|
60 |
run mkdir -p $BUILD_FOLDER/features
|
|
61 |
run mkdir -p $BUILD_FOLDER/plugins
|
|
62 |
fi
|
|
63 |
|
|
64 |
# ------------------------------------------------------------------
|
|
65 |
|
|
66 |
run mkdir -p $CHECKOUT_FOLDER
|
|
67 |
|
|
68 |
# ------------------------------------------------------------------
|
|
69 |
|
|
70 |
if [ "yes" = "yes" ]; then
|
|
71 |
run rm -f $CHECKOUT_FOLDER/buildtags.txt
|
|
72 |
|
|
73 |
# dev/eclipseenv/buildlayout34 is too long; so, use a shorter path for this one
|
|
74 |
hg_host=$HG_EPL_HOST/dev/eclipseenv
|
|
75 |
hg_clone $CHECKOUT_FOLDER $CHECKOUT_FOLDER/buildtags.txt $HG_USERNAME $HG_PASSWORD $hg_host $HG_REVISION \
|
|
76 |
buildlayout34
|
|
77 |
|
|
78 |
hg_host=$HG_EPL_HOST
|
|
79 |
hg_clone $CHECKOUT_FOLDER $CHECKOUT_FOLDER/buildtags.txt $HG_USERNAME $HG_PASSWORD $hg_host $HG_REVISION \
|
|
80 |
dev/eclipseenv/eclipse \
|
|
81 |
dev/ide/carbidecpp
|
|
82 |
|
|
83 |
hg_host=$HG_SFL_HOST
|
|
84 |
hg_clone $CHECKOUT_FOLDER $CHECKOUT_FOLDER/buildtags.txt $HG_USERNAME $HG_PASSWORD $hg_host $HG_REVISION \
|
|
85 |
dev/ide/carbidecppplugins
|
|
86 |
|
|
87 |
hg_host=$HG_SFL_HOST
|
|
88 |
hg_clone $CHECKOUT_FOLDER $CHECKOUT_FOLDER/buildtags.txt $HG_USERNAME $HG_PASSWORD $hg_host default \
|
|
89 |
ana/dynaanaapps ana/staticanaapps ana/staticanamdw \
|
|
90 |
ana/compatanaapps ana/testcreationandmgmt
|
|
91 |
fi
|
|
92 |
|
|
93 |
# ------------------------------------------------------------------
|
|
94 |
|
|
95 |
if [ "yes" = "yes" ]; then
|
|
96 |
cd $BUILD_FOLDER
|
|
97 |
cat $thisDir/map_carbide.txt $thisDir/map_trace.txt $thisDir/map_cdk.txt $thisDir/map_adt.txt $thisDir/map_pdt.txt | grep -v "^#" | grep , | sed "s;^;run cp -pr $CHECKOUT_FOLDER/;" | sed "s;,; ;" > /tmp/$$.a
|
|
98 |
source /tmp/$$.a
|
|
99 |
rm -f /tmp/$$.a
|
|
100 |
fi
|
|
101 |
|
|
102 |
# ------------------------------------------------------------------
|
|
103 |
|
|
104 |
if [ "yes" = "yes" ]; then
|
|
105 |
unix2dos $CHECKOUT_FOLDER/buildtags.txt
|
|
106 |
run cp -p $CHECKOUT_FOLDER/buildtags.txt $BUILD_FOLDER/plugins/com.nokia.carbide.cpp/buildtags.txt
|
|
107 |
fi
|
|
108 |
|
|
109 |
# ------------------------------------------------------------------
|
|
110 |
|
|
111 |
if [ "yes" = "yes" ]; then
|
|
112 |
run rm -rf $BUILD_FOLDER/buildlayout34
|
|
113 |
run cp -pr $CHECKOUT_FOLDER/buildlayout34 $BUILD_FOLDER/buildlayout34
|
|
114 |
run cp -r $BASE_CARBIDE/plugins/com.nokia.carbide.cpp.support_* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/plugins/
|
|
115 |
run cp -r $BASE_CARBIDE/plugins/com.freescale.* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/plugins/
|
|
116 |
run cp -r $BASE_CARBIDE/plugins/com.nokia.carbide.cpp.x86build* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/plugins/
|
|
117 |
run cp -r $BASE_CARBIDE/configuration/qt $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/configuration/
|
|
118 |
run cp -r $BASE_CARBIDE/features/com.trolltech.qtcpp.feature_* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/features/
|
|
119 |
run cp -r $BASE_CARBIDE/plugins/com.trolltech.* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/plugins/
|
|
120 |
run cp -r $BASE_CARBIDE/features/org.eclipse.cdt.gnu.build_* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/features/
|
|
121 |
run cp -r $BASE_CARBIDE/features/org.eclipse.cdt.gnu.debug_* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/features/
|
|
122 |
run cp -r $BASE_CARBIDE/features/org.eclipse.cdt.platform_* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/features/
|
|
123 |
run cp -r $BASE_CARBIDE/features/org.eclipse.cdt_* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/features/
|
|
124 |
run cp -r $BASE_CARBIDE/plugins/org.eclipse.cdt_* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/plugins/
|
|
125 |
run cp -r $BASE_CARBIDE/plugins/org.eclipse.cdt.* $BUILD_FOLDER/buildlayout34/carbidecpp20devenv/plugins/
|
|
126 |
fi
|
|
127 |
|
|
128 |
ECLIPSE_HOME=$BUILD_FOLDER/buildlayout34/carbidecpp20devenv
|
|
129 |
[ -d "$ECLIPSE_HOME" ] || error_exit cannot find folder $ECLIPSE_HOME
|
|
130 |
ECLIPSE_BUILD_SCRIPTS=`ls -d $ECLIPSE_HOME/plugins/org.eclipse.pde.build_*/scripts`
|
|
131 |
echo ECLIPSE_HOME=$ECLIPSE_HOME
|
|
132 |
|
|
133 |
# ------------------------------------------------------------------
|
|
134 |
#
|
|
135 |
# remove update site from all feature.xml files except com.nokia.carbide.cpp/feature.xml
|
|
136 |
#
|
|
137 |
|
|
138 |
if [ "yes" = "yes" ]; then
|
|
139 |
run cd $BUILD_FOLDER
|
|
140 |
for name in `ls features/*/feature.xml | grep -v com.nokia.carbide.cpp/feature.xml`
|
|
141 |
do
|
|
142 |
remove_update_site_urls $name $BUILD_FOLDER/temp
|
|
143 |
done
|
|
144 |
fi
|
|
145 |
|
|
146 |
# ------------------------------------------------------------------
|
|
147 |
|
|
148 |
if [ "yes" = "yes" ]; then
|
|
149 |
run rm -rf $BUILD_FOLDER/Carbide.c
|
|
150 |
|
|
151 |
cat $thisDir/product.xml \
|
|
152 |
| sed "s/\${CARBIDE_VERSION_2DIGITS}/${CARBIDE_VERSION_2DIGITS}/g" \
|
|
153 |
| sed "s/\${CARBIDE_VERSION_3DIGITS}/${CARBIDE_VERSION_3DIGITS}/g" \
|
|
154 |
> $BUILD_FOLDER/product.xml
|
|
155 |
|
|
156 |
must_run $ECLIPSE_HOME/eclipsec.exe -nosplash --launcher.suppressErrors -application org.eclipse.ant.core.antRunner \
|
|
157 |
-buildfile $ECLIPSE_BUILD_SCRIPTS/productBuild/productBuild.xml \
|
|
158 |
-Dbuilder=$thisDir/config \
|
|
159 |
-Dproduct=$BUILD_FOLDER/product.xml \
|
|
160 |
-DbuildDirectory=$BUILD_FOLDER \
|
|
161 |
-DbaseLocation=$ECLIPSE_HOME \
|
|
162 |
-DforceContextQualifier=$BUILD_NUM \
|
|
163 |
-DrepoDirectory=$BUILD_FOLDER/layout/repository \
|
|
164 |
-DbuildNumber=$BUILD_NUM \
|
|
165 |
-consoleLog
|
|
166 |
fi
|
|
167 |
|
|
168 |
# ------------------------------------------------------------------
|
|
169 |
#
|
|
170 |
# extract Carbide.c from the Eclipse PDE build
|
|
171 |
#
|
|
172 |
|
|
173 |
if [ "yes" = "yes" ]; then
|
|
174 |
run rm -rf $BUILD_FOLDER/parts_carbide
|
|
175 |
run mkdir -p $BUILD_FOLDER/parts_carbide
|
|
176 |
|
|
177 |
# unzip our product and the packaged eclipse stuff into the product layout
|
|
178 |
run /bin/unzip -o $BUILD_FOLDER/Carbide.c/Carbide.c-win32.win32.x86.zip -d $BUILD_FOLDER/parts_carbide
|
|
179 |
|
|
180 |
# remove the configuration directory and p2 plugins (ONLY DO THIS FOR NON_P2 builds)
|
|
181 |
rm -rf $BUILD_FOLDER/parts_carbide/eclipse/configuration
|
|
182 |
rm -rf $BUILD_FOLDER/parts_carbide/eclipse/features/org.eclipse.equinox.p2.*
|
|
183 |
rm -rf $BUILD_FOLDER/parts_carbide/eclipse/plugins/org.eclipse.equinox.p2.*
|
|
184 |
rm -rf $BUILD_FOLDER/parts_carbide/eclipse/plugins/org.eclipse.ecf*
|
|
185 |
rm -rf $BUILD_FOLDER/parts_carbide/eclipse/plugins/org.eclipse.equinox.frameworkadmin*
|
|
186 |
rm -rf $BUILD_FOLDER/parts_carbide/eclipse/plugins/org.sat4j.*
|
|
187 |
rm -rf $BUILD_FOLDER/parts_carbide/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator*
|
|
188 |
rm -rf $BUILD_FOLDER/parts_carbide/eclipse/dropins
|
|
189 |
rm -rf $BUILD_FOLDER/parts_carbide/eclipse/p2
|
|
190 |
fi
|
|
191 |
|
|
192 |
# ------------------------------------------------------------------
|
|
193 |
#
|
|
194 |
# remove <includes id="<feature>.source" /> from all feature.xml files
|
|
195 |
#
|
|
196 |
|
|
197 |
if [ "yes" = "yes" ]; then
|
|
198 |
run cd $BUILD_FOLDER/parts_carbide/eclipse/features
|
|
199 |
for name in */feature.xml
|
|
200 |
do
|
|
201 |
xml2oneline $name | grep "\<includes.id=.*.source\"" > /dev/null
|
|
202 |
if [ $? -eq 0 ]; then
|
|
203 |
xml2oneline $name > temp
|
|
204 |
echo grep -v "\<includes.id=.*.source\"" $name
|
|
205 |
grep -v "\<includes.id=.*.source\"" temp > $name
|
|
206 |
unix2dos $name
|
|
207 |
fi
|
|
208 |
done
|
|
209 |
rm -f temp
|
|
210 |
run cd $BUILD_FOLDER
|
|
211 |
fi
|
|
212 |
|
|
213 |
# ------------------------------------------------------------------
|
|
214 |
|
|
215 |
if [ "yes" = "yes" ]; then
|
|
216 |
# copy eclipsec.exe
|
|
217 |
run cp $ECLIPSE_HOME/eclipsec.exe $BUILD_FOLDER/parts_carbide/eclipse
|
|
218 |
|
|
219 |
# copy carbide.c++.ini to eclipse.ini (for eclipsec.exe)
|
|
220 |
run cp -pr $BUILD_FOLDER/parts_carbide/eclipse/Carbide.c++.${CARBIDE_VERSION_2DIGITS}.ini $BUILD_FOLDER/parts_carbide/eclipse/eclipse.ini
|
|
221 |
|
|
222 |
# manually copy over the vista and 64 bit fragments until we figure out how to include them as part of the product build.
|
|
223 |
run cp -pr $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher.wpf.win32.x86* $BUILD_FOLDER/parts_carbide/eclipse/plugins
|
|
224 |
run cp $ECLIPSE_HOME/plugins/org.eclipse.swt.wpf.win32.x86_* $BUILD_FOLDER/parts_carbide/eclipse/plugins
|
|
225 |
run cp -pr $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64* $BUILD_FOLDER/parts_carbide/eclipse/plugins
|
|
226 |
run cp $ECLIPSE_HOME/plugins/org.eclipse.swt.win32.win32.x86_64_* $BUILD_FOLDER/parts_carbide/eclipse/plugins
|
|
227 |
|
|
228 |
run mkdir -p $BUILD_FOLDER/parts_carbide/eclipse/jre
|
|
229 |
run cp -r $BASE_CARBIDE/jre $BUILD_FOLDER/parts_carbide/eclipse/
|
|
230 |
|
|
231 |
# copy the Qt feature/plugins into the product layout
|
|
232 |
run mkdir -p $BUILD_FOLDER/parts_carbide/eclipse/configuration/qt
|
|
233 |
run cp -r $BASE_CARBIDE/configuration/qt $BUILD_FOLDER/parts_carbide/eclipse/configuration/
|
|
234 |
run cp -r $BASE_CARBIDE/features/com.trolltech.qtcpp.feature_* $BUILD_FOLDER/parts_carbide/eclipse/features
|
|
235 |
run cp -r $BASE_CARBIDE/plugins/com.trolltech.* $BUILD_FOLDER/parts_carbide/eclipse/plugins
|
|
236 |
|
|
237 |
# copy the Trace plugins into the product layout
|
|
238 |
run cp -r $BASE_CARBIDE/plugins/com.nokia.tcf_*/os $BUILD_FOLDER/parts_carbide/eclipse/plugins/com.nokia.tcf_*
|
|
239 |
|
|
240 |
# copy the TRK plugins into the product layout
|
|
241 |
run cp -r $BASE_CARBIDE/plugins/com.nokia.carbide.trk.support_*/os $BUILD_FOLDER/parts_carbide/eclipse/plugins/com.nokia.carbide.trk.support_*
|
|
242 |
|
|
243 |
run mkdir -p $BUILD_FOLDER/parts_carbide/eclipse/EULA
|
|
244 |
run cp -p $CHECKOUT_FOLDER/dev/ide/carbidecpp/core/carbide_releases/EULA/carbide_eula.txt $BUILD_FOLDER/parts_carbide/eclipse/EULA/carbide_eula.txt
|
|
245 |
|
|
246 |
run mkdir -p $BUILD_FOLDER/parts_carbide/eclipse/readme
|
|
247 |
run cp -p $CHECKOUT_FOLDER/dev/ide/carbidecpp/core/carbide_releases/readme/readme_sdks.html $BUILD_FOLDER/parts_carbide/eclipse/readme/readme_sdks.html
|
|
248 |
run cp -p $CHECKOUT_FOLDER/dev/ide/carbidecpp/core/carbide_releases/readme/background_carbide.jpg $BUILD_FOLDER/parts_carbide/eclipse/readme/background_carbide.jpg
|
|
249 |
|
|
250 |
run mkdir -p $BUILD_FOLDER/parts_carbide/eclipse/x86Build
|
|
251 |
run cp -r $BASE_CARBIDE/x86Build/env_switch $BUILD_FOLDER/parts_carbide/eclipse/x86Build/env_switch
|
|
252 |
run cp -r $BASE_CARBIDE/x86Build/Release_Notes $BUILD_FOLDER/parts_carbide/eclipse/x86Build/Release_Notes
|
|
253 |
run cp -r $BASE_CARBIDE/x86Build/Symbian_Support $BUILD_FOLDER/parts_carbide/eclipse/x86Build/Symbian_Support
|
|
254 |
run cp -r $BASE_CARBIDE/x86Build/Symbian_Tools $BUILD_FOLDER/parts_carbide/eclipse/x86Build/Symbian_Tools
|
|
255 |
|
|
256 |
run mkdir -p $BUILD_FOLDER/parts_carbide/eclipse/configuration
|
|
257 |
run cp -p $CHECKOUT_FOLDER/dev/ide/carbidecpp/core/carbide_releases/configuration/server.properties $BUILD_FOLDER/parts_carbide/eclipse/configuration/server.properties
|
|
258 |
run cp -p $CHECKOUT_FOLDER/dev/ide/carbidecpp/core/carbide_releases/configuration/run_env_update.bat $BUILD_FOLDER/parts_carbide/eclipse/configuration/run_env_update.bat
|
|
259 |
run cp -p $BUILD_FOLDER/plugins/com.nokia.carbide.cpp/config.ini $BUILD_FOLDER/parts_carbide/eclipse/configuration/config.ini
|
|
260 |
|
|
261 |
chmod -R 777 $BUILD_FOLDER/parts_carbide
|
|
262 |
fi
|
|
263 |
|
|
264 |
# ------------------------------------------------------------------
|
|
265 |
|
|
266 |
if [ "$DO_PUBLIC_UPDATE_SITE" = "yes" ]; then
|
|
267 |
# run entire product layout through the p2 metadata generator to make the update site
|
|
268 |
run $ECLIPSE_HOME/eclipsec.exe -nosplash --launcher.suppressErrors -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator \
|
|
269 |
-source $BUILD_FOLDER/parts_carbide/eclipse \
|
|
270 |
-metadataRepository file:$BUILD_FOLDER/parts_carbide/update_site -metadataRepositoryName "Carbide.c++ Metadata Repository" \
|
|
271 |
-artifactRepository file:$BUILD_FOLDER/parts_carbide/update_site -artifactRepositoryName "Carbide.c++ Artifact Repository" \
|
|
272 |
-compress -noDefaultIUs -publishArtifacts -root com.nokia.carbide.cpp.product -rootVersion ${CARBIDE_VERSION_3DIGITS}.$BUILD_NUM -consoleLog -vmargs -Xmx512m
|
|
273 |
|
|
274 |
rm -rf $BUILD_FOLDER/parts_carbide/update_site/artifacts.jar
|
|
275 |
rm -rf $BUILD_FOLDER/parts_carbide/update_site/content.jar
|
|
276 |
fi
|
|
277 |
|
|
278 |
# ------------------------------------------------------------------
|
|
279 |
|
|
280 |
if [ "yes" = "yes" ]; then
|
|
281 |
run cd $BUILD_FOLDER
|
|
282 |
run rm -rf $BUILD_FOLDER/parts_carbide_base
|
|
283 |
run mv $BUILD_FOLDER/parts_carbide $BUILD_FOLDER/parts_carbide_base
|
|
284 |
|
|
285 |
move_plugins $BUILD_FOLDER/parts_carbide_base/eclipse $BUILD_FOLDER/parts_carbide/eclipse $thisDir/map_adt.txt \
|
|
286 |
$thisDir/map_cdk.txt $thisDir/map_pdt.txt
|
|
287 |
move_plugins $BUILD_FOLDER/parts_carbide_base/update_site $BUILD_FOLDER/parts_carbide/update_site $thisDir/map_adt.txt \
|
|
288 |
$thisDir/map_cdk.txt $thisDir/map_pdt.txt
|
|
289 |
|
|
290 |
run rm -rf $BUILD_FOLDER/parts_carbide_source
|
|
291 |
run mkdir -p $BUILD_FOLDER/parts_carbide_source/eclipse/features
|
|
292 |
run mkdir -p $BUILD_FOLDER/parts_carbide_source/eclipse/plugins
|
|
293 |
run mkdir -p $BUILD_FOLDER/parts_carbide_source/update_site/features
|
|
294 |
run mkdir -p $BUILD_FOLDER/parts_carbide_source/update_site/plugins
|
|
295 |
run mv $BUILD_FOLDER/parts_carbide_base/eclipse/features/*.source_* $BUILD_FOLDER/parts_carbide_source/eclipse/features
|
|
296 |
run mv $BUILD_FOLDER/parts_carbide_base/eclipse/plugins/*.source_* $BUILD_FOLDER/parts_carbide_source/eclipse/plugins
|
|
297 |
if [ "$DO_PUBLIC_UPDATE_SITE" = "yes" ]; then
|
|
298 |
run mv $BUILD_FOLDER/parts_carbide_base/update_site/features/*.source_* $BUILD_FOLDER/parts_carbide_source/update_site/features
|
|
299 |
run mv $BUILD_FOLDER/parts_carbide_base/update_site/plugins/*.source_* $BUILD_FOLDER/parts_carbide_source/update_site/plugins
|
|
300 |
fi
|
|
301 |
fi
|
|
302 |
|
|
303 |
# ------------------------------------------------------------------
|
|
304 |
|
|
305 |
if [ "yes" = "yes" ]; then
|
|
306 |
run rm -rf $BUILD_FOLDER/parts_eclispe_home
|
|
307 |
run mkdir -p $BUILD_FOLDER/parts_eclispe_home/eclipse
|
|
308 |
|
|
309 |
run cp -pr $CHECKOUT_FOLDER/buildlayout34/carbidecpp20devenv/features $BUILD_FOLDER/parts_eclispe_home/eclipse
|
|
310 |
run cp -pr $CHECKOUT_FOLDER/buildlayout34/carbidecpp20devenv/plugins $BUILD_FOLDER/parts_eclispe_home/eclipse
|
|
311 |
|
|
312 |
# remove the and p2 plugins (ONLY DO THIS FOR NON_P2 builds)
|
|
313 |
rm -rf $BUILD_FOLDER/parts_eclispe_home/eclipse/features/org.eclipse.equinox.p2.*
|
|
314 |
rm -rf $BUILD_FOLDER/parts_eclispe_home/eclipse/plugins/org.eclipse.equinox.p2.*
|
|
315 |
rm -rf $BUILD_FOLDER/parts_eclispe_home/eclipse/plugins/org.eclipse.ecf*
|
|
316 |
rm -rf $BUILD_FOLDER/parts_eclispe_home/eclipse/plugins/org.eclipse.equinox.frameworkadmin*
|
|
317 |
rm -rf $BUILD_FOLDER/parts_eclispe_home/eclipse/plugins/org.sat4j.*
|
|
318 |
rm -rf $BUILD_FOLDER/parts_eclispe_home/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator*
|
|
319 |
|
|
320 |
# run parts_eclispe_home layout through the p2 metadata generator to make the update site
|
|
321 |
# only the features and plugins are required, all features and plugins are required to resolve dependencies
|
|
322 |
run $ECLIPSE_HOME/eclipsec.exe -nosplash --launcher.suppressErrors -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator \
|
|
323 |
-source $BUILD_FOLDER/parts_eclispe_home/eclipse \
|
|
324 |
-metadataRepository file:$BUILD_FOLDER/parts_eclispe_home/update_site -metadataRepositoryName "Carbide.c++ Metadata Repository" \
|
|
325 |
-artifactRepository file:$BUILD_FOLDER/parts_eclispe_home/update_site -artifactRepositoryName "Carbide.c++ Artifact Repository" \
|
|
326 |
-compress -noDefaultIUs -publishArtifacts -root com.nokia.carbide.cpp.product -rootVersion ${CARBIDE_VERSION_3DIGITS}.$BUILD_NUM -consoleLog -vmargs -Xmx512m
|
|
327 |
|
|
328 |
# bug 8732 - use org.junit4_4.3.1.jar from the Eclipse update site
|
|
329 |
#run cp -p $CHECKOUT_FOLDER/internal/eclipseenv/buildlayout34/update_site/plugins/org.junit4_4.3.1.jar $BUILD_FOLDER/parts_eclispe_home/update_site/plugins
|
|
330 |
|
|
331 |
rm -rf $BUILD_FOLDER/parts_eclispe_home/update_site/artifacts.jar
|
|
332 |
rm -rf $BUILD_FOLDER/parts_eclispe_home/update_site/content.jar
|
|
333 |
rm -rf $BUILD_FOLDER/parts_eclispe_home/update_site/binary
|
|
334 |
fi
|
|
335 |
|
|
336 |
# ------------------------------------------------------------------
|
|
337 |
#
|
|
338 |
# Now, we have the parts needed to make the layouts
|
|
339 |
#
|
|
340 |
# $BUILD_FOLDER/parts_carbide_base features and plugins for all layouts
|
|
341 |
# $BUILD_FOLDER/parts_carbide_source features and plugins for source only
|
|
342 |
# $BUILD_FOLDER/parts_carbide features and plugins for multiple layouts, use map_adt.txt, map_cdk.txt, map_pdt.txt
|
|
343 |
# $BUILD_FOLDER/parts_eclispe_home features and plugins for CDK, use map_dev_kit.txt
|
|
344 |
|
|
345 |
# ------------------------------------------------------------------
|
|
346 |
|
|
347 |
if [ "yes" = "yes" ]; then
|
|
348 |
run rm -rf $BUILD_FOLDER/output_zips
|
|
349 |
run mkdir $BUILD_FOLDER/output_zips
|
|
350 |
fi
|
|
351 |
|
|
352 |
# ------------------------------------------------------------------
|
|
353 |
#
|
|
354 |
# make the ADT layout
|
|
355 |
#
|
|
356 |
|
|
357 |
if [ "$DO_ADT_LAYOUT" = "yes" ]; then
|
|
358 |
run rm -rf $BUILD_FOLDER/layout_adt
|
|
359 |
run mkdir -p $BUILD_FOLDER/layout_adt
|
|
360 |
|
|
361 |
run cp -pr $BUILD_FOLDER/parts_carbide_base/eclipse $BUILD_FOLDER/layout_adt
|
|
362 |
copy_plugins $BUILD_FOLDER/parts_carbide/eclipse $BUILD_FOLDER/layout_adt/eclipse $thisDir/map_adt.txt
|
|
363 |
|
|
364 |
run cd $BUILD_FOLDER/layout_adt/eclipse
|
|
365 |
run /bin/zip -r $BUILD_FOLDER/output_zips/Carbide.c_ADT_layout_$LONG_VERSION.zip .eclipseproduct *
|
|
366 |
fi
|
|
367 |
|
|
368 |
# ------------------------------------------------------------------
|
|
369 |
#
|
|
370 |
# make the PDT layout
|
|
371 |
#
|
|
372 |
|
|
373 |
if [ "$DO_PDT_LAYOUT" = "yes" ]; then
|
|
374 |
run rm -rf $BUILD_FOLDER/layout_pdt
|
|
375 |
run mkdir -p $BUILD_FOLDER/layout_pdt
|
|
376 |
|
|
377 |
run cp -pr $BUILD_FOLDER/parts_carbide_base/eclipse $BUILD_FOLDER/layout_pdt
|
|
378 |
copy_plugins $BUILD_FOLDER/parts_carbide/eclipse $BUILD_FOLDER/layout_pdt/eclipse $thisDir/map_adt.txt $thisDir/map_pdt.txt
|
|
379 |
|
|
380 |
run cd $BUILD_FOLDER/layout_pdt/eclipse
|
|
381 |
run /bin/zip -r $BUILD_FOLDER/output_zips/Carbide.c_PDT_layout_$LONG_VERSION.zip .eclipseproduct *
|
|
382 |
fi
|
|
383 |
|
|
384 |
# ------------------------------------------------------------------
|
|
385 |
#
|
|
386 |
# make the PDL layout
|
|
387 |
#
|
|
388 |
|
|
389 |
if [ "$DO_PDL_LAYOUT" = "yes" ]; then
|
|
390 |
run rm -rf $BUILD_FOLDER/layout_pdl
|
|
391 |
run mkdir -p $BUILD_FOLDER/layout_pdl
|
|
392 |
|
|
393 |
# ADT
|
|
394 |
run cp -pr $BUILD_FOLDER/parts_carbide_base/eclipse $BUILD_FOLDER/layout_pdl
|
|
395 |
copy_plugins $BUILD_FOLDER/parts_carbide/eclipse $BUILD_FOLDER/layout_pdl/eclipse $thisDir/map_adt.txt
|
|
396 |
|
|
397 |
# CDK
|
|
398 |
run cp -pr $BUILD_FOLDER/parts_carbide_source/eclipse $BUILD_FOLDER/layout_pdl
|
|
399 |
copy_plugins $BUILD_FOLDER/parts_carbide/eclipse $BUILD_FOLDER/layout_pdl/eclipse $thisDir/map_cdk.txt
|
|
400 |
copy_plugins $BUILD_FOLDER/parts_eclispe_home/eclipse $BUILD_FOLDER/layout_pdl/eclipse $thisDir/map_dev_kit.txt
|
|
401 |
|
|
402 |
run cd $BUILD_FOLDER/layout_pdl/eclipse
|
|
403 |
run /bin/zip -r $BUILD_FOLDER/output_zips/Carbide.c_PDL_layout_$LONG_VERSION.zip .eclipseproduct *
|
|
404 |
fi
|
|
405 |
|
|
406 |
# ------------------------------------------------------------------
|
|
407 |
#
|
|
408 |
# make the public update site
|
|
409 |
#
|
|
410 |
|
|
411 |
if [ "$DO_PUBLIC_UPDATE_SITE" = "yes" ]; then
|
|
412 |
run rm -rf $BUILD_FOLDER/layout_public
|
|
413 |
run mkdir -p $BUILD_FOLDER/layout_public
|
|
414 |
|
|
415 |
# ADT, PDT
|
|
416 |
run cp -pr $BUILD_FOLDER/parts_carbide_base/update_site $BUILD_FOLDER/layout_public
|
|
417 |
copy_plugins $BUILD_FOLDER/parts_carbide/update_site $BUILD_FOLDER/layout_public/update_site $thisDir/map_adt.txt $thisDir/map_pdt.txt
|
|
418 |
|
|
419 |
# CDK
|
|
420 |
run cp -pr $BUILD_FOLDER/parts_carbide_source/update_site $BUILD_FOLDER/layout_public
|
|
421 |
copy_plugins $BUILD_FOLDER/parts_carbide/update_site $BUILD_FOLDER/layout_public/update_site $thisDir/map_cdk.txt
|
|
422 |
copy_plugins $BUILD_FOLDER/parts_eclispe_home/update_site $BUILD_FOLDER/layout_public/update_site $thisDir/map_dev_kit.txt
|
|
423 |
|
|
424 |
cat $CHECKOUT_FOLDER/dev/ide/carbidecpp/automation/product_builder/carbide.c/site.xml \
|
|
425 |
| sed "s/\${QUALIFIER}/$BUILD_NUM/g" \
|
|
426 |
| sed "s/\${CARBIDE_VERSION_2DIGITS}/${CARBIDE_VERSION_2DIGITS}/g" \
|
|
427 |
| sed "s/\${CARBIDE_VERSION_3DIGITS}/${CARBIDE_VERSION_3DIGITS}/g" \
|
|
428 |
> $BUILD_FOLDER/layout_public/update_site/site.xml
|
|
429 |
|
|
430 |
run cd $BUILD_FOLDER/layout_public/update_site
|
|
431 |
run /bin/zip -r $BUILD_FOLDER/output_zips/Carbide.c_update_site_$LONG_VERSION.zip site.xml features plugins
|
|
432 |
fi
|
|
433 |
|
|
434 |
# ------------------------------------------------------------------
|
|
435 |
|
|
436 |
cd $BUILD_FOLDER/output_zips
|
|
437 |
|
|
438 |
run cp -p $CHECKOUT_FOLDER/buildtags.txt buildtags.txt
|
|
439 |
|
|
440 |
cat $CHECKOUT_FOLDER/buildtags.txt >> map.txt
|
|
441 |
echo >> map.txt
|
|
442 |
cat $thisDir/map* | cut -d"," -f1 | sort | sed "s/ *//" | grep -v ^$ >> map.txt
|
|
443 |
unix2dos map.txt
|
|
444 |
|
|
445 |
ls > artifacts.txt
|
|
446 |
echo env:BUILD_NUMBER=$BUILD_NUMBER >> artifacts.txt
|
|
447 |
echo env:HOSTNAME=`hostname` >> artifacts.txt
|
|
448 |
echo env:HUDSON_URL=$HUDSON_URL >> artifacts.txt
|
|
449 |
echo env:JOB_NAME=$JOB_NAME >> artifacts.txt
|
|
450 |
echo env:PERMALINK=$HUDSON_URL/job/$JOB_NAME/$BUILD_NUMBER/ >> artifacts.txt
|
|
451 |
echo env:WORKSPACE=`cygpath -m $WORKSPACE` >> artifacts.txt
|
|
452 |
unix2dos artifacts.txt
|
|
453 |
|
|
454 |
# ------------------------------------------------------------------
|
|
455 |
|
|
456 |
echo exit $total_errors
|
|
457 |
exit $total_errors
|