#! bash ############################################################################### # BuildScript for hioHost # # Copyright (C) 2006 Nintendo. All rights reserved. # # These coded instructions, statements, and computer programs contain # proprietary information of Nintendo of America Inc. and/or Nintendo # Company Ltd., and are protected by Federal copyright law. They may # not be disclosed to third parties or copied or duplicated in any form, # in whole or in part, without the prior written consent of Nintendo. ############################################################################### # # compile sampletool Executable # # Usage: buildscript compile all the solution or projects # buildscript /clean deletes all the intermediate files # buildscript /rebuild rebuild all the solution or projects # buildscript /project build/rebuild/clean/ the projects # # if Visual Studio is not installed, do nothing. # ############################################################################ # setup ############################################################################ MODULENAME="hio2demo" # PROJECTS lists all VC project that will be linked. PROJECTS="dual multi simple" # select one suffix of target file. "exe" or "dll", "lib", "bin"... BINSUFFIX=exe ############################################################################ # do operation ############################################################################ # Visual C++ IDE install path MSDEV=${VS71COMNTOOLS}/../IDE/devenv HIO2DEMO_INSTALL_ROOT=../../../x86/hio2demo if [ "$NDEBUG" ] then tgt="Release"; else tgt="Debug"; fi if [ "$1" == "/clean" ] then "${MSDEV}" vc++/${MODULENAME}.sln /clean Debug; "${MSDEV}" vc++/${MODULENAME}.sln /clean Release; else if [ "${VS71COMNTOOLS}" == "" ] then echo Visual Studio is not installed. Do nothing. else if [ ! -d ${HIO2DEMO_INSTALL_ROOT} ] ; then \ echo "Creating ${HIO2DEMO_INSTALL_ROOT}..." ; \ mkdir -p ${HIO2DEMO_INSTALL_ROOT} ; \ fi ; \ for p in $PROJECTS; do \ "${MSDEV}" vc++/${MODULENAME}.sln /rebuild ${tgt} /project ${p}; if [ "${tgt}" == "Release" ] then echo "Copying RELEASE version..." cp -f vc++/${p}/Release/${p}.${BINSUFFIX} ${HIO2DEMO_INSTALL_ROOT} else echo "Copying DEBUG version..." cp -f vc++/${p}/Debug/${p}.${BINSUFFIX} ${HIO2DEMO_INSTALL_ROOT}/${p}D.${BINSUFFIX} fi done fi fi