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