Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
jK committed Mar 23, 2013
2 parents 519cdef + 59ac6a3 commit 069511a
Show file tree
Hide file tree
Showing 443 changed files with 14,639 additions and 5,260 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Expand Up @@ -55,6 +55,13 @@ progress.make
/rts/build/vstudio8/Release+MT with error catching
/rts/build/vstudio8/Syncdebug

/rts/build/vstudio10/Release
/rts/build/vstudio10/Debug
/rts/build/vstudio10/Debug+MT
/rts/build/vstudio10/Release with error catching
/rts/build/vstudio10/Release+MT with error catching
/rts/build/vstudio10/Syncdebug

# Windows libraries used by spring when compiling with MinGW
# recommended: place the dir somewhere else, and specify with
# MINGWLIBS=<your-path-here>/mingwlibs
Expand Down
2 changes: 1 addition & 1 deletion AI/Skirmish/Shard
2 changes: 1 addition & 1 deletion AI/Wrappers/LegacyCpp/CommandQueue.cpp
Expand Up @@ -5,7 +5,7 @@
#include "System/creg/creg_cond.h"

#ifdef USING_CREG
creg::Class* springLegacyAI::CCommandQueue::GetClass() {
creg::Class* springLegacyAI::CCommandQueue::GetClass() const {
return NULL;
}
#endif
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -235,6 +235,11 @@ if (HEADLESS_SYSTEM AND NOT NO_SOUND)
message(FATAL_ERROR "HEADLESS_SYSTEM requires NO_SOUND to be set!")
endif (HEADLESS_SYSTEM AND NOT NO_SOUND)

set(USE_LIBSQUISH TRUE CACHE BOOL "Enable libsquish for DXT decompressing. (needed for ETC1 support)")
if (USE_LIBSQUISH)
add_definitions(-DUSE_LIBSQUISH)
endif (USE_LIBSQUISH)


### external libs
if (MINGW)
Expand Down
50 changes: 40 additions & 10 deletions buildbot/master/master.cfg
Expand Up @@ -151,12 +151,25 @@ class BuildConfig(Compile):
descriptionDone = [WithProps('built %(bc)s config')]
command = ['make', '--no-print-directory', '-k', WithProps('-j%(jobs:-1)s'), WithProps('-l%(load:-)s'), '-C', WithConfig('build/%s')]

class BuildConfigNinja(Compile):
name = 'buildConfigNinja'
warnOnWarnings = True
description = [WithProps('building %(bc)s config')]
descriptionDone = [WithProps('built %(bc)s config')]
command = ['ninja', '-k 10', WithProps('-j%(jobs:-1)s'), '-C', WithConfig('build/%s')]

class TestConfig(Test):
name = 'testConfig'
description = [WithProps('testing %(bc)s config')]
descriptionDone = [WithProps('tested %(bc)s config')]
command = ['make', '--no-print-directory', '-k', WithProps('-j%(jobs:-1)s'), WithProps('-l%(load:-)s'), '-C', WithConfig('build/%s'), 'check']

class TestConfigNinja(Test):
name = 'testConfig'
description = [WithProps('testing %(bc)s config')]
descriptionDone = [WithProps('tested %(bc)s config')]
command = ['ninja', '-k 10', WithProps('-j%(jobs:-1)s'), '-C', WithConfig('build/%s'), 'check']

class CreateBuildDir(ShellCommand) :
name = "build dir create"
haltOnFailure = True
Expand Down Expand Up @@ -335,6 +348,13 @@ class ShowSharedLinkedLibraries(ShellCommand) :
warnOnWarnings = True
command = ['./buildbot/slave/linux/static-show-used-dynamic-libraries.sh', WithConfig('build/%s/spring')]

class ShowSharedLinkedLibrariesUnitsync(ShellCommand) :
name = "ldd"
description = "running ldd on unitsync"
descriptionDone = "remaining libraries"
warnOnWarnings = True
command = ['./buildbot/slave/linux/static-show-used-dynamic-libraries.sh', WithConfig('build/%s/libunitsync.so')]

class SwitchToLatestBoost(ShellCommand):
name = 'latest boost script'
description = "switching to latest boost"
Expand Down Expand Up @@ -373,9 +393,9 @@ class WindowsFullBuildFactory(BuildFactory):
self.addStep( InitSubmodules() )
self.addStep( UpdateMingwLibs() )
self.addStep( CreateBuildDir() )
self.addStep( BuildConfig() )
self.addStep( BuildConfigNinja() )
self.addStep( CreateInstaller() )
self.addStep( TestConfig() )
self.addStep( TestConfigNinja() )
self.addStep( RsyncStuff() )

class LinuxFullBuildFactory(BuildFactory):
Expand Down Expand Up @@ -417,8 +437,8 @@ class LinuxStaticBuildFactory(BuildFactory):
self.addStep( SyncSubmodules() )
self.addStep( InitSubmodules() )
self.addStep( CreateBuildDir() )
self.addStep( BuildConfig() )
self.addStep( TestConfig() )
self.addStep( BuildConfigNinja() )
self.addStep( TestConfigNinja() )
self.addStep( TestIfStaticLinked(libname="boost") )
self.addStep( TestIfStaticLinked(libname="minizip") )
self.addStep( TestIfStaticLinked(libname="libz.", name="zlib") )
Expand All @@ -438,6 +458,7 @@ class LinuxStaticBuildFactory(BuildFactory):
self.addStep( TestIfStaticLinked(libname="libm", name="math") )
self.addStep( TestIfStaticLinked(libname="libpthread", name="pthread") )
self.addStep( ShowSharedLinkedLibraries() )
self.addStep( ShowSharedLinkedLibrariesUnitsync() )
self.addStep( CreateLinuxStaticBundle() )
self.addStep( RsyncStuff() )
self.addStep( LocalPostScript() )
Expand Down Expand Up @@ -467,7 +488,7 @@ class LatestBoostBuildFactory(BuildFactory):
self.addStep( InitSubmodules() )
self.addStep( CreateBuildDir() )
self.addStep( BuildConfig() )
self.addStep( TestConfig() )
self.addStep( TestConfigNinja() )
self.addStep( SwitchToStableBoost() )
self.addStep( LocalPostScript() )

Expand Down Expand Up @@ -518,7 +539,7 @@ class ValidationBuildFactory(BuildFactory):
self.addStep( ValidationTestRun(extra_opts="E323AI.script.txt") )
self.addStep( ValidationTestRun(extra_opts="Shard.script.txt") )
self.addStep( ValidationTestAnalyze() )

self.addStep( RsyncStuff() )

class MingwLibsBuildFactory(BuildFactory):
def __init__(self):
Expand Down Expand Up @@ -554,7 +575,8 @@ windows_builder_test = {
' -DMINGWLIBS:PATH=/slave/mingwlibs'
' -DCMAKE_FIND_ROOT_PATH:PATH=/usr/lib/gcc/i686-mingw32;/usr/i686-mingw32'
' -DWINDRES:STRING=i686-mingw32-windres'
' -DCMAKE_SYSTEM_NAME:STRING=Windows',
' -DCMAKE_SYSTEM_NAME:STRING=Windows'
' -G Ninja',
'CXX' : 'i686-mingw32-g++',
'CC' : 'i686-mingw32-gcc',
'MINGWLIBS_PATH' : '/slave/mingwlibs'
Expand Down Expand Up @@ -586,7 +608,9 @@ linux_static_builder_x64 = {
'factory': LinuxStaticBuildFactory(),
'env': {
'OUTPUTDIR' : 'linux64',
'CMAKEPARAM': '-DCMAKE_TOOLCHAIN_FILE:PATH=../../buildbot/slave/linux/linuxStatic.cmake'
'CMAKEPARAM':
' -DCMAKE_TOOLCHAIN_FILE:PATH=../../buildbot/slave/linux/linuxStatic.cmake'
' -G Ninja'
}
}

Expand All @@ -606,10 +630,12 @@ linux_static_builder_x32 = {
'CMAKEPARAM':
' -DCMAKE_TOOLCHAIN_FILE:PATH=../../buildbot/slave/linux/linuxStatic.cmake'
' -DCMAKE_SYSTEM_NAME:STRING=Linux'
" -DCMAKE_FIND_ROOT_PATH:PATH=/usr/i686-pc-linux-gnu;/usr/lib/gcc/i686-pc-linux-gnu"
' -DCMAKE_FIND_ROOT_PATH:PATH=/usr/i686-pc-linux-gnu;/usr/lib/gcc/i686-pc-linux-gnu'
' -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM:STRING=NEVER'
' -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY:STRING=ONLY'
' -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE:STRING=ONLY'
' -G Ninja'

}
}

Expand Down Expand Up @@ -656,7 +682,11 @@ validation_builder = {
'slavenames': ['zydox1', 'abma1'],
'builddir': 'zydox-fedora',
'factory': ValidationBuildFactory(),
'properties': {'default-config': 'validation'}
'properties': {'default-config': 'validation'},
'env': {
'CMAKEPARAM':
'-G Ninja'
}
}

mingwlibs_builder = {
Expand Down
31 changes: 10 additions & 21 deletions buildbot/slave/linux/create_linux_static_bundle.sh
Expand Up @@ -2,7 +2,7 @@
set -e
. buildbot/slave/prepare.sh

FILEPREFIX="linux-static"
FILEPREFIX="${OUTPUTDIR}-static"

DEST=${TMP_BASE}/inst
INSTALLDIR=${DEST}
Expand All @@ -11,17 +11,20 @@ echo "Installing into $DEST"

#Ultra settings, max number of threads taken from commandline.
SEVENZIP="nice -19 ionice -c3 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on -mmt=${2:-on}"
SEVENZIP_NONSOLID="nice -19 ionice -c3 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=off -mmt=${2:-on}"
ZIP="zip -r9"

cd ${BUILDDIR}
make install DESTDIR=${DEST}
DESTDIR=${DEST} ninja install
cd ${INSTALLDIR}


BINARIES="spring* lib*.so pr-downloader $(find AI/Skirmish -name libSkirmishAI.so) $(find AI/Interfaces -name libAIInterface.so)"
EXECUTABLES="spring* lib*.so pr-downloader $(find AI/Skirmish -name libSkirmishAI.so) $(find AI/Interfaces -name libAIInterface.so)"

DEBUGFILES=""

#strip symbols into a separate file
for tostripfile in ${BINARIES}; do
for tostripfile in ${EXECUTABLES}; do
if [ -f ${tostripfile} ]; then
if readelf -h ${tostripfile} &> /dev/null; then
# dont strip binaries that we processed earlier
Expand All @@ -31,6 +34,7 @@ for tostripfile in ${BINARIES}; do
objcopy --only-keep-debug ${tostripfile} ${debugfile}
strip --strip-debug --strip-unneeded ${tostripfile}
objcopy --add-gnu-debuglink=${debugfile} ${tostripfile}
DEBUGFILES="${DEBUGFILES} ${debugfile}"
else
echo "not stripping ${tostripfile}"
fi
Expand Down Expand Up @@ -60,23 +64,8 @@ fi

mkdir -p ${TMP_PATH}

#create archives for translate_stacktrace.py
for tocompress in ${BINARIES}; do
if [ -f ${tocompress} ]; then
if readelf -h ${tocompress} &> /dev/null; then
#get parent-parent-directory name of file
name=$(basename $(dirname $(dirname ${tocompress})))

#set to filename without suffix if no parent dir
if [ ${name} == "." ]; then
name=${tocompress%.*}
fi
debugfile=${tocompress%.*}.dbg
archive_debug="${TMP_PATH}/${VERSION}_${name}_${FILEPREFIX}_dbg.7z"
[ -f ${debugfile} ] && ${SEVENZIP} "${archive_debug}" ${debugfile} && rm ${debugfile}
fi
fi
done
#create archive for translate_stacktrace.py
${SEVENZIP_NONSOLID} ${TMP_PATH}/${VERSION}_spring_dbg.7z ${DEBUGFILES}


#absolute path to the minimal portable (engine, unitsync + ais)
Expand Down
2 changes: 1 addition & 1 deletion buildbot/slave/rsync.sh
Expand Up @@ -5,7 +5,7 @@ set -e
REMOTE_HOST=springrts.com
REMOTE_USER=buildbot
REMOTE_BASE=/home/buildbot/www
RSYNC="rsync -avz --chmod=D+rx,F+r --bwlimit 4000"
RSYNC="rsync -avz --chmod=D+rx,F+r --bwlimit 4000 --exclude=download/ --exclude=tests/"
REMOTE_RSYNC="nice -19 ionice -c3 rsync" #prevent QQ about rsync killing server

umask 022
Expand Down
3 changes: 2 additions & 1 deletion buildbot/slave/validation/tests-analyze.sh
Expand Up @@ -35,6 +35,7 @@ for i in $(find ${TESTDIR}/.spring -maxdepth 1 -type f -name "core.*") ; do
done
if [ $EXITCODE -ne 0 ]; then
echo Tests failed, uploading spring writeable dir
buildbot/slave/validation/upload.sh ${CONFIG} ${BRANCH}
mkdir -p ${TMP_PATH}/validation/
mv ${TMP_BASE}/tests/.spring/ ${TMP_PATH}/validation/
fi
exit $EXITCODE
5 changes: 0 additions & 5 deletions buildbot/slave/validation/tests-cleanup.sh
Expand Up @@ -6,11 +6,6 @@ set -e

TESTDIR=${TMP_BASE}/tests

#FIXME/HACK reset directory permissions
if [ -d ${TESTDIR}/usr/local/share/games/spring ]; then
chmod 755 ${TESTDIR}/usr/local/share/games/spring
fi

#cleanup
rm -rf ${TESTDIR}

7 changes: 2 additions & 5 deletions buildbot/slave/validation/tests-prepare.sh
Expand Up @@ -18,10 +18,7 @@ fi

#install
cd ${BUILDDIR}
make install-spring-headless install-pr-downloader demotool unitsyncTest lua2php DESTDIR=${TESTDIR}

# HACK/FIXME force spring to detect install dir as read-only
chmod 555 ${TESTDIR}/usr/local/share/games/spring
DESTDIR=${TESTDIR} ninja install-spring-headless install-pr-downloader demotool unitsyncTest lua2php

cd ${SOURCEDIR}

Expand Down Expand Up @@ -66,7 +63,7 @@ cp -v ${SOURCEDIR}/test/validation/LuaUI/Config/ZK_data.lua ${CONTENT_DIR}/LuaUI
cp -v ${SOURCEDIR}/cont/springrc-template-headless.txt ${TESTDIR}/.springrc

#set data directory to test directory
echo "SpringData = ${TESTDIR}/usr/local/share/games/spring" >> ${TESTDIR}/.springrc
echo "SpringData = ${CONTENT_DIR}:${TESTDIR}/usr/local/share/games/spring" >> ${TESTDIR}/.springrc

makescript "$GAME1" "$MAP" AAI 0.9
makescript "$GAME1" "$MAP" E323AI 3.25.0
Expand Down
12 changes: 0 additions & 12 deletions buildbot/slave/validation/upload.sh

This file was deleted.

22 changes: 7 additions & 15 deletions buildbot/slave/win/make_installer.sh
Expand Up @@ -11,6 +11,7 @@ echo "Installing into $DEST"

#Ultra settings, max number of threads taken from commandline.
SEVENZIP="nice -19 ionice -c3 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on -mmt=${2:-on}"
SEVENZIP_NONSOLID="nice -19 ionice -c3 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=off -mmt=${2:-on}"
ZIP="zip -r9"

if [ -z $MINGWLIBS_PATH ]; then
Expand All @@ -24,11 +25,12 @@ if [ -z "$MINGW_HOST" ]; then
fi

cd ${BUILDDIR}
make install DESTDIR=${DEST}
DESTDIR=${DEST} ninja install

#strip symbols and archive them
cd ${INSTALLDIR}
EXECUTABLES="spring.exe spring-dedicated.exe spring-multithreaded.exe spring-headless.exe unitsync.dll springserver.dll $(find AI/Skirmish -name SkirmishAI.dll) $(find AI/Interfaces -name AIInterface.dll) $(find -name pr-downloader.exe -or -name pr-downloader_shared.dll -printf '%f ')"
EXECUTABLES="$(find -name '*.exe' -printf ' %f') unitsync.dll springserver.dll $(find AI/Skirmish -name SkirmishAI.dll) $(find AI/Interfaces -name AIInterface.dll) $(find -name pr-downloader_shared.dll -printf ' %f')"
DEBUGFILES=""
for tostripfile in ${EXECUTABLES}; do
if [ -f ${tostripfile} ]; then
# dont strip binaries that we processed earlier
Expand All @@ -38,6 +40,7 @@ for tostripfile in ${EXECUTABLES}; do
${MINGW_HOST}objcopy --only-keep-debug ${tostripfile} ${debugfile}
${MINGW_HOST}strip --strip-debug --strip-unneeded ${tostripfile}
${MINGW_HOST}objcopy --add-gnu-debuglink=${debugfile} ${tostripfile}
DEBUGFILES="${DEBUGFILES} ${debugfile}"
else
echo "not stripping ${tostripfile}"
fi
Expand All @@ -62,19 +65,8 @@ for file in spring-dedicated.exe spring-headless.exe; do
${SEVENZIP} ${TMP_PATH}/${VERSION}_${name}.7z ${file}
done

#create archives for translate_stacktrace.py
for tocompress in ${EXECUTABLES}; do
#get parent-parent-directory name of file
name=$(basename $(dirname $(dirname ${tocompress})))

#set to filename without suffix if no parent dir
if [ ${name} == "." ]; then
name=${tocompress%.*}
fi
debugfile=${tocompress%.*}.dbg
archive_debug="${TMP_PATH}/${VERSION}_${name}_dbg.7z"
[ ! -f ${debugfile} ] || ${SEVENZIP} "${archive_debug}" ${debugfile}
done
#create archive for translate_stacktrace.py
${SEVENZIP_NONSOLID} ${TMP_PATH}/${VERSION}_spring_dbg.7z ${DEBUGFILES}

cd ${SOURCEDIR}

Expand Down
6 changes: 3 additions & 3 deletions buildbot/version_list/list.php
Expand Up @@ -2,7 +2,7 @@

/**
lists all engine versions with metadata in json
*/

$allowed = array(
Expand Down Expand Up @@ -55,8 +55,8 @@ function getFileInfo($os, $regex, $path){
$regexes = array(
"windows" => "/win32\/spring_(.*)_minimal-portable.7z$/",
"macosx" => "/osx64\/[sS]pring_(.*)[_-]MacOSX-.*.zip$/",
"linux" => "/linux\/spring_(.*)_minimal-portable-linux-static.7z$/",
"linux64" => "/linux64\/spring_(.*)_minimal-portable-linux-static.7z$/"
"linux" => "/linux32\/spring_(.*)_minimal-portable-linux32-static.7z$/",
"linux64" => "/linux64\/spring_(.*)_minimal-portable-linux64-static.7z$/"
);
while(count($dirs)>0) {
$cur = array_pop($dirs);
Expand Down

0 comments on commit 069511a

Please sign in to comment.