123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #!/bin/bash
- #
- # idebuild -- Build a project using the native IDE
- #
- PRODUCT=goahead
- XCODE=/usr/bin/xcodebuild
- PROFILE=default
- BINARIES="goahead goahead-test gopass"
- LIBRARIES="libgo"
- # Just for VS
- unset TEMP TMP
- for v in 12 11 10
- do
- VS="/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/devenv.exe"
- if [ -x "${VS}" ] ; then
- break
- fi
- done
- log() {
- tag=$1
- shift
- printf "%12s %s\n" $tag "$*"
- }
- if [ -x "${VS}" ] ; then
- log "[Test]" "Building ${PRODUCT} Visual Studio Project"
- "${VS}" projects/${PRODUCT}-windows-${PROFILE}.sln /upgrade
- "${VS}" projects/${PRODUCT}-windows-${PROFILE}.sln /clean
- "${VS}" projects/${PRODUCT}-windows-${PROFILE}.sln /build
- for f in $BINARIES
- do
- echo check $f
- if [ ! -f build/windows-x86-${PROFILE}/bin/${f}.exe ] ; then
- echo "VS IDE build is missing $f.exe"
- exit 255
- fi
- done
- for f in $LIBRARIES
- do
- echo check $f
- if [ ! -f build/windows-x86-${PROFILE}/bin/${f}.dll ] ; then
- echo "VS IDE build is missing $f.dll"
- exit 255
- fi
- done
- fi
- if [ -x "${XCODE}" ] ; then
- log "[Test]" "Building ${PRODUCT} Xcode Project"
- "${XCODE}" -project projects/${PRODUCT}-macosx-${PROFILE}.xcodeproj -alltargets clean
- "${XCODE}" -project projects/${PRODUCT}-macosx-${PROFILE}.xcodeproj -alltargets build
- fi
|