#! bash ############################################################################### # BuildScript for SampleTool # # Copyright (C) 2005-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 is *.sln filename. It is same as $(SDK)/build/tools/$MODULENAME. MODULENAME="gd" # PROJECTS lists all VC project that will be linked. PROJECTS="gd" # select one suffix of target file. "exe" or "dll", "lib", "bin"... BINSUFFIX=lib ############################################################################ # do operation ############################################################################ case "${BINSUFFIX}" in "exe") X86_INSTALL_ROOT=${REVOLUTION_SDK_ROOT}/X86/bin ;; "dll") X86_INSTALL_ROOT=${REVOLUTION_SDK_ROOT}/X86/lib ;; "lib") X86_INSTALL_ROOT=${REVOLUTION_SDK_ROOT}/X86/lib ;; "bin") X86_INSTALL_ROOT=${REVOLUTION_SDK_ROOT}/X86/bin ;; esac # Visual C++ IDE install path #MSDEV=${VS71COMNTOOLS}/../IDE/devenv MSDEV=${VS80COMNTOOLS}/../IDE/devenv.com MSDEV_EXPRESS=${VS80COMNTOOLS}/../IDE/VCExpress.exe if [ ! -e "$MSDEV" ]; then if [ -e "$MSDEV_EXPRESS" ]; then MSDEV=${MSDEV_EXPRESS} fi fi 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 [ "${VS80COMNTOOLS}" == "" ] then echo Visual Studio is not installed. Do nothing. else if [ ! -d ${X86_INSTALL_ROOT} ] ; then \ echo "Creating ${X86_INSTALL_ROOT}..." ; \ mkdir -p ${X86_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++/Release/${p}.${BINSUFFIX} ${X86_INSTALL_ROOT} # else # echo "Copying DEBUG version..." # cp -f vc++/Debug/${p}.${BINSUFFIX} ${X86_INSTALL_ROOT}/${p}D.${BINSUFFIX} # fi done fi fi