/[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

--- auto_build_latest_upstream.sh	2010/09/09 17:49:17	98
+++ auto_build_latest_upstream.sh	2010/09/10 01:51:30	121
@@ -1,48 +1,70 @@
 #!/bin/bash
 . ./auto_defs.sh
 
+
+
 if [ "$1" != "" ] ; then
         export OVERRIDE_TMP_BUILD_PATH="$1"
         . ./auto_build_defs.sh
 fi
 
+export DISABLE_AUTO_TAG="0"
+
+if [ "$2" == "--no-auto-branch" ] ; then
+        DISABLE_AUTO_BRANCH="1"
+fi
+if [ "$3" == "--no-prebuild" ] ; then
+        DISABLE_PREBUILD="1"
+fi
+if [ "$4" == "--no-cleanup" ] ; then
+        DISABLE_CLEANUP="1"
+fi
+
 # output variables
 echo "---------------------------------------------------------------------------------------"
 echo "AUTO BUILD CONFIG:"
 echo
-echo -e "\\tMSBUILD PATH: $MSBUILD"
 echo -e "\\tPCSX2 VCS BUILD PATH: $PCSX2_BUILD_TMP"
 echo -e "\\tPCSX2 VCS PROJECT FILE: $VSC_PROJECT_FILE"
-echo -e "\\tPCSX2 VERSION: $VSC_BUILD_VERSION_UPSTREAM"
-echo -e "\\tPCSX2 LOCAL VERSION: $VSC_BUILD_VERSION_LOCAL"
+echo -e "\\tPCSX2 VCS BUILD VERSION: $PCSX2_VERSION"
+echo
+echo -e "\\tMSBUILD PATH: $VSC_MSBUILD"
+echo -e "\\tMSBUILD OPTIONS: $VSC_MSBUILD_OPTIONS"
 echo
 echo "---------------------------------------------------------------------------------------"
 
 echo
 echo "PERFORMING AUTOBUILD:"
 
-export DISABLE_AUTO_TAG="0"
-
-if [ "$1" == "--no-auto-tag" ] ; then
-        DISABLE_AUTO_TAG="1"
-fi
         
 
 # call auto prebuild
-if [ "$AUTO_PREBUILD_DONE" == "" ] ; then
-	"$downstream_export_location/auto_prebuild_latest_upstream.sh"
-	if [ "$AUTO_PREBUILD_DONE" != "true" ] ; then
-		echo "PREBUILD FAILED..."
-		exit 1
-	fi	
-	
-	
+if [ "$DISABLE_PREBUILD" == "0" ] ; then
+	if [ "$AUTO_PREBUILD_DONE" == "" ] ; then
+		"$downstream_export_location/auto_prebuild_latest_upstream.sh"
+		if [ "$AUTO_PREBUILD_DONE" != "true" ] ; then
+			echo "PREBUILD FAILED..."
+			exit 1
+		fi	
+	fi
+else
+	echo "PREBUILD HAS BEEN DISABLED ... to enable do not use --no-prebuild"	
+	cd "$PCSX2_BUILD_TMP"
+	find -name *.pch -exec rm -f {} \;
+	echo	
 fi
 
+# re-generate pcsx2-version.txt
+echo "$PCSX2_VERSION" > "$PCSX2_BUILD_TMP/bin/pcsx2-version.txt"
+
 # START VISUAL STUDIO BUILD SUPPORT
 export BUILD_SUCCESS=0
 echo "PERFORMING BUILD:"
-"$MSBUILD" /nologo /t:Clean,rebuild "$VSC_PROJECT_PATH_WIN32" && BUILD_SUCCESS=0 || BUILD_SUCCESS=1
+
+# remove log files
+rm -f "$downstream_export_location/"$VSC_MSBUILD_LOG_FILE_PREFIX*.log
+"$VSC_MSBUILD" $VSC_MSBUILD_OPTIONS "$VSC_PROJECT_PATH_WIN32" && BUILD_SUCCESS=0 || BUILD_SUCCESS=1
+
 # END VISUAL STUDIO BUILD SUPPORT
 
 #echo "BUILD SUCCESS: $BUILD_SUCCESS"
@@ -53,33 +75,46 @@
 
 	# START POST BUILD
 	echo "PERFORMING POSTBUILD:"
-	cp -Rfv "$PCSX2_BUILD_TMP/bin"/* "$BRANCH_LOCATION/$BRANCH_NAME/bin/"
+	echo -e "\\tCOPYING $PCSX2_BUILD_TMP/bin/* $downstream_export_location/trunk/bin/ ... {}"
+	cp -Rfv "$PCSX2_BUILD_TMP/bin"/* "$downstream_export_location/trunk/bin/" >/dev/null 2>/dev/null
 	echo "POSTBUILD COMPLETED..."
 	# END POST BUILD
 
 	# CLEANUP
 	echo "PERFORMING CLEANUP"
-	cd "$BUILD_TMP_DIR"
-	rm -Rf "$PCSX2_BUILD_TMP"
-	rm -Rf *
-	echo "CLEANUP COMPLETE..."
+	if [ "$DISABLE_CLEANUP" == "0" ] ; then
+		echo -e "\\tCLEANING $PCSX2_BUILD_TMP/bin/ ... {}"
+		cd "$BUILD_TMP_DIR"
+		rm -Rf "$PCSX2_BUILD_TMP" >/dev/null 2>/dev/null
+		#rm -Rf *
+		echo "CLEANUP COMPLETE..."
+	else
+		echo "CLEANUP HAS BEEN DISABLED ... to enable do not use --no-cleaup"
+	fi
 
 	echo
 	echo "AUTOBUILD COMPLETE..."
 	# perform auto tagging
-	if [ "$DISABLE_AUTO_TAG" == "0" ] ; then
-		"$downstream_export_location/auto_tag_latest_upstream.sh"
+	if [ "$DISABLE_AUTO_BRANCH" == "0" ] ; then
+		# Always force auto branch update after building
+		"$downstream_export_location/auto_branch_latest_upstream.sh" --force-update
 	else
-		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"
 	fi
 else
 
 	# CLEANUP
 	echo "PERFORMING CLEANUP"
-	cd "$BUILD_TMP_DIR"
-	rm -Rf "$PCSX2_BUILD_TMP"
-	rm -Rf *
-	echo "CLEANUP COMPLETE..."
+	
+	if [ "$DISABLE_CLEANUP" == "0" ] ; then
+		echo -e "\\tCLEANING $PCSX2_BUILD_TMP/bin/ ... {}"
+		cd "$BUILD_TMP_DIR"
+		rm -Rf "$PCSX2_BUILD_TMP" >/dev/null 2>/dev/null
+		#rm -Rf *
+		echo "CLEANUP COMPLETE..."
+	else
+		echo "CLEANUP HAS BEEN DISABLED ... to enable do not use --no-cleaup"
+	fi
 	echo
 	echo "BUILD FAILED..."
 	echo

 

  ViewVC Help
Powered by ViewVC 1.1.22