Edit

kc3-lang/SDL/premake/Xcode/build-scripts/build.all.xcode4.x86_64.command

Branch :

  • Show log

    Commit

  • Author : Philipp Wiesemann
    Date : 2015-06-21 17:33:46
    Hash : 0e45984f
    Message : Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().

  • premake/Xcode/build-scripts/build.all.xcode4.x86_64.command
  • #!/bin/sh
    
    testsTotal=0
    testsPassed=0
    testsFailed=0
    testsSkipped=0
    
    function build() {
    	testsTotal=$(($testsTotal + 1))
    	if [ -d "tests/$1" ]; then
    		"xcodebuild" ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO -workspace ./SDL.xcworkspace/ -scheme "$1"
    		if [ $? -ne 0 ]; then
    			testsFailed=$(($testsFailed + 1))
    		else
    			testsPassed=$(($testsPassed + 1))
    		fi
    		echo "\033]0;Building: $1\007"
    	else
    		testsSkipped=$(($testsSkipped + 1))
    	fi
    }
    
    # change to directory above command file
    cd `dirname $0`/..
    
    # build all of the tests
    for d in ./tests/*; do
    	build `basename $d`
    done
    
    echo "Build Summary: Total=$testsTotal Passed=$testsPassed Failed=$testsFailed Skipped=$testsSkipped"
    
    cd ..