Commit 1d34fb44 authored by Manuel Moos's avatar Manuel Moos
Browse files

Merge from 0.2.9 with adaptions

Closes #88

See merge request !121
parents 2bad4141 b20f0862
Pipeline #266683336 passed with stages
in 46 minutes and 29 seconds
......@@ -102,3 +102,4 @@ src/.cproject
src/.project
src/.settings
autogen.sh
.vscode
......@@ -29,11 +29,10 @@ default:
# common before script: bootstrap, configure, make dist, prepare docker builds
before_script:
- if ! test -d gitlab_build; then
- docker help > /dev/null
- which docker && docker help > /dev/null
- touch timestamp.tag
- test "x${ARMAGETRONAD_FAKERELEASE}" == "x" && export ARMAGETRONAD_FAKERELEASE=false
- test -r configure || ./bootstrap.sh
- ls docker/build -al
- cat version.m4
- mkdir -p gitlab_build
- cd gitlab_build
......@@ -41,7 +40,7 @@ default:
- ../configure --prefix=/usr/local --disable-glout --disable-sysinstall --disable-desktop progname="${PROGRAM_NAME}" progtitle="${PROGRAM_TITLE}"
- test "x${ARMAGETRONAD_FAKERELEASE}" == "xtrue" && cp ../docker/build/fakerelease_proto.sh docker/build/fakerelease.sh
- cd docker/build
- make CI_prepare -j`nproc`
- make CI_prepare -j`nproc || echo 3`
- cd ../../../
- else
- find . -newer timestamp.tag ! -path "./gitlab_build" -exec touch -r timestamp.tag \{\} \;
......@@ -228,6 +227,27 @@ build_server_32:
- gitlab_build/docker/build/
expire_in: 1 day
# macOS builds need a special runner, but can start early.
# iIt should build directly from git content, the prepared linux source directories have soft links that won't work.
build_macos:
needs: []
dependencies: []
tags:
- macos
stage: build_main
rules:
- if: $CI_MERGE_REQUEST_ID
when: never
- when: on_success
script:
- docker/scripts/obsolete.sh || exit 0
- gitlab_build/docker/build/make_ci.sh macOS -j`nproc || echo 3`
artifacts:
paths:
- gitlab_build/docker/build/upload
- gitlab_build/docker/build/macOS/*.tag
expire_in: 1 day
build_collect:
stage: build_collect
rules:
......
......@@ -775,6 +775,8 @@ GENERICUNIX
SDL2_CONFIG_DEFAULT=sdl2-config
SDL_CONFIG_DEFAULT=sdl-config
macosx=false
OBJC="not_needed_on_this_platform"
dnl *************************************************
dnl GL AND MATHLIB SELECTION ( SYSTEM DEPENDANT)
......@@ -800,6 +802,8 @@ case "$target" in
SYS_GL_LIB=""
SYS_GLU_LIB=""
test x$build_regular = xfalse || LIBS="$LIBS -framework OpenGL -framework CoreFoundation -framework CoreServices"
unset OBJC
macosx=true
default_enable_sysinstall=false
;;
*-*-aix*)
......@@ -832,9 +836,14 @@ SAFEUNIX
;;
esac
dnl Objective C:
AC_PROG_OBJC
test -z "$SDL_CONFIG" && SDL_CONFIG=$SDL_CONFIG_DEFAULT
test -z "$SDL2_CONFIG" && SDL2_CONFIG=$SDL2_CONFIG_DEFAULT
AM_CONDITIONAL(MACOSX, test x$macosx = xtrue)
AC_SUBST(docstyle)
#processor specific setup
......@@ -1510,7 +1519,6 @@ desktop/armagetronad-link.xml
desktop/armagetronad.protocol
desktop/armagetronad.appdata.xml
desktop/os-x/Info.plist
desktop/os-x/entrypoint.sh
desktop/os-x/build_bundle.sh
docker/build/Makefile
docker/build/setup_ci_test.sh
......
......@@ -22,4 +22,6 @@ EXTRA_DIST=icons/16x16/armagetronad.png\
armagetronad-link.xml.in\
armagetronad.protocol.in\
os-x/armagetronad.icns os-x/Info.plist.in\
os-x/armagetronad.icns os-x/background.png\
os-x/armagetronad.icns os-x/armagetronad.icns\
armagetronad.appdata.xml.in
......@@ -6,10 +6,10 @@
<string>English</string>
<key>CFBundleExecutable</key>
<string>@progtitle@</string>
<string>./@prefix@/bin/@progname@</string>
<key>CFBundleIconFile</key>
<string>desktop/os-x/armagetronad.icns</string>
<string>@progtitle@.icns</string>
<key>CFBundleIdentifier</key>
<string>org.armagetronad.@progname@</string>
......
......@@ -10,23 +10,22 @@ BUNDLE="${DIR}/${TITLE}.app"
mkdir -p "${BUNDLE}" || exit $?
# add launcher
cp `dirname $0`/entrypoint.sh "${BUNDLE}/${TITLE}" || exit $?
chmod 755 "${BUNDLE}/${TITLE}" || exit $?
# add plist with @v@ -> value and progtitle replacements
REL_SRCDIR=`echo @srcdir@ | sed -e s,^@top_builddir@/,,` || exit $?
cp "`dirname $0`/Info.plist" "${BUNDLE}/" || exit $?
# add icons
REL_TOP_SRCDIR=`echo @top_srcdir@ | sed -e s,^@top_builddir@/,,` || exit $?
cp "${REL_TOP_SRCDIR}/desktop/os-x/Armagetron Advanced.icns" "${BUNDLE}/${TITLE}.icns"
cp "${REL_TOP_SRCDIR}/desktop/os-x/armagetronad.icns" "${BUNDLE}/${TITLE}.icns"
# install game into bundle
DESTDIR="${BUNDLE}" make install || exit $?
# bundle libraries
(cd "${BUNDLE}"; dylibbundler -od -b -x "./@prefix@/bin/@progname@" -d "./@prefix@/libs/") || exit $?
(cd "${BUNDLE}"; dylibbundler -od -b -x "./@prefix@/bin/@progname@" -d "./@prefix@/libs/" -i /usr/lib/) || exit $?
# for debugging pure app bundle builds
# exit 0
# zip
(cd "${BUNDLE}" && zip -r ../@progname@-@version@.macOS.zip .) || exit $?
......@@ -41,7 +40,7 @@ DESTDIR="${BUNDLE}" make install || exit $?
DMG_SRC=${BUNDLE}
DMG="${DIR}/@progname@-@version@.dmg"
rm -f "${DMG}"
ICON="${REL_TOP_SRCDIR}/desktop/os-x/Armagetron Advanced.icns"
ICON="${REL_TOP_SRCDIR}/desktop/os-x/armagetronad.icns"
BG="${REL_TOP_SRCDIR}/desktop/os-x/background.png"
create-dmg \
--volicon "$ICON" \
......
#!/bin/zsh
cd "`dirname "$0"`"
.@prefix@/bin/@progname@ "$@"
\ No newline at end of file
......@@ -100,4 +100,21 @@ Then, run the runner with
gitlab-runner run
Security and consistency implication: You then only have one docker instance. Jobs running on your runner can therefore modify the same docker images, for example apply tags. Therefore, all our CI scripts reference used images by their digest and use randomized names for containers so they don't get into one another's way.
\ No newline at end of file
Security and consistency implication: You then only have one docker instance. Jobs running on your runner can therefore modify the same docker images, for example apply tags. Therefore, all our CI scripts reference used images by their digest and use randomized names for containers so they don't get into one another's way.
## macOS
macOS builds happen from this directory, too, without the need for docker. Of course, WITH docker, you can do all the other builds on a Mac.
Prerequisites:
brew install pkg-config autoconf automake sdl sdl_image sdl2 sdl2_image sdl2_mixer protobuf-c glew boost ftgl dylibbundler create-dmg wget python3
For a GitLab runner, choose a VirtualBox based runner. Use [this](https://github.com/myspaghetti/macos-virtualbox) script to create a Mojave VM,
then follow the [runner installation instructions](https://docs.gitlab.com/runner/install/osx.html). An important preparation step for building the
.dmg files correctly is that the builder user needs the rights to remote control Finder; for that, just ssh into the machine as the build user (can be from
within the VM itself) and do a test compilation run.
The macOS builds are done with
cd docker/build
make macOS
......@@ -78,7 +78,7 @@ all: default
dockertest.tag:
cp ${srcdir}/fakerelease_proto.sh .
@echo "Testing whether 'docker' works..."
docker help > /dev/null
if which docker; then docker help > /dev/null; fi
echo > $@
tarwrapper.sh: ${top_srcdir}/docker/scripts/tarwrapper.sh
......@@ -216,12 +216,17 @@ context.steam: context.64 gits_artifacts.tag
rm $@.dir/image
echo "armasteam_64" > $@.dir/image
# rebrand
sed -i $@.dir/version.sh -e s/PACKAGE_NAME=armagetronad/PACKAGE_NAME=$(STEAM_PACKAGE_TITLE)/ -e s/PACKAGE_TITLE=\"Armagetron\ Advanced/PACKAGE_TITLE=\"$(STEAM_PACKAGE_TITLE)/ -e s/PACKAGE_TITLE=\"Armagetron/PACKAGE_TITLE=\"$(STEAM_PACKAGE_TITLE)/
rm -f $@.dir/version.sh # required because the source and dest are hard links to the same file originally
sed < $<.dir/version.sh > $@.dir/version.sh -e s/PACKAGE_NAME=armagetronad/PACKAGE_NAME=$(STEAM_PACKAGE_TITLE)/ -e s/PACKAGE_TITLE=\"Armagetron\ Advanced/PACKAGE_TITLE=\"$(STEAM_PACKAGE_TITLE)/ -e s/PACKAGE_TITLE=\"Armagetron/PACKAGE_TITLE=\"$(STEAM_PACKAGE_TITLE)/
# no remotely adult stuff
sed -i $@.dir/source/src/engine/ePlayer.cpp -e "s/pr0n/cat videos/"
rm -f $@.dir/source/src/engine/ePlayer.cpp
sed < $<.dir/source/src/engine/ePlayer.cpp > $@.dir/source/src/engine/ePlayer.cpp -e "s/pr0n/cat videos/"
# install alternative title, adapt sources
cp gits/steam/title.png $@.dir/source/textures/
sed -i $@.dir/source/src/tron/gLogo.cpp $@.dir/source/Makefile.* -e "s,textures/title.jpg,textures/title.png,"
for f in source/src/tron/gLogo.cpp source/src/Makefile.am; do \
rm -f $@.dir/$$f; \
sed < $<.dir/$$f > $@.dir/$$f -e "s,textures/title.jpg,textures/title.png,"; \
done
cd $@.dir/source; automake
# done
echo > $@
......@@ -273,6 +278,48 @@ context.test: rootcontext.64
#***************************************************************
# macOS builds are done without docker
MACOS_CONFIG_ARGS="--disable-sysinstall --disable-etc --prefix=/usr"
MACOS_BUILD_BUNDLE="./desktop/os-x/build_bundle.sh"
macOS/client_build.tag: context.64 #Makefile
mkdir -p macOS/client
cd macOS/client && ../../$<.dir/source/configure "${MACOS_CONFIG_ARGS}" && ${MAKE}
echo > $@
macOS/client.tag: macOS/client_build.tag upload/.tag #Makefile
rm -rf macOS/client/*.app
cd macOS/client && bash ${MACOS_BUILD_BUNDLE}
cp macOS/client/*.dmg macOS/client/*.macOS.zip upload/
echo > $@
macOS/server_build.tag: context.64 #Makefile
mkdir -p macOS/server
cd macOS/server && ../../$<.dir/source/configure --disable-glout "${MACOS_CONFIG_ARGS}" && ${MAKE}
echo > $@
macOS/server.tag: macOS/client.tag macOS/server_build.tag upload/.tag #Makefile
rm -rf macOS/server/*.app
cd macOS/server && bash ${MACOS_BUILD_BUNDLE}
cp macOS/server/*.dmg macOS/server/*.macOS.zip upload/
echo > $@
macOS/steam_build.tag: context.steam #Makefile
mkdir -p macOS/steam
cd macOS/steam && ../../$<.dir/source/configure "${MACOS_CONFIG_ARGS}" progname="${STEAM_PACKAGE_NAME}" progtitle="${STEAM_PACKAGE_TITLE}" && ${MAKE}
echo > $@
macOS/steam.tag: macOS/server.tag macOS/steam_build.tag upload/.tag #Makefile
rm -rf macOS/steam/*.app
cd macOS/steam && bash ${MACOS_BUILD_BUNDLE}
cp macOS/steam/*.dmg macOS/steam/*.macOS.zip upload/
echo > $@
macOS_build: macOS/client_build.tag macOS/server_build.tag #macOS/steam_build.tag
macOS: macOS/client.tag macOS/server.tag #macOS/steam.tag
#***************************************************************
context.build_server_%: context.%
${srcdir}/prepare_context.sh $@.dir $<.dir/'*'
echo "server" > $@.dir/serverclient
......@@ -591,33 +638,6 @@ zeroinstall: zeroinstall.tag
#***************************************************************
# build on the mac via GitHub Actions. Requires staging.
context.macbuild: rootcontext.64 ${srcdir}/../deploy/*_macbuild.sh ${srcdir}/../deploy/wait_for_upload.sh ../deploy/* CI_INFO
${srcdir}/prepare_context.sh $@.dir $<.dir/'*' ../deploy/'*' ${srcdir}/../deploy/*_macbuild.sh ${srcdir}/../deploy/wait_for_upload.sh CI_INFO ${srcdir}/../scripts/.cache/gits/macOS
rm -f $@.dir/image
echo "armadeploy_64" > $@.dir/image
echo > $@
result.macbuild: context.macbuild
+$(srcdir)/context_to_result.sh $@.dir ./deploy_macbuild.sh
echo > $@
# only build macOS if we're not staging
macbuild: macbuild.tag
macbuild.tag: maybe_macbuild_${STAGING}.tag
touch $@
maybe_macbuild_.tag:
touch $@
maybe_macbuild_true.tag:
touch $@
maybe_macbuild_false.tag: result.macbuild upload/.tag
cp $<.dir/upload/${PROGRAM_TITLE}* upload/
# rm -rf steamdirs/steam_macOS.dir
# mkdir -p steamdirs/steam_macOS.dir
# cd steamdirs/steam_macOS.dir; unzip ../../$<.dir/upload/${STEAM_PACKAGE_NAME}-${PACKAGE_VERSION}.macOS.zip
touch $@
#***************************************************************
steamdirs/.tag:
mkdir -p steamdirs
echo > $@
......@@ -695,7 +715,7 @@ deploy_ours: result.deploy_zi result.deploy_download deploy_external
context.deploy_base_%: rootcontext.64 deploy_base.tag ${srcdir}/../deploy/deploy_%.sh ${srcdir}/../deploy/wait_for_upload.sh ../deploy/* CI_INFO
${srcdir}/prepare_context.sh $@.dir $<.dir/'*' upload ../deploy/'*' ${srcdir}/../deploy/deploy_$*.sh ${srcdir}/../deploy/wait_for_upload.sh CI_INFO
echo > $@
context.deploy_%: context.deploy_base_% macbuild
context.deploy_%: context.deploy_base_%
${srcdir}/prepare_context.sh $@.dir $<.dir/'*'
echo > $@
result.deploy_%: context.deploy_%
......@@ -714,8 +734,8 @@ context.deploy_steam: context.deploy_base_steam ${srcdir}/../deploy/steamcontent
echo "steamcmd" > $@.dir/image
echo > $@
context.deploy_gitlab: context.deploy_base_gitlab Makefile
${srcdir}/prepare_context.sh $@.dir $<.dir/'*'
context.deploy_gitlab: rootcontext.64 deploy_base.tag ../deploy/* ${srcdir}/../deploy/deploy_gitlab.sh CI_INFO
${srcdir}/prepare_context.sh $@.dir $<.dir/'*' upload ../deploy/'*' ${srcdir}/../deploy/deploy_gitlab.sh CI_INFO
echo "#/bin/bash" > $@.dir/CI_INFO_DEPLOY_GITLAB
echo "CI_JOB_TOKEN=${CI_JOB_TOKEN}" >> $@.dir/CI_INFO_DEPLOY_GITLAB
echo "CI_API_V4_URL=${CI_API_V4_URL}" >> $@.dir/CI_INFO_DEPLOY_GITLAB
......@@ -849,13 +869,13 @@ intermediateclean:
# keep the artifacts clean of junk not needed in the next phase
artifactclean:
rm *.dir \
rm -rf \
*.dir \
proto/*.dir \
source \
-rf
source
clean: intermediateclean
rm \
rm -rf \
*.tag \
gits \
proto \
......@@ -864,8 +884,9 @@ clean: intermediateclean
source \
steamdirs \
test.* \
upload \
-rf
macOS \
upload
if git -C ${srcdir} rev-parse --abbrev-ref HEAD > /dev/null; then rm -f CI_INFO; fi
distclean: clean
rm -rf $(TARBALL) CI_INFO
......
......@@ -11,7 +11,8 @@
set -x
wd="`dirname $0`"
bic="`readlink -f ${wd}/build_in_container.sh`"
bic="`readlink -f ${wd}/build_in_container.sh 2> /dev/null`" || \
bic="`greadlink -f ${wd}/build_in_container.sh`" || exit $?
name="$1"
shift
......
......@@ -14,20 +14,26 @@ echo -e "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n\
set -x
rm -rf ${target}
mkdir -p ${target}
rm -rf "${target}"
mkdir -p "${target}"
if ! cp -lrf context/version.sh $@ ${target}/; then
rm -rf ${target}/version.sh
cp -lrf context/version.sh ${target}/ || { rm -rf ${target}; exit 1; }
if ! cp -lrf context/version.sh $@ "${target}"/ > /dev/null 2>&1; then
ln -f context/version.sh "${target}"/ || { rm -rf "${target}"; exit 1; }
for f in $@; do
rm -rf ${target}/`basename $f`
cp -lrf $f ${target}/ || { rm -rf ${target}; exit 1; }
rm -rf "${target}/`basename $f`"
if test -f "$f"; then
ln -f "$f" "${target}"/|| { rm -rf "${target}"; exit 1; }
else
if which rsync > /dev/null 2>&1; then
rsync -qav --link-dest="$f" "$f" "${target}/" || { rm -rf "${target}"; exit 1; }
else
cp -lrf "$f" "${target}/" || { rm -rf "${target}"; exit 1; }
fi
fi
done
fi
if test -f fakerelease.sh; then
rm -rf ${target}/fakerelease.sh
cp -lrf fakerelease.sh ${target}/
ln -f fakerelease.sh "${target}/"
fi
......@@ -32,16 +32,16 @@ for f in *; do
*.exe)
WIN_CLIENT=$f
;;
*Dedicated-32bit-${PACKAGE_VERSION}.AppImage)
*Dedicated-32bit*.AppImage)
LIN32_SERVER=$f
;;
*-32bit-${PACKAGE_VERSION}.AppImage)
*-32bit*.AppImage)
LIN32_CLIENT=$f
;;
*Dedicated-${PACKAGE_VERSION}.AppImage)
*Dedicated*.AppImage)
LIN64_SERVER=$f
;;
*-${PACKAGE_VERSION}.AppImage)
*.AppImage)
LIN64_CLIENT=$f
;;
*-client*.tbz|*-server*.tbz)
......
......@@ -24,7 +24,7 @@ function upload(){
}
EXIT=0
for f in upload/*.AppImage upload/*.exe upload/${PACKAGE_NAME}-${PACKAGE_VERSION}*.tbz upload/*source*.zip; do
for f in upload/*.AppImage upload/*.exe upload/${PACKAGE_NAME}-${PACKAGE_VERSION}*.tbz upload/*source*.zip upload/*.dmg; do
if test -r $f; then
upload $f || EXIT=$?
fi
......
#!/bin/bash
# update and push macOS build on GitHib
set +x
mv secrets/ssh ~/.ssh
rm -rf secrets/*
set -x
. ./version.sh || exit $?
. ./targets.sh || exit $?
dd=`dirname $0`
# get tarball URI, make sure it exists
TAR_FILENAME=${PACKAGE_NAME}-${PACKAGE_VERSION}.tbz
TAR_URI=${DOWNLOAD_URI_BASE_STAGING}${TAR_FILENAME}
./wait_for_upload.sh ${TAR_URI} || exit $?
trust_github || exit $?
BRANCH_BASE=${ZI_SERIES}
pushd macOS || exit $?
DEPLOY_BRANCH=deploy_${BRANCH_BASE}_${VERSION_SERIES}
# take current cached revision, put it into the deploy branch
git branch -d ${DEPLOY_BRANCH} > /dev/null 2>&1 || true
git checkout -b ${DEPLOY_BRANCH} || exit $?
git remote add upstream ${MACOS_GIT} || exit $?
STEAM_PACKAGE_NAME=retrocycles
STEAM_PACKAGE_TITLE=Retrocycles
#PACKAGE_NAME_SUFFIX="`echo ${PACKAGE_NAME} | sed -e "s,.*-,-,"`"
#PACKAGE_TITLE_SUFFIX="`echo ${PACKAGE_TITLE} | sed -e "s,.* , ,"`"
#PROGTITLE_RC="${STEAM_PACKAGE_TITLE}${PACKAGE_TITLE_SUFFIX}"
#PROGNAME_RC="${STEAM_PACKAGE_NAME}${PACKAGE_NAME_SUFFIX}"
# write new definiton file
cat > INFO <<EOF
TARBALL=${TAR_URI}
VERSION=${PACKAGE_VERSION}
BRANCH=${ZI_SERIES}
PROGTITLE_RC="${STEAM_PACKAGE_TITLE}"
PROGNAME_RC="${STEAM_PACKAGE_NAME}"
UPLOAD=${UPLOAD_SCP_BASE_STAGING}${SF_DIR}/${PACKAGE_VERSION}/macOS
EOF
cat INFO
CHANGED=`git status --short -uno | sed -e "s/^ . //"`
if test -z "${CHANGED}"; then
echo "Nothing updated."
exit 0
fi
# commit and push
git commit . -m "Update to version ${PACKAGE_VERSION}" || exit $?
if ! test ${STAGING} == true; then
git push --force --set-upstream upstream ${DEPLOY_BRANCH} || exit $?
fi
popd
# cleanup
rm -rf source upload secrets secrets.*
if test ${STAGING} == true; then
# just staging, no actual build is done
exit 0
fi
# wait for result
sleep 300
MACOS_DOWNLOAD=${DOWNLOAD_URI_BASE_STAGING}/macOS/
timeout=5
ERROR=1
while test ${timeout} -gt -1; do
if ./wait_for_upload.sh ${MACOS_DOWNLOAD}mac_is_done.txt; then
timeout=-2
ERROR=0
else
ERROR=$?
fi
timeout=$(( ${timeout} - 1 ))
done
test ${ERROR} == 0 || exit ${ERROR}
mkdir upload
for ext in dmg macOS.zip; do
for base in ${PACKAGE_NAME} ${PACKAGE_NAME}-dedicated; do #${STEAM_PACKAGE_NAME}; do
FILE=${base}-${PACKAGE_VERSION}.${ext}
curl ${MACOS_DOWNLOAD}${FILE} --fail --silent --show-error -L -o upload/${FILE} || exit $?
done
done
......@@ -32,7 +32,6 @@ function ensure_git(){
return 0
}
ensure_git macOS https://github.com/ArmagetronAd/macOS.git || exit $?
ensure_git winlibs https://gitlab.com/armagetronad/winlibs.git || exit $?
ensure_git steam-art https://gitlab.com/armagetronad/steam-art.git master || exit $?
ensure_git pkg2appimage https://github.com/AppImage/pkg2appimage.git master || exit $?
......
......@@ -19,7 +19,6 @@ function fix_gits(){
set -x
# On merge conflicts here: run update_gits.sh, that sorts things out
fix_git macOS 5484667a0237e78239110c6d1a7d8f52eb38dfaa || return $?
fix_git winlibs 1ed9319621779ddb76837ce645e1a68ba7f131bd || return $?
fix_git steam-art 42688f1bcf1bf1f2befc81a1143fb20f346b92f8 || return $?
fix_git pkg2appimage 678e5e14122f14a12c54847213585ea803e1f0e1 || return $?
......
......@@ -48,7 +48,6 @@ function fix_gits(){
EOF
fix_git macOS
fix_git winlibs
fix_git steam-art
fix_git pkg2appimage
......
......@@ -128,14 +128,22 @@ libengine_a_SOURCES=engine/eAdvWall.cpp engine/eAdvWall.h engine/eAuthentication
engine/eWarmup.h engine/eWarmup.cpp \
engine/eLadderLog.h engine/eLadderLog.cpp
librender_a_SOURCES=render/rConsole.cpp render/rConsoleGraph.cpp render/rConsole.h render/rFont.cpp\
if MACOSX
# put extra Objective C files here, like so:
#render_extra=render/rScreenHelper.h render/rScreenHelper.m
render_extra=
else
render_extra=
endif
librender_a_SOURCES=${render_extra} render/rConsole.cpp render/rConsoleGraph.cpp render/rConsole.h render/rFont.cpp\
render/rFont.h render/rGL.cpp render/rGL.h render/rGLEW.h render/rGLRender.cpp render/rModel.cpp render/rModel.h render/rRender.cpp\
render/rDisplayList.h render/rDisplayList.cpp \
render/rRender.h render/rScreen.cpp render/rScreen.h render/rSDL.h render/rSysdep.cpp render/rSysdep.h\
render/rTexture.cpp render/rTexture.h render/rViewport.cpp render/rViewport.h render/rColor.h render/rGradient.cpp render/rGradient.h \
render/rTextureRenderTarget.cpp render/rTextureRenderTarget.h render/rGLuintObject.cpp render/rGLuintObject.h
libtron_a_SOURCES=tron/gAIBase.cpp tron/gAIBase.h tron/gAICharacter.cpp tron/gAICharacter.h tron/gArena.cpp tron/gArena.h\
tron/gArmagetron.cpp tron/gCamera.cpp tron/gCamera.h tron/gCycle.cpp tron/gCycle.h tron/gCycleMovement.cpp\
tron/gJoystick.h tron/gJoystick.cpp\
......
......@@ -34,11 +34,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//#pragma warning ( disable : 4800 4081 4244 4305 4244 4250 4541)
#endif
#ifndef __deprecated
#ifdef __GNUC__
# define __deprecated __attribute__((deprecated))
#else
# define __deprecated
#endif
#endif
#include "aa_config.h"
......
......@@ -758,7 +758,7 @@ tMemManager::tMemManager(int s):size(s){//,blocks(1000),full_blocks(1000){
std::ifstream l(leakname);
while (l.good() && !l.eof()){
int cs{-1},ln{0};
int cs = -1,ln = 0;
l >> cs >> ln;
if (cs>=0 && cs < MAXCHECKSUM && (ln < leaks[cs] || leaks[cs] == 0))
......