Commits

Scott Lawrence  committed 4e80e67

refactor to build llphysicsextensions_tpv package for sublicensees

  • Participants
  • Parent commits 89f065b

Comments (0)

Files changed (5)

File autobuild.xml

             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>9bba702fbbd41d3f6cd288ae1c763753</string>
+              <string>4a9a12f396c4486cf9a456b251397150</string>
               <key>hash_algorithm</key>
               <string>md5</string>
               <key>url</key>
-              <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions-source/rev/261592/arch/Darwin/installer/llphysicsextensions_source-0.2-darwin-20120711.tar.bz2</string>
+              <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/oz_llphysicsextensions-source/rev/262209/arch/Darwin/installer/llphysicsextensions_source-0.3-darwin-20120720.tar.bz2</string>
             </map>
             <key>name</key>
             <string>darwin</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>7989a1e993a5e08cd9832d9f68cd025f</string>
+              <string>156abe6878ff3427c1c21d8cb6f9f3c5</string>
               <key>url</key>
-              <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions-source/rev/261592/arch/Linux/installer/llphysicsextensions_source-0.2-linux-20120711.tar.bz2</string>
+              <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/oz_llphysicsextensions-source/rev/262209/arch/Linux/installer/llphysicsextensions_source-0.3-linux-20120720.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>846b4efadf740b2fe6ea800d4f8608c1</string>
+              <string>d123648105c8c363ef4b445bef983fd5</string>
               <key>url</key>
-              <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions-source/rev/261592/arch/CYGWIN/installer/llphysicsextensions_source-0.2-windows-20120711.tar.bz2</string>
+              <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/oz_llphysicsextensions-source/rev/262209/arch/CYGWIN/installer/llphysicsextensions_source-0.3-windows-20120720.tar.bz2</string>
             </map>
             <key>name</key>
             <string>windows</string>
  end_section "Pre$variant"
 }
 
+package_llphysicsextensions_tpv()
+{
+  begin_section "PhysicsExtensions_TPV"
+  tpv_status=0
+  if [ "$variant" = "Release" ]
+  then 
+      llpetpvcfg=$build_dir/packages/llphysicsextensions/autobuild-tpv.xml
+      "$AUTOBUILD" build --verbose --config-file $llpetpvcfg -c Tpv
+      
+      # capture the package file name for use in upload later...
+      PKGTMP=`mktemp -t pgktpv.XXXXXX`
+      trap "rm $PKGTMP* 2>/dev/null" 0
+      "$AUTOBUILD" package --verbose --config-file $llpetpvcfg > $PKGTMP
+      tpv_status=$?
+      sed -n -e 's/^wrote *//p' $PKGTMP > $build_dir/llphysicsextensions_package
+  else
+      echo "Do not provide llphysicsextensions_tpv for $variant"
+      llphysicsextensions_package=""
+  fi
+  end_section "PhysicsExtensions_TPV"
+  return $tpv_status
+}
+
 build()
 {
   local variant="$1"
   if $build_viewer
   then
     begin_section "Viewer$variant"
-    if "$AUTOBUILD" build --no-configure -c $variant
+    "$AUTOBUILD" build --no-configure -c $variant
+    viewer_build_ok=$?
+    end_section "Viewer$variant"
+    package_llphysicsextensions_tpv
+    tpvlib_build_ok=$?
+    if [ $viewer_build_ok -eq 0 -a $tpvlib_build_ok -eq 0 ]
     then
       echo true >"$build_dir"/build_ok
     else
       echo false >"$build_dir"/build_ok
     fi
-    end_section "Viewer$variant"
   fi
 }
 
   mkdir -p "$build_dir"
   mkdir -p "$build_dir/tmp"
 
-  # Install packages.
-  begin_section "AutobuildInstall" 
-  "$AUTOBUILD" install --verbose --skip-license-check
-  end_section "AutobuildInstall" 
-
   if pre_build "$variant" "$build_dir" >> "$build_log" 2>&1
   then
     if $build_link_parallel
       upload_item quicklink "$package" binary/octet-stream
       [ -f summary.json ] && upload_item installer summary.json text/plain
 
