1############################################################################### 2# 3# Copyright (C) Nintendo. All rights reserved. 4# 5# These coded instructions, statements, and computer programs contain 6# proprietary information of Nintendo of America Inc. and/or Nintendo 7# Company Ltd., and are protected by Federal copyright law. They may 8# not be disclosed to third parties or copied or duplicated in any form, 9# in whole or in part, without the prior written consent of Nintendo. 10# 11############################################################################### 12# Simple script builds vc .sln file. 13# 14# How to use: 15# build_vs_sln.sh $SLN_FILES $OPTION $CONFIG 16# 17#--------------------------------- 18 19# Set sln files 20SLN_FILES=$1 21 22# Set Option 23OPTION=$2 24 25# Set Config 26BUILD_CONFIG=$3 27 28if [ ! -f $SLN_FILES ] ; then 29 echo "# ERROR: Can't find file : $SLN_FILES." 30 echo "# $SLN_FILES are not being compiled." 31 exit 1 32fi 33 34# Set VS2008 Location (Win7) 35VSBUILD_LOCATION="C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/vcpackages/vcbuild.exe" 36VSBUILD_X64DLL="C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/vcpackages/VCProjectAMD64Platform.dll" 37 38if [ -f "$VSBUILD_LOCATION" -a -f "$VSBUILD_X64DLL" ]; then 39 40 # Set VS2008 Build command 41 # use these options to see the output from the build 42 # VSBUILD_COMMAND="/M${NUMBER_OF_PROCESSORS} /logcommands ${OPTION} ${SLN_FILES} ${BUILD_CONFIG}" 43 VSBUILD_COMMAND="/M${NUMBER_OF_PROCESSORS} /nologo /nohtmllog ${OPTION} ${SLN_FILES} ${BUILD_CONFIG}" 44 45 # Build sln 46 # NOTE: $OUTPUT_FILE is not set 47 # rm -Rf $OUTPUT_FILE 48 "$VSBUILD_LOCATION" $VSBUILD_COMMAND 49 50 # Store the exit code (pass or fail) 51 EXIT_CODE=$? 52 53else 54 55 if [ -f "$VSBUILD_LOCATION" ]; then 56 echo "# NOTE: VS2008 is installed but not updated for 64-bit compilation; please install" 57 echo "# http://www.microsoft.com/en-us/download/details.aspx?id=10986" 58 else 59 echo "# NOTE: VS2008 is not installed (in expected location)" 60 fi 61 62 # Check svn revisions by default if no visual studio 63 EXIT_CODE=0 64 65fi 66 67# Return exit code 68exit $EXIT_CODE 69