/[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 94 by william, Thu Sep 9 16:57:05 2010 UTC revision 121 by william, Fri Sep 10 01:51:30 2010 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  . ./auto_defs.sh  . ./auto_defs.sh
3    
4    
5    
6    if [ "$1" != "" ] ; then
7            export OVERRIDE_TMP_BUILD_PATH="$1"
8            . ./auto_build_defs.sh
9    fi
10    
11    export DISABLE_AUTO_TAG="0"
12    
13    if [ "$2" == "--no-auto-branch" ] ; then
14            DISABLE_AUTO_BRANCH="1"
15    fi
16    if [ "$3" == "--no-prebuild" ] ; then
17            DISABLE_PREBUILD="1"
18    fi
19    if [ "$4" == "--no-cleanup" ] ; then
20            DISABLE_CLEANUP="1"
21    fi
22    
23  # output variables  # output variables
24  echo "---------------------------------------------------------------------------------------"  echo "---------------------------------------------------------------------------------------"
25  echo "AUTO BUILD CONFIG:"  echo "AUTO BUILD CONFIG:"
26  echo  echo
 echo -e "\\tMSBUILD PATH: $MSBUILD"  
27  echo -e "\\tPCSX2 VCS BUILD PATH: $PCSX2_BUILD_TMP"  echo -e "\\tPCSX2 VCS BUILD PATH: $PCSX2_BUILD_TMP"
28  echo -e "\\tPCSX2 VCS PROJECT FILE: $VSC_PROJECT_FILE"  echo -e "\\tPCSX2 VCS PROJECT FILE: $VSC_PROJECT_FILE"
29  echo -e "\\tPCSX2 VERSION: "  echo -e "\\tPCSX2 VCS BUILD VERSION: $PCSX2_VERSION"
30  echo -e "\\tPCSX2 LOCAL VERSION: "  echo
31    echo -e "\\tMSBUILD PATH: $VSC_MSBUILD"
32    echo -e "\\tMSBUILD OPTIONS: $VSC_MSBUILD_OPTIONS"
33  echo  echo
34  echo "---------------------------------------------------------------------------------------"  echo "---------------------------------------------------------------------------------------"
35    
36  echo  echo
37  echo "PERFORMING AUTOBUILD:"  echo "PERFORMING AUTOBUILD:"
38    
39            
40    
41  #clean up BUILD_TMP_DIR  # call auto prebuild
42  cd "$BUILD_TMP_DIR"  if [ "$DISABLE_PREBUILD" == "0" ] ; then
43  rm -Rf *          if [ "$AUTO_PREBUILD_DONE" == "" ] ; then
44                    "$downstream_export_location/auto_prebuild_latest_upstream.sh"
45  # Make Build TMP Path                  if [ "$AUTO_PREBUILD_DONE" != "true" ] ; then
46  mkdir -p "$PCSX2_BUILD_TMP"                          echo "PREBUILD FAILED..."
47                            exit 1
48  cd "$PCSX2_BUILD_TMP"                  fi      
49            fi
50  echo  else
51  echo "PERFORMING PREBUILD:"          echo "PREBUILD HAS BEEN DISABLED ... to enable do not use --no-prebuild"        
52  # export latest branch to tmp dir          cd "$PCSX2_BUILD_TMP"
53  echo -ne "\\tCOPYING: "$BRANCH_LOCATION/$BRANCH_NAME" to $PCSX2_BUILD_TMP ... "          find -name *.pch -exec rm -f {} \;
54  #svn export --force "$BRANCH_LOCATION/$BRANCH_NAME" "$PCSX2_BUILD_TMP" 2>/dev/null          echo    
55  cp -Rf "$BRANCH_LOCATION/$BRANCH_NAME"/* "$PCSX2_BUILD_TMP" 2>/dev/null && echo "done." || echo "failed."  fi
   
56    
57  # remove all .pch files  # re-generate pcsx2-version.txt
58  find -name *.pch -exec rm -f {} \;  echo "$PCSX2_VERSION" > "$PCSX2_BUILD_TMP/bin/pcsx2-version.txt"
 echo "PREBUILD COMPLETED..."  
 echo  
59    
60  # START VISUAL STUDIO BUILD SUPPORT  # START VISUAL STUDIO BUILD SUPPORT
61  export BUILD_SUCCESS=0  export BUILD_SUCCESS=0
62  echo "PERFORMING BUILD:"  echo "PERFORMING BUILD:"
63  "$MSBUILD" /nologo /t:Clean,rebuild "$VSC_PROJECT_PATH_WIN32" && BUILD_SUCCESS=0 || BUILD_SUCCESS=1  
64    # remove log files
65    rm -f "$downstream_export_location/"$VSC_MSBUILD_LOG_FILE_PREFIX*.log
66    "$VSC_MSBUILD" $VSC_MSBUILD_OPTIONS "$VSC_PROJECT_PATH_WIN32" && BUILD_SUCCESS=0 || BUILD_SUCCESS=1
67    
68  # END VISUAL STUDIO BUILD SUPPORT  # END VISUAL STUDIO BUILD SUPPORT
69    
70  #echo "BUILD SUCCESS: $BUILD_SUCCESS"  #echo "BUILD SUCCESS: $BUILD_SUCCESS"
# Line 53  if [ "$BUILD_SUCCESS" == 0 ] ; then Line 75  if [ "$BUILD_SUCCESS" == 0 ] ; then
75    
76          # START POST BUILD          # START POST BUILD
77          echo "PERFORMING POSTBUILD:"          echo "PERFORMING POSTBUILD:"
78          cp -Rfv "$PCSX2_BUILD_TMP/bin"/* "$BRANCH_LOCATION/$BRANCH_NAME/bin/"          echo -e "\\tCOPYING $PCSX2_BUILD_TMP/bin/* $downstream_export_location/trunk/bin/ ... {}"
79            cp -Rfv "$PCSX2_BUILD_TMP/bin"/* "$downstream_export_location/trunk/bin/" >/dev/null 2>/dev/null
80          echo "POSTBUILD COMPLETED..."          echo "POSTBUILD COMPLETED..."
81          # END POST BUILD          # END POST BUILD
82    
83          # CLEANUP          # CLEANUP
84          echo "PERFORMING CLEANUP"          echo "PERFORMING CLEANUP"
85          cd "$BUILD_TMP_DIR"          if [ "$DISABLE_CLEANUP" == "0" ] ; then
86          rm -Rf "$PCSX2_BUILD_TMP"                  echo -e "\\tCLEANING $PCSX2_BUILD_TMP/bin/ ... {}"
87          rm -Rf *                  cd "$BUILD_TMP_DIR"
88          echo "CLEANUP COMPLETE..."                  rm -Rf "$PCSX2_BUILD_TMP" >/dev/null 2>/dev/null
89                    #rm -Rf *
90                    echo "CLEANUP COMPLETE..."
91            else
92                    echo "CLEANUP HAS BEEN DISABLED ... to enable do not use --no-cleaup"
93            fi
94    
95          echo          echo
96          echo "AUTOBUILD COMPLETE..."          echo "AUTOBUILD COMPLETE..."
97          # perform auto tagging          # perform auto tagging
98          "$downstream_export_location/auto_tag_latest_upstream.sh"          if [ "$DISABLE_AUTO_BRANCH" == "0" ] ; then
99                    # Always force auto branch update after building
100                    "$downstream_export_location/auto_branch_latest_upstream.sh" --force-update
101            else
102                    echo "AUTO BUILD BRANCH HAS BEEN DISABLED ... not calling auto_branch_latest_upstream.sh --> to enable do not use --no-auto-branch"
103            fi
104  else  else
105    
106          # CLEANUP          # CLEANUP
107          echo "PERFORMING CLEANUP"          echo "PERFORMING CLEANUP"
108          cd "$BUILD_TMP_DIR"          
109          rm -Rf "$PCSX2_BUILD_TMP"          if [ "$DISABLE_CLEANUP" == "0" ] ; then
110          rm -Rf *                  echo -e "\\tCLEANING $PCSX2_BUILD_TMP/bin/ ... {}"
111          echo "CLEANUP COMPLETE..."                  cd "$BUILD_TMP_DIR"
112                    rm -Rf "$PCSX2_BUILD_TMP" >/dev/null 2>/dev/null
113                    #rm -Rf *
114                    echo "CLEANUP COMPLETE..."
115            else
116                    echo "CLEANUP HAS BEEN DISABLED ... to enable do not use --no-cleaup"
117            fi
118          echo          echo
119          echo "BUILD FAILED..."          echo "BUILD FAILED..."
120          echo          echo

Legend:
Removed from v.94  
changed lines
  Added in v.121

  ViewVC Help
Powered by ViewVC 1.1.22