From 166c4172047bacadf613e560a3b971f18dd36202 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 6 Mar 2013 16:04:06 -0600 Subject: [PATCH 1/6] autobuild: Enable Ogg Vorbis, Freetype, and MDR model support Removed unneeded SDL packages. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 17031b45..818e49a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,11 @@ compiler: - gcc - clang -script: make +script: make USE_CODEC_VORBIS=1 USE_FREETYPE=1 CFLAGS=-DRAVENMD4 before_install: - sudo apt-get update -qq - - sudo apt-get install -qq libgl1-mesa-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev + - sudo apt-get install -qq libgl1-mesa-dev libsdl1.2-dev libvorbis-dev libfreetype6-dev notifications: - irc: "irc.freenode.org#ioquake3" \ No newline at end of file + irc: "irc.freenode.org#ioquake3" From 4e5b84fe8f458763452cae9b75d2508a804bd51e Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 6 Mar 2013 16:57:02 -0600 Subject: [PATCH 2/6] autobuild: test default build, with extra options, and mingw --- .travis.yml | 4 ++-- build-test.sh | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100755 build-test.sh diff --git a/.travis.yml b/.travis.yml index 818e49a9..f4791b10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,11 @@ compiler: - gcc - clang -script: make USE_CODEC_VORBIS=1 USE_FREETYPE=1 CFLAGS=-DRAVENMD4 +script: ./build-test.sh before_install: - sudo apt-get update -qq - - sudo apt-get install -qq libgl1-mesa-dev libsdl1.2-dev libvorbis-dev libfreetype6-dev + - sudo apt-get install -qq libgl1-mesa-dev libsdl1.2-dev libvorbis-dev libfreetype6-dev mingw32 notifications: irc: "irc.freenode.org#ioquake3" diff --git a/build-test.sh b/build-test.sh new file mode 100755 index 00000000..3e920bb8 --- /dev/null +++ b/build-test.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +failed=0; + +# Default Build +(make) || failed=1; + +# Test additional options +(make USE_CODEC_VORBIS=1 USE_FREETYPE=1 CFLAGS=-DRAVENMD4) || failed=1; + +# Test mingw +(exec ./cross-make-mingw.sh) || failed=1; + +if [ $failed -eq 1 ]; then + echo "Build failure."; +else + echo "All builds successful."; +fi + +exit $failed; + From 361c71f8afb4bd50b75bcdc84ceee1faaa2cddc8 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 6 Mar 2013 17:24:59 -0600 Subject: [PATCH 3/6] autobuild: try to fix extra options build and mingw builds --- build-test.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build-test.sh b/build-test.sh index 3e920bb8..db582c0c 100755 --- a/build-test.sh +++ b/build-test.sh @@ -6,10 +6,15 @@ failed=0; (make) || failed=1; # Test additional options +make clean (make USE_CODEC_VORBIS=1 USE_FREETYPE=1 CFLAGS=-DRAVENMD4) || failed=1; -# Test mingw -(exec ./cross-make-mingw.sh) || failed=1; +# Test mingw (gcc) +if [ "$CC" = "gcc" ]; then + # clear CC so script will set it. + export CC= + (exec ./cross-make-mingw.sh) || failed=1; +fi if [ $failed -eq 1 ]; then echo "Build failure."; From a737d442a0130e91184819bebf9f58bf1c48bb2a Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 6 Mar 2013 17:52:06 -0600 Subject: [PATCH 4/6] Fix RAVENMD4 warnings in OpenGL2 --- code/renderergl2/tr_model.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/renderergl2/tr_model.c b/code/renderergl2/tr_model.c index 5aeab8ef..69b5095e 100644 --- a/code/renderergl2/tr_model.c +++ b/code/renderergl2/tr_model.c @@ -1403,7 +1403,7 @@ static mdvTag_t *R_GetTag( mdvModel_t *mod, int frame, const char *_tagName ) { } #ifdef RAVENMD4 -void R_GetAnimTag( mdrHeader_t *mod, int framenum, const char *tagName, md3Tag_t * dest) +void R_GetAnimTag( mdrHeader_t *mod, int framenum, const char *tagName, mdvTag_t * dest) { int i, j, k; int frameSize; @@ -1421,8 +1421,6 @@ void R_GetAnimTag( mdrHeader_t *mod, int framenum, const char *tagName, md3Tag_t { if ( !strcmp( tag->name, tagName ) ) { - Q_strncpyz(dest->name, tag->name, sizeof(dest->name)); - // uncompressed model... // frameSize = (intptr_t)( &((mdrFrame_t *)0)->bones[ mod->numBones ] ); @@ -1444,7 +1442,6 @@ void R_GetAnimTag( mdrHeader_t *mod, int framenum, const char *tagName, md3Tag_t AxisClear( dest->axis ); VectorClear( dest->origin ); - strcpy(dest->name,""); } #endif @@ -1457,7 +1454,7 @@ int R_LerpTag( orientation_t *tag, qhandle_t handle, int startFrame, int endFram float frac, const char *tagName ) { mdvTag_t *start, *end; #ifdef RAVENMD4 - md3Tag_t start_space, end_space; + mdvTag_t start_space, end_space; #endif int i; float frontLerp, backLerp; From 97fc98d26b61b5f79e32963405f795e21bb4e3a4 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 6 Mar 2013 18:00:03 -0600 Subject: [PATCH 5/6] Improve build-test.sh for non-travis-ci usage --- build-test.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build-test.sh b/build-test.sh index db582c0c..afdedc10 100755 --- a/build-test.sh +++ b/build-test.sh @@ -9,17 +9,20 @@ failed=0; make clean (make USE_CODEC_VORBIS=1 USE_FREETYPE=1 CFLAGS=-DRAVENMD4) || failed=1; -# Test mingw (gcc) -if [ "$CC" = "gcc" ]; then - # clear CC so script will set it. - export CC= - (exec ./cross-make-mingw.sh) || failed=1; +# Test mingw +if [ "$CC" = "clang" ]; then + # skip mingw if travis-ci clang build + echo "Skipping mingw build because there is no mingw clang compiler available."; +else + # clear CC so cross-make-mingw script will set it. + export CC= + (exec ./cross-make-mingw.sh) || failed=1; fi if [ $failed -eq 1 ]; then - echo "Build failure."; + echo "Build failure."; else - echo "All builds successful."; + echo "All builds successful."; fi exit $failed; From a0f74366a7477d822c640931cf3a918549b2f6c8 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 6 Mar 2013 19:04:30 -0600 Subject: [PATCH 6/6] build-test.sh always run clean first, for non-travis-ci --- build-test.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build-test.sh b/build-test.sh index afdedc10..9b984e72 100755 --- a/build-test.sh +++ b/build-test.sh @@ -3,11 +3,10 @@ failed=0; # Default Build -(make) || failed=1; +(make clean release) || failed=1; # Test additional options -make clean -(make USE_CODEC_VORBIS=1 USE_FREETYPE=1 CFLAGS=-DRAVENMD4) || failed=1; +(make clean release USE_CODEC_VORBIS=1 USE_FREETYPE=1 CFLAGS=-DRAVENMD4) || failed=1; # Test mingw if [ "$CC" = "clang" ]; then @@ -16,7 +15,7 @@ if [ "$CC" = "clang" ]; then else # clear CC so cross-make-mingw script will set it. export CC= - (exec ./cross-make-mingw.sh) || failed=1; + (exec ./cross-make-mingw.sh clean release) || failed=1; fi if [ $failed -eq 1 ]; then