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

Legend:
Removed from v.102  
changed lines
  Added in v.134

  ViewVC Help
Powered by ViewVC 1.1.22