/[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 109 by william, Thu Sep 9 21:12:48 2010 UTC revision 143 by william, Fri Sep 10 15:59:23 2010 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  #. ./auto_defs.sh  . ./auto_defs.sh
3    
4    
5    
# Line 8  if [ "$1" != "" ] ; then Line 8  if [ "$1" != "" ] ; then
8          . ./auto_build_defs.sh          . ./auto_build_defs.sh
9  fi  fi
10    
11  #UPDATE PCSX2 VERSION  export OVERRIDE_TMP_BUILD_PATH_SAVE="$OVERRIDE_TMP_BUILD_PATH"
 PCSX2_VERSION=`cat "$$PCSX2_BUILD_TMP/bin/pcsx2-version.txt"`  
12    
13  export DISABLE_AUTO_TAG="0"  export DISABLE_AUTO_BRANCH="0"
14    export DISABLE_PREBUILD="0"
15    export DISABLE_CLEANUP="0"
16    
17  if [ "$2" == "--no-auto-branch" ] ; then  if [ "$2" == "--no-auto-branch" ] ; then
18          DISABLE_AUTO_BRANCH="1"          DISABLE_AUTO_BRANCH="1"
# Line 27  fi Line 28  fi
28  echo "---------------------------------------------------------------------------------------"  echo "---------------------------------------------------------------------------------------"
29  echo "AUTO BUILD CONFIG:"  echo "AUTO BUILD CONFIG:"
30  echo  echo
 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"  echo -e "\\tPCSX2 VCS BUILD VERSION: $PCSX2_VERSION"
34  echo -e "\\tPCSX2 LOCAL TRUNK VERSION: $PCSX2_VERSION"  echo
35  echo -e "\\tPCSX2 LOCAL VERSION: $VSC_BUILD_VERSION_LOCAL"  echo -e "\\tMSBUILD PATH: $VSC_MSBUILD"
36    echo -e "\\tMSBUILD OPTIONS: $VSC_MSBUILD_OPTIONS"
37  echo  echo
38  echo "---------------------------------------------------------------------------------------"  echo "---------------------------------------------------------------------------------------"
39    
# Line 43  echo "PERFORMING AUTOBUILD:" Line 44  echo "PERFORMING AUTOBUILD:"
44    
45  # call auto prebuild  # call auto prebuild
46  if [ "$DISABLE_PREBUILD" == "0" ] ; then  if [ "$DISABLE_PREBUILD" == "0" ] ; then
47          if [ "$AUTO_PREBUILD_DONE" == "" ] ; then          export PREBUILD_SUCCESS="0"    
48                  "$downstream_export_location/auto_prebuild_latest_upstream.sh"          "$downstream_export_location/auto_prebuild_latest_upstream.sh" "$OVERRIDE_TMP_BUILD_PATH_SAVE" && PREBUILD_SUCCESS="1" || PREBUILD_SUCCESS="0"
49                  if [ "$AUTO_PREBUILD_DONE" != "true" ] ; then          if [ "$PREBUILD_SUCCESS" == "0" ] ; then
50                          echo "PREBUILD FAILED..."                  echo "PREBUILD FAILED!"
51                          exit 1                  exit 1
                 fi        
52          fi          fi
53  else  else
54  echo "PREBUILD HAS BEEN DISABLED..."              echo "PREBUILD HAS BEEN DISABLED ... to enable do not use --no-prebuild"        
55  cd "$PCSX2_BUILD_TMP"          cd "$PCSX2_BUILD_TMP"
56  find -name *.pch -exec rm -f {} \;          find -name *.pch -exec rm -f {} \;
57  echo              echo    
58  fi  fi
59    
60    # re-generate pcsx2-version.txt
61    echo "$PCSX2_VERSION" > "$PCSX2_BUILD_TMP/bin/pcsx2-version.txt"
62    
63  # START VISUAL STUDIO BUILD SUPPORT  # START VISUAL STUDIO BUILD SUPPORT
64  export BUILD_SUCCESS=0  export BUILD_SUCCESS=0
65  echo "PERFORMING BUILD:"  echo "PERFORMING BUILD:"
66  "$MSBUILD" /nologo /t:Clean,rebuild "$VSC_PROJECT_PATH_WIN32" && BUILD_SUCCESS=0 || BUILD_SUCCESS=1  
67    # remove log files
68    rm -f "$downstream_export_location/"$VSC_MSBUILD_LOG_FILE_PREFIX*.log
69    "$VSC_MSBUILD" $VSC_MSBUILD_OPTIONS "$VSC_PROJECT_PATH_WIN32" && BUILD_SUCCESS=0 || BUILD_SUCCESS=1
70    
71  # END VISUAL STUDIO BUILD SUPPORT  # END VISUAL STUDIO BUILD SUPPORT
72    
73  #echo "BUILD SUCCESS: $BUILD_SUCCESS"  #echo "BUILD SUCCESS: $BUILD_SUCCESS"
# Line 71  if [ "$BUILD_SUCCESS" == 0 ] ; then Line 78  if [ "$BUILD_SUCCESS" == 0 ] ; then
78    
79          # START POST BUILD          # START POST BUILD
80          echo "PERFORMING POSTBUILD:"          echo "PERFORMING POSTBUILD:"
81          cp -Rfv "$PCSX2_BUILD_TMP/bin"/* "$BRANCH_LOCATION/$BRANCH_NAME/bin/"          echo -e "\\tCOPYING $PCSX2_BUILD_TMP/bin/* $downstream_export_location/trunk/bin/ ... {}"
82            cp -Rfv "$PCSX2_BUILD_TMP/bin"/* "$downstream_export_location/trunk/bin/" >/dev/null 2>/dev/null
83            
84            # commit newly built files in trunk
85            cd "$downstream_export_location/trunk/bin/"
86            # add the newly built files to svn
87                    find  -not -path "*.svn*" \
88                            -not -name "*.bsc" \
89                            -not -name "*.exp" \
90                            -not -name "*.ilk" \
91                            -not -name "*.lib" -exec bash -c '
92                    #echo "{}"
93                    if [ "{}" != "." ] ; then
94                            export svn_file=`echo "{}" | sed s/".\/"//`
95                            export svn_need_to_add=`svn status | grep "$svn_file"`
96                            if [ "$svn_need_to_add" != "" ] ; then
97                                    svn add "{}" >/dev/null 2>/dev/null
98                            fi
99                    fi
100            ' \;
101            svn commit -m "Committing Build: $PCSX2_VERSION" --non-interactive --trust-server-cert >/dev/null 2>/dev/null
102                                                                                            
103            
104          echo "POSTBUILD COMPLETED..."          echo "POSTBUILD COMPLETED..."
105          # END POST BUILD          # END POST BUILD
106    
107          # CLEANUP          # CLEANUP
108          echo "PERFORMING CLEANUP"          echo "PERFORMING CLEANUP"
109          if [ "$DISABLE_CLEANUP" == "0" ] ; then          if [ "$DISABLE_CLEANUP" == "0" ] ; then
110                    echo -e "\\tCLEANING $PCSX2_BUILD_TMP/bin/ ... {}"
111                  cd "$BUILD_TMP_DIR"                  cd "$BUILD_TMP_DIR"
112                  rm -Rf "$PCSX2_BUILD_TMP"                  rm -Rf "$PCSX2_BUILD_TMP" >/dev/null 2>/dev/null
113                  rm -Rf *                  #rm -Rf *
114                  echo "CLEANUP COMPLETE..."                  echo "CLEANUP COMPLETE..."
115          else          else
116          echo "CLEANUP DISABLED..."                  echo "CLEANUP HAS BEEN DISABLED ... to enable do not use --no-cleaup"
117          fi          fi
118    
119          echo          echo
120          echo "AUTOBUILD COMPLETE..."          echo "AUTOBUILD COMPLETE..."
121          # perform auto tagging          # perform auto tagging
122          if [ "$DISABLE_AUTO_BRANCH" == "0" ] ; then          if [ "$DISABLE_AUTO_BRANCH" == "0" ] ; then
123                    cd "$downstream_export_location"
124                  # Always force auto branch update after building                  # Always force auto branch update after building
125                  "$downstream_export_location/auto_branch_latest_upstream.sh" --force-update                  "$downstream_export_location/auto_branch_latest_upstream.sh" --force-update
126          else          else
# Line 101  else Line 132  else
132          echo "PERFORMING CLEANUP"          echo "PERFORMING CLEANUP"
133                    
134          if [ "$DISABLE_CLEANUP" == "0" ] ; then          if [ "$DISABLE_CLEANUP" == "0" ] ; then
135                    echo -e "\\tCLEANING $PCSX2_BUILD_TMP/bin/ ... {}"
136                  cd "$BUILD_TMP_DIR"                  cd "$BUILD_TMP_DIR"
137                  rm -Rf "$PCSX2_BUILD_TMP"                  rm -Rf "$PCSX2_BUILD_TMP" >/dev/null 2>/dev/null
138                  rm -Rf *                  #rm -Rf *
139                  echo "CLEANUP COMPLETE..."                  echo "CLEANUP COMPLETE..."
140          else          else
141          echo "CLEANUP DISABLED..."                  echo "CLEANUP HAS BEEN DISABLED ... to enable do not use --no-cleaup"
142          fi          fi
143          echo          echo
144          echo "BUILD FAILED..."          echo "BUILD FAILED..."

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

  ViewVC Help
Powered by ViewVC 1.1.22