-      # Upload crash reporter files and symbolfile for public llphysicsextensions build.
       case "$last_built_variant" in
       Release)
+        # Upload crash reporter files
         for symbolfile in $symbolfiles
         do
           upload_item symbolfile "$build_dir/$symbolfile" binary/octet-stream
         done
-
-        mapfilepath=$build_dir/newview
-        gzip $mapfilepath/secondlife-bin.MAP
-        mapfile=secondlife-bin-$arch.MAP.gz
-        mv $mapfilepath/secondlife-bin.MAP.gz $mapfilepath/$mapfile
-        upload_item mapfile "$mapfilepath/$mapfile" binary/octet-stream
-        echo "Uploaded mapfile for $last_built_variant"
-
+        
+        # Upload the llphysicsextensions_tpv package, if one was produced
+        if [ -r "$build_dir/llphysicsextensions_package" ]
+        then
+            llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package)
+            upload_item private_artifact "$llphysicsextensions_package" binary/octet-stream
+        else
+            echo "No llphysicsextensions_package"
+        fi
         ;;
       *)
         echo "Skipping mapfile for $last_built_variant"

File indra/cmake/LLPhysicsExtensions.cmake

 # -*- cmake -*-
 include(Prebuilt)
 
+# There are three possible solutions to provide the llphysicsextensions:
+# - The full source package, selected by -DHAVOK:BOOL=ON
+# - The stub source package, selected by -DHAVOK:BOOL=OFF 
+# - The prebuilt package available to those with sublicenses, selected by -DHAVOK_TPV:BOOL=ON
+
+if (INSTALL_PROPRIETARY)
+   set(HAVOK ON CACHE BOOL "Use Havok physics library")
+endif (INSTALL_PROPRIETARY)
+
+
 # Note that the use_prebuilt_binary macros below do not in fact include binaries;
 # the llphysicsextensions_* packages are source only and are built here.
 # The source package and the stub package both build libraries of the same name.
 
-# Using the real wrapper or the stub can be controlled with -DHAVOK:BOOL={ON,OFF}
-# the default
-if (INSTALL_PROPRIETARY)
-   set(HAVOK ON CACHE BOOL "Use Havok physics library")
-endif (INSTALL_PROPRIETARY)
-
 if (HAVOK)
    include(Havok)
    use_prebuilt_binary(llphysicsextensions_source)
    set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src)
    set(LLPHYSICSEXTENSIONS_LIBRARIES    llphysicsextensions)
 
+elseif (HAVOK_TPV)
+   use_prebuilt_binary(llphysicsextensions_tpv)
+   set(LLPHYSICSEXTENSIONS_LIBRARIES    llphysicsextensions_tpv)
+
 else (HAVOK)
    use_prebuilt_binary(llphysicsextensions_stub)
    set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub)

File package_physicsextensions.sh

-#!/bin/bash
-
-cd "$(dirname "$0")"
-
-# turn on verbose debugging output for parabuild logs.
-set -x
-# make errors fatal
-set -e
-
-if [ -z "$AUTOBUILD" ] ; then
-    fail
-fi
-
-if [ "$OSTYPE" = "cygwin" ] ; then
-    export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
-fi
-
-# load autbuild provided shell functions and variables
-eval "$("$AUTOBUILD" source_environment)"
-
-projectDir="$(pwd)"
-
-#directories we need the headers from
-projects="llcommon llimage llmath llrender"
-
-source="$projectDir/indra"
-
-stage="$projectDir/stage/include"
-mkdir -p $stage
-
-for project in $projects
-do
-	dstIncludeDir="$stage/$project"
-	mkdir -p $dstIncludeDir
-	headers="$source/$project/*.h"
-	cp $headers "$dstIncludeDir"
-	headers="$source/$project/*.inl"
-	# not all projects have .inl files
-	files=$(ls $headers 2> /dev/null | wc -l)
-	if [ "$files" != "0" ] ; then
-	    cp $headers "$dstIncludeDir"
-	fi
-done
-	
-# Copy the license files into place for packaging
-srcLicenseDir="$projectDir/doc"
-dstLicenseDir="$projectDir/stage/LICENSES"
-
-mkdir -p "$dstLicenseDir"
-cp "$srcLicenseDir/LGPL-licence.txt" "$dstLicenseDir/LGPL-licence.txt"
-
-pass

File package_physicsextensions.xml

-<?xml version="1.0" ?>
-<llsd>
-<map>
-    <key>package_description</key>
-    <map>
-      <key>description</key>
-      <string>include files referenced in the llphysicsextensions</string>
-      <key>license</key>
-      <string>LGPL</string>
-      <key>license_file</key>
-      <string>LICENSES/LGPL-licence.txt</string>
-      <key>name</key>
-      <string>pathfinding_includes</string>
-      <key>platforms</key>
-      <map>
-        <key>common</key>
-        <map>
-          <key>build_directory</key>
-          <string>stage</string>
-          <key>configurations</key>
-          <map>
-            <key>Debug</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>True</string>
-              <key>name</key>
-              <string>Debug</string>
-            </map>
-            <key>Release</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>True</string>
-              <key>name</key>
-              <string>Release</string>
-            </map>
-            <key>RelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>True</string>
-              <key>name</key>
-              <string>RelWithDebInfo</string>
-            </map>
-          </map>
-          <key>name</key>
-          <string>common</string>
-        </map>
-        <key>darwin</key>
-        <map>
-          <key>build_directory</key>
-          <string>stage</string>
-          <key>configurations</key>
-          <map>
-            <key>Debug</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>true</string>
-              <key>manifest</key>
-              <array>
-                <string>include/</string>
-                <string>LICENSES</string>
-              </array>
-              <key>name</key>
-              <string>Debug</string>
-            </map>
-            <key>Release</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>true</string>
-              <key>manifest</key>
-              <array>
-                <string>include/</string>
-                <string>LICENSES</string>
-              </array>
-              <key>name</key>
-              <string>Release</string>
-            </map>
-            <key>RelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>true</string>
-              <key>manifest</key>
-              <array>
-                <string>include/</string>
-                <string>LICENSES</string>
-              </array>
-              <key>name</key>
-              <string>RelWithDebInfo</string>
-            </map>
-          </map>
-          <key>name</key>
-          <string>darwin</string>
-        </map>
-        <key>linux</key>
-        <map>
-          <key>build_directory</key>
-          <string>stage</string>
-          <key>configurations</key>
-          <map>
-            <key>Debug</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>true</string>
-              <key>name</key>
-              <string>Debug</string>
-            </map>
-            <key>Release</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>true</string>
-              <key>name</key>
-              <string>Release</string>
-            </map>
-            <key>RelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>true</string>
-              <key>name</key>
-              <string>RelWithDebInfo</string>
-            </map>
-          </map>
-          <key>manifest</key>
-          <array>
-            <string>include</string>
-            <string>LICENSES</string>
-          </array>
-          <key>name</key>
-          <string>linux</string>
-        </map>
-        <key>windows</key>
-        <map>
-          <key>build_directory</key>
-          <string>stage</string>
-          <key>configurations</key>
-          <map>
-            <key>Debug</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>true</string>
-              <key>manifest</key>
-              <array>
-                <string>include/</string>
-                <string>LICENSES</string>
-              </array>
-              <key>name</key>
-              <string>Debug</string>
-            </map>
-            <key>Release</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>true</string>
-              <key>manifest</key>
-              <array>
-                <string>include/</string>
-                <string>LICENSES</string>
-              </array>
-              <key>name</key>
-              <string>Release</string>
-            </map>
-            <key>RelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>bash</string>
-                <key>options</key>
-                <array>
-                  <string>-c ../package_physicsextensions.sh</string>
-                </array>
-              </map>
-              <key>default</key>
-              <string>true</string>
-              <key>manifest</key>
-              <array>
-                <string>include/</string>
-                <string>LICENSES</string>
-              </array>
-              <key>name</key>
-              <string>RelWithDebInfo</string>
-            </map>
-          </map>
-          <key>name</key>
-          <string>windows</string>
-        </map>
-      </map>
-      <key>version</key>
-      <string>1.0</string>
-    </map>
-    <key>type</key>
-    <string>autobuild</string>
-    <key>version</key>
-    <string>1.2</string>
-  </map>
-</llsd>