Skip to content
Snippets Groups Projects
Commit ec4f5ade authored by AndreyL ProductEngine's avatar AndreyL ProductEngine
Browse files

Merged in oz_linden/viewer-build

parents 8ba372c8 b779ca0a
No related branches found
No related tags found
No related merge requests found
...@@ -16,12 +16,6 @@ ...@@ -16,12 +16,6 @@
# * The special style in which python is invoked is intentional to permit # * The special style in which python is invoked is intentional to permit
# use of a native python install on windows - which requires paths in DOS form # use of a native python install on windows - which requires paths in DOS form
check_for()
{
if [ -e "$2" ]; then found_dict='FOUND'; else found_dict='MISSING'; fi
echo "$1 ${found_dict} '$2' " 1>&2
}
build_dir_Darwin() build_dir_Darwin()
{ {
echo build-darwin-i386 echo build-darwin-i386
...@@ -101,13 +95,14 @@ pre_build() ...@@ -101,13 +95,14 @@ pre_build()
&& [ -r "$master_message_template_checkout/message_template.msg" ] \ && [ -r "$master_message_template_checkout/message_template.msg" ] \
&& template_verifier_master_url="-DTEMPLATE_VERIFIER_MASTER_URL=file://$master_message_template_checkout/message_template.msg" && template_verifier_master_url="-DTEMPLATE_VERIFIER_MASTER_URL=file://$master_message_template_checkout/message_template.msg"
"$autobuild" configure -c $variant -- \ "$autobuild" configure --quiet -c $variant -- \
-DPACKAGE:BOOL=ON \ -DPACKAGE:BOOL=ON \
-DRELEASE_CRASH_REPORTING:BOOL=ON \ -DRELEASE_CRASH_REPORTING:BOOL=ON \
-DVIEWER_CHANNEL:STRING="\"$viewer_channel\"" \ -DVIEWER_CHANNEL:STRING="\"$viewer_channel\"" \
-DGRID:STRING="\"$viewer_grid\"" \ -DGRID:STRING="\"$viewer_grid\"" \
-DLL_TESTS:BOOL="$run_tests" \ -DLL_TESTS:BOOL="$run_tests" \
-DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url -DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url \
|| fatal "$variant configuration failed"
end_section "Configure $variant" end_section "Configure $variant"
} }
...@@ -146,52 +141,46 @@ build() ...@@ -146,52 +141,46 @@ build()
local variant="$1" local variant="$1"
if $build_viewer if $build_viewer
then then
"$autobuild" build --no-configure -c $variant "$autobuild" build --no-configure -c $variant || fatal "failed building $variant"
build_ok=$?
# Run build extensions # Run build extensions
if [ $build_ok -eq 0 -a -d ${build_dir}/packages/build-extensions ]; then if [ $build_ok -eq 0 -a -d ${build_dir}/packages/build-extensions ]
for extension in ${build_dir}/packages/build-extensions/*.sh; do then
for extension in ${build_dir}/packages/build-extensions/*.sh
do
begin_section "Extension $extension" begin_section "Extension $extension"
. $extension . $extension
end_section "Extension $extension" end_section "Extension $extension"
if [ $build_ok -ne 0 ]; then
break
fi
done done
fi fi
# *TODO: Make this a build extension. # *TODO: Make this a build extension.
package_llphysicsextensions_tpv package_llphysicsextensions_tpv || fatal "failed building llphysicsextensions packages"
tpvlib_build_ok=$?
if [ $build_ok -eq 0 -a $tpvlib_build_ok -eq 0 ] echo true >"$build_dir"/build_ok
then else
echo "Skipping build due to configuration build_viewer=${build_viewer}"
echo true >"$build_dir"/build_ok echo true >"$build_dir"/build_ok
else
echo false >"$build_dir"/build_ok
fi
fi fi
} }
# Check to see if we were invoked from the wrapper, if not, re-exec ourselves from there ################################################################
if [ "x$arch" = x ] # Start of the actual script
################################################################
# Check to see if we were invoked from the master buildscripts wrapper, if not, fail
if [ "x${BUILDSCRIPTS_SUPPORT_FUNCTIONS}" = x ]
then then
top=`hg root` echo "This script relies on being run by the master Linden Lab buildscripts" 1>&2
if [ -x "$top/../buildscripts/hg/bin/build.sh" ]
then
exec "$top/../buildscripts/hg/bin/build.sh" "$top"
else
cat <<EOF
This script, if called in a development environment, requires that the branch
independent build script repository be checked out next to this repository.
This repository is located at http://bitbucket.org/lindenlabinternal/sl-buildscripts
EOF
exit 1 exit 1
fi
fi fi
# Check to see if we're skipping the platform # Check to see if we're skipping the platform
eval '$build_'"$arch" || pass if ! eval '$build_'"$arch"
then
record_event "building on architecture $arch is disabled"
pass
fi
# ensure AUTOBUILD is in native path form for child processes # ensure AUTOBUILD is in native path form for child processes
AUTOBUILD="$(native_path "$AUTOBUILD")" AUTOBUILD="$(native_path "$AUTOBUILD")"
...@@ -204,7 +193,7 @@ then ...@@ -204,7 +193,7 @@ then
fi fi
# load autobuild provided shell functions and variables # load autobuild provided shell functions and variables
eval "$("$autobuild" source_environment)" eval "$("$autobuild" --quiet source_environment)"
# something about the additional_packages mechanism messes up buildscripts results.py on Linux # something about the additional_packages mechanism messes up buildscripts results.py on Linux
# since we don't care about those packages on Linux, just zero it out, yes - a HACK # since we don't care about those packages on Linux, just zero it out, yes - a HACK
...@@ -235,14 +224,13 @@ do ...@@ -235,14 +224,13 @@ do
begin_section "Initialize $variant Build Directory" begin_section "Initialize $variant Build Directory"
rm -rf "$build_dir" rm -rf "$build_dir"
mkdir -p "$build_dir"
mkdir -p "$build_dir/tmp" mkdir -p "$build_dir/tmp"
end_section "Initialize $variant Build Directory" end_section "Initialize $variant Build Directory"
if pre_build "$variant" "$build_dir" if pre_build "$variant" "$build_dir"
then then
begin_section "Build $variant" begin_section "Build $variant"
build "$variant" "$build_dir" 2>&1 | tee -a "$build_log" | sed -n 's/^ *\(##teamcity.*\)/\1/p' build "$variant" "$build_dir"
if `cat "$build_dir/build_ok"` if `cat "$build_dir/build_ok"`
then then
case "$variant" in case "$variant" in
...@@ -255,7 +243,7 @@ do ...@@ -255,7 +243,7 @@ do
then then
record_dependencies_graph # defined in buildscripts/hg/bin/build.sh record_dependencies_graph # defined in buildscripts/hg/bin/build.sh
else else
record_event "TBD - no dependency graph for linux (probable python version dependency)" 1>&2 record_event "TBD - no dependency graph for linux (probable python version dependency)"
fi fi
end_section "Autobuild metadata" end_section "Autobuild metadata"
else else
...@@ -306,11 +294,10 @@ then ...@@ -306,11 +294,10 @@ then
dch --force-bad-version \ dch --force-bad-version \
--distribution unstable \ --distribution unstable \
--newversion "${VIEWER_VERSION}" \ --newversion "${VIEWER_VERSION}" \
"Automated build #$build_id, repository $branch revision $revision." \ "Automated build #$build_id, repository $branch revision $revision."
>> "$build_log" 2>&1
# build the debian package # build the debian package
$pkg_default_debuild_command >>"$build_log" 2>&1 || record_failure "\"$pkg_default_debuild_command\" failed." $pkg_default_debuild_command || record_failure "\"$pkg_default_debuild_command\" failed."
# Unmangle the changelog file # Unmangle the changelog file
hg revert debian/changelog hg revert debian/changelog
...@@ -359,10 +346,10 @@ then ...@@ -359,10 +346,10 @@ then
end_section "Upload Debian Repository" end_section "Upload Debian Repository"
else else
echo debian build not enabled record_event "debian build not enabled"
fi fi
else else
echo skipping debian build due to failed build. record_event "skipping debian build due to failed build"
fi fi
fi fi
...@@ -376,7 +363,7 @@ then ...@@ -376,7 +363,7 @@ then
package=$(installer_$arch) package=$(installer_$arch)
if [ x"$package" = x ] || test -d "$package" if [ x"$package" = x ] || test -d "$package"
then then
# Coverity doesn't package, so it's ok, anything else is fail record_event "??? mystery event $package // $build_coverity"
succeeded=$build_coverity succeeded=$build_coverity
else else
# Upload base package. # Upload base package.
...@@ -428,12 +415,12 @@ then ...@@ -428,12 +415,12 @@ then
fi fi
end_section Upload Installer end_section Upload Installer
else else
echo skipping upload of installer record_event "skipping upload of installer"
fi fi
else else
echo skipping upload of installer due to failed build. record_event "skipping upload of installer due to failed build"
fi fi
# The branch independent build.sh script invoking this script will finish processing # The branch independent build.sh script invoking this script will finish processing
......
...@@ -12,7 +12,7 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n ...@@ -12,7 +12,7 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n
if (DEFINED ENV{revision}) if (DEFINED ENV{revision})
set(VIEWER_VERSION_REVISION $ENV{revision}) set(VIEWER_VERSION_REVISION $ENV{revision})
message("Revision (from environment): ${VIEWER_VERSION_REVISION}") message(STATUS "Revision (from environment): ${VIEWER_VERSION_REVISION}")
else (DEFINED ENV{revision}) else (DEFINED ENV{revision})
find_program(MERCURIAL find_program(MERCURIAL
...@@ -33,23 +33,23 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n ...@@ -33,23 +33,23 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n
string(REGEX REPLACE "[^0-9a-f]" "" VIEWER_VERSION_REVISION ${VIEWER_VERSION_REVISION}) string(REGEX REPLACE "[^0-9a-f]" "" VIEWER_VERSION_REVISION ${VIEWER_VERSION_REVISION})
endif (NOT ${hg_id_result} EQUAL 0) endif (NOT ${hg_id_result} EQUAL 0)
if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
message("Revision (from hg) ${VIEWER_VERSION_REVISION}") message(STATUS "Revision (from hg) ${VIEWER_VERSION_REVISION}")
else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
message("Revision not set (repository not found?); using 0") message(STATUS "Revision not set (repository not found?); using 0")
set(VIEWER_VERSION_REVISION 0 ) set(VIEWER_VERSION_REVISION 0 )
endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
else (MERCURIAL) else (MERCURIAL)
message("Revision not set: mercurial not found; using 0") message(STATUS "Revision not set: mercurial not found; using 0")
set(VIEWER_VERSION_REVISION 0) set(VIEWER_VERSION_REVISION 0)
endif (MERCURIAL) endif (MERCURIAL)
endif (DEFINED ENV{revision}) endif (DEFINED ENV{revision})
message("Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") message(STATUS "Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
else ( EXISTS ${VIEWER_VERSION_BASE_FILE} ) else ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
message(SEND_ERROR "Cannot get viewer version from '${VIEWER_VERSION_BASE_FILE}'") message(SEND_ERROR "Cannot get viewer version from '${VIEWER_VERSION_BASE_FILE}'")
endif ( EXISTS ${VIEWER_VERSION_BASE_FILE} ) endif ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
if ("${VIEWER_VERSION_REVISION}" STREQUAL "") if ("${VIEWER_VERSION_REVISION}" STREQUAL "")
message("Ultimate fallback, revision was blank or not set: will use 0") message(STATUS "Ultimate fallback, revision was blank or not set: will use 0")
set(VIEWER_VERSION_REVISION 0) set(VIEWER_VERSION_REVISION 0)
endif ("${VIEWER_VERSION_REVISION}" STREQUAL "") endif ("${VIEWER_VERSION_REVISION}" STREQUAL "")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment