/[pcsx2_0.9.7]/auto_build_latest_upstream.sh
ViewVC logotype

Diff of /auto_build_latest_upstream.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 92 by william, Thu Sep 9 16:33:43 2010 UTC revision 109 by william, Thu Sep 9 21:12:48 2010 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # dummy values -- comment these out after testing  #. ./auto_defs.sh
 #export SVNROOT_URL="https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7"  
 #export downstream_export_location="`pwd`"  
 #export upstream_revision="3738"  
 #export SVNTMP="svntmp"  
 #export BRANCH_DIR="branch"  
 #export BRANCH_CONFIGURATION="debug"  
 #export BRANCH_LINE="0.X"  
 #export BRANCH_NAME="latest"  
 #export BRANCH_URL="$SVNROOT_URL/$BRANCH_DIR/$BRANCH_CONFIGURATION/$BRANCH_LINE/$BRANCH_NAME"  
 #export BRANCH_LOCATION="$downstream_export_location/$BRANCH_DIR/$BRANCH_CONFIGURATION/$BRANCH_LINE"  
 # end dummy  
   
 export BUILD_TMP_SEED=`date +%s`  
 export BUILD_TMP_DIR="/tmp"  
 export PCSX2_BUILD_TMP="$BUILD_TMP_DIR/pcsx2_build_stageing_$BUILD_TMP_SEED"  
   
   
 export DotNetFrameworkVersion="3.5"  
3    
 export MSBUILD="/cygdrive/C/Windows/Microsoft.NET/Framework/v$DotNetFrameworkVersion/MSBuild.exe"  
4    
 export VSC_PROJECT_ROOT="$PCSX2_BUILD_TMP"  
 export VSC_PROJECT_FILE="pcsx2_suite_2008.sln"  
5    
6  export VSC_PROJECT_PATH="$VSC_PROJECT_ROOT/$VSC_PROJECT_FILE"  if [ "$1" != "" ] ; then
7  export VSC_PROJECT_PATH_WIN32=`cyg2winpath $VSC_PROJECT_PATH`          export OVERRIDE_TMP_BUILD_PATH="$1"
8            . ./auto_build_defs.sh
9    fi
10    
11    #UPDATE PCSX2 VERSION
12    PCSX2_VERSION=`cat "$$PCSX2_BUILD_TMP/bin/pcsx2-version.txt"`
13    
14    export DISABLE_AUTO_TAG="0"
15    
16    if [ "$2" == "--no-auto-branch" ] ; then
17            DISABLE_AUTO_BRANCH="1"
18    fi
19    if [ "$3" == "--no-prebuild" ] ; then
20            DISABLE_PREBUILD="1"
21    fi
22    if [ "$4" == "--no-cleanup" ] ; then
23            DISABLE_CLEANUP="1"
24    fi
25    
26  # output variables  # output variables
27  echo "---------------------------------------------------------------------------------------"  echo "---------------------------------------------------------------------------------------"
# Line 36  echo Line 30  echo
30  echo -e "\\tMSBUILD PATH: $MSBUILD"  echo -e "\\tMSBUILD PATH: $MSBUILD"
31  echo -e "\\tPCSX2 VCS BUILD PATH: $PCSX2_BUILD_TMP"  echo -e "\\tPCSX2 VCS BUILD PATH: $PCSX2_BUILD_TMP"
32  echo -e "\\tPCSX2 VCS PROJECT FILE: $VSC_PROJECT_FILE"  echo -e "\\tPCSX2 VCS PROJECT FILE: $VSC_PROJECT_FILE"
33    echo -e "\\tPCSX2 UPSTREAM VERSION: $VSC_BUILD_VERSION_UPSTREAM"
34    echo -e "\\tPCSX2 LOCAL TRUNK VERSION: $PCSX2_VERSION"
35    echo -e "\\tPCSX2 LOCAL VERSION: $VSC_BUILD_VERSION_LOCAL"
36  echo  echo
37  echo "---------------------------------------------------------------------------------------"  echo "---------------------------------------------------------------------------------------"
38    
39  echo  echo
40  echo "PERFORMING AUTOBUILD:"  echo "PERFORMING AUTOBUILD:"
41    
42            
43    
44  #clean up BUILD_TMP_DIR  # call auto prebuild
45  cd "$BUILD_TMP_DIR"  if [ "$DISABLE_PREBUILD" == "0" ] ; then
46  rm -Rf *          if [ "$AUTO_PREBUILD_DONE" == "" ] ; then
47                    "$downstream_export_location/auto_prebuild_latest_upstream.sh"
48  # Make Build TMP Path                  if [ "$AUTO_PREBUILD_DONE" != "true" ] ; then
49  mkdir -p "$PCSX2_BUILD_TMP"                          echo "PREBUILD FAILED..."
50                            exit 1
51                    fi      
52            fi
53    else
54    echo "PREBUILD HAS BEEN DISABLED..."    
55  cd "$PCSX2_BUILD_TMP"  cd "$PCSX2_BUILD_TMP"
   
 echo  
 echo "PERFORMING PREBUILD:"  
 # export latest branch to tmp dir  
 echo -ne "\\tCOPYING: "$BRANCH_LOCATION/$BRANCH_NAME" to $PCSX2_BUILD_TMP ... "  
 #svn export --force "$BRANCH_LOCATION/$BRANCH_NAME" "$PCSX2_BUILD_TMP" 2>/dev/null  
 cp -Rf "$BRANCH_LOCATION/$BRANCH_NAME"/* "$PCSX2_BUILD_TMP" 2>/dev/null && echo "done." || echo "failed."  
   
   
 # remove all .pch files  
56  find -name *.pch -exec rm -f {} \;  find -name *.pch -exec rm -f {} \;
57  echo "PREBUILD COMPLETED..."  echo    
58  echo  fi
59    
60  # START VISUAL STUDIO BUILD SUPPORT  # START VISUAL STUDIO BUILD SUPPORT
61  export BUILD_SUCCESS=0  export BUILD_SUCCESS=0
# Line 85  if [ "$BUILD_SUCCESS" == 0 ] ; then Line 77  if [ "$BUILD_SUCCESS" == 0 ] ; then
77    
78          # CLEANUP          # CLEANUP
79          echo "PERFORMING CLEANUP"          echo "PERFORMING CLEANUP"
80          cd "$BUILD_TMP_DIR"          if [ "$DISABLE_CLEANUP" == "0" ] ; then
81          rm -Rf "$PCSX2_BUILD_TMP"                  cd "$BUILD_TMP_DIR"
82          rm -Rf *                  rm -Rf "$PCSX2_BUILD_TMP"
83          echo "CLEANUP COMPLETE..."                  rm -Rf *
84                    echo "CLEANUP COMPLETE..."
85            else
86            echo "CLEANUP DISABLED..."
87            fi
88    
89          echo          echo
90          echo "AUTOBUILD COMPLETE..."          echo "AUTOBUILD COMPLETE..."
91          # perform auto tagging          # perform auto tagging
92          "$downstream_export_location/auto_tag_latest_upstream.sh"          if [ "$DISABLE_AUTO_BRANCH" == "0" ] ; then
93                    # Always force auto branch update after building
94                    "$downstream_export_location/auto_branch_latest_upstream.sh" --force-update
95            else
96                    echo "AUTO BUILD BRANCH HAS BEEN DISABLED ... not calling auto_branch_latest_upstream.sh --> to enable do not use --no-auto-branch"
97            fi
98  else  else
99    
100          # CLEANUP          # CLEANUP
101          echo "PERFORMING CLEANUP"          echo "PERFORMING CLEANUP"
102          cd "$BUILD_TMP_DIR"          
103          rm -Rf "$PCSX2_BUILD_TMP"          if [ "$DISABLE_CLEANUP" == "0" ] ; then
104          rm -Rf *                  cd "$BUILD_TMP_DIR"
105          echo "CLEANUP COMPLETE..."                  rm -Rf "$PCSX2_BUILD_TMP"
106                    rm -Rf *
107                    echo "CLEANUP COMPLETE..."
108            else
109            echo "CLEANUP DISABLED..."
110            fi
111          echo          echo
112          echo "BUILD FAILED..."          echo "BUILD FAILED..."
113          echo          echo

Legend:
Removed from v.92  
changed lines
  Added in v.109

  ViewVC Help
Powered by ViewVC 1.1.22