CMakeLists.txt:checking, tuning the build system (#232)

* build.zg.sh scripts deprected

* update for BSD

* removed checking for VLC (not implemented)

* docs updated

* Install.md created.

* scripts moved to scripts/ directory
This commit is contained in:
Andy Alt
2018-09-17 17:35:19 -05:00
committed by GitHub
parent df81c2a956
commit 7c359ca82d
44 changed files with 957 additions and 858 deletions

View File

@@ -8,6 +8,14 @@
# Default to English language output so we can understand your bug reports
#
# Modified by Andy Alt for ZetaGlest <https://zetaglest.github.io/>
echo ""
echo "This script has been deprecated. Please see"
echo "https://github.com/ZetaGlest/zetaglest-source/blob/develop/BUILD.md"
echo "For updated build instructions."
echo ""
exit 0
export LANG=C
SCRIPTDIR="$(cd "$(dirname "$0")"; pwd)"
@@ -191,7 +199,7 @@ if [ "$FORCE_EMBEDDED_LIBS" != "0" ] && [ "$FORCE_EMBEDDED_LIBS" != "" ]; then
fi
if [ "$COMPILATION_WITHOUT" != "0" ] && [ "$COMPILATION_WITHOUT" != "" ]; then
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DBUILD_ZETAGLEST_MAP_EDITOR=OFF -DBUILD_ZETAGLEST_MODEL_VIEWER=OFF"
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DBUILD_MAP_EDITOR=OFF -DBUILD_MODEL_VIEWER=OFF"
fi
if [ "$MAKE_ONLY" -eq "0" ]; then

View File

@@ -1,3 +0,0 @@
DataPath=$APPLICATIONPATH/../../../zetaglest-data/
ServerListPath=$APPLICATIONPATH/../shared/
GlestKeysIniPath=$APPLICATIONPATH/../shared/

View File

@@ -1,94 +0,0 @@
; === propertyMap File ===
; This file defines default properties and values. Do not edit this file,
; instead, to modify, copy any properties to glestuser.ini, then change these as
; needed. Values contained in glestuser.ini will overwrite values found here.
;
; For explanation of these properties, please refer to the MegaGlest wiki at
; http://wiki.megaglest.org/
;
AiLog=0
AiRedir=false
AllowDownloadDataSynch=false
AllowGameDataSynchCheck=false
AllowRotateUnits=true
AnnouncementURL=http://zetaglest.dreamhosters.com/files/announcement.txt
AutoMaxFullScreen=false
AutoTest=false
CheckGlCaps=true
ColorBits=32
ConsoleMaxLines=6
ConsoleMaxLinesStored=25
ConsoleTimeout=20
DataPath=$APPLICATIONDATAPATH/
LogPath=$HOME/.zetaglest/
DayTime=1000
DebugLogFile=debug.log
DebugMode=false
DebugPerformance=false
DebugNetwork=false
DebugWorldSynch=false
DepthBits=16
FactoryGraphics=OpenGL
FactorySound=OpenAL
FastSpeedLoops=8
FileArchiveExtension=.7z
FileArchiveExtractCommand=$APPLICATIONDATAPATH/p7zip/7z
FileArchiveExtractCommandParameters=x -o"{outputpath}" "{archivename}"
FileArchiveCompressCommand=$APPLICATIONDATAPATH/p7zip/7z
FileArchiveCompressCommandParameters=a -r -xr!?svn\* "{archivename}" "{archivefiles}"
FileArchiveCompressCommandSuccessResult=0
Filter=Bilinear
FilterMaxAnisotropy=1
FirstTime=false
FocusArrows=true
FogOfWarSmoothing=true
FogOfWarSmoothingFrameSkip=3
FontConsoleBaseSize=14
FontConsolePostfix=-*-*-*-*-*-*-*
FontConsolePrefix=-*-arial-*-r-*-*-
FontDisplayBaseSize=12
FontDisplayPostfix=-*-*-*-*-*-*-*
FontDisplayPrefix=-*-arial-*-r-*-*-
FontDisplaySmallBaseSize=12
FontMenuBigBaseSize=20
FontMenuBigPostfix=-*-*-*-*-*-*-*
FontMenuBigPrefix=-*-arial-*-r-*-*-
FontMenuNormalBaseSize=14
FontMenuNormalPostfix=-*-*-*-*-*-*-*
FontMenuNormalPrefix=-*-arial-*-r-*-*-
FontMenuVeryBigBaseSize=25
FontSizeAdjustment=0
FONT_HEIGHT_TEXT=yW
Lang=english
MaxLights=3
Masterserver=http://zetaglest.dreamhosters.com/
NetPlayerName=newbie
NetworkConsistencyChecks=true
PhotoMode=false
PortList=61357,61367,61377,61387,61397
PortServer=61357
RefreshFrequency=75
ScreenHeight=600
ScreenWidth=800
ServerIp=192.168.0.107
ShadowFrameSkip=2
ShadowTextureSize=512
Shadows=Projected
SoundStaticBuffers=16
SoundStreamingBuffers=4
SoundVolumeAmbient=80
SoundVolumeFx=80
SoundVolumeMusic=90
StencilBits=0
Textures3D=true
TranslationGetURL=https://www.transifex.com/api/2/project/megaglest/resource/$file/translation/$language
TranslationGetURLDetails=https://www.transifex.com/api/2/project/megaglest/resource/$file/?details
TranslationGetURLFileList=main-language-file|megapack-language-file|loading-screen-hints|tutorials-1-very-basic-tutorial|tutorials-2-basic-tutorial|tutorials-3-advanced-tutorial|scenarios-amazones|scenarios-amazones-light|scenarios-capture-enemy-flag|scenarios-storming
TranslationGetURLFileListMapping=data/lang/$language.lng|techs/megapack/lang/megapack_$language.lng|data/lang/hint/hint_$language.lng|tutorials/1_very_basic_tutorial/1_very_basic_tutorial_$language.lng|tutorials/2_basic_tutorial/2_basic_tutorial_$language.lng|tutorials/3_advanced_tutorial/3_advanced_tutorial_$language.lng|scenarios/amazones/amazones_$language.lng|scenarios/amazones_light/amazones_light_$language.lng|scenarios/capture_enemy_flag/capture_enemy_flag_$language.lng|scenarios/storming/storming_$language.lng
TranslationGetURLLanguage=en
TranslationGetURLPassword=
TranslationGetURLUser=<enter username>
UnitParticles=true
UserData_Root=$HOME/.zetaglest/
VersionURL=http://zetaglest.dreamhosters.com/files/versions/
Windowed=true

View File

@@ -1,107 +0,0 @@
#!/bin/sh
# Use this script to build MegaGlest Binary Archive for a Version Release
# ----------------------------------------------------------------------------
# 2011 Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
# 2015 Rewritten by filux <heross(@@)o2.pl>
# Copyright (c) 2011-2015 under GNU GPL v3.0+
# ----------------------------------------------------------------------------
LANG=C
# set this to non 0 to skip building the binary
skipbinarybuild=0
if [ "$1" = "-CI" ]; then skipbinarybuild=1; fi
CURRENTDIR="$(cd "$(dirname "$0")"; pwd)"
cd "$CURRENTDIR"
# Consider setting this for small packages if there's plenty of RAM and CPU available:
#export XZ_OPT="$XZ_OPT -9e"
if [ "$1" = "-CI" ] || [ "$1" = "-" ] || [ "$(echo "$1" | grep '\--show-result-path')" != "" ]; then
if [ "$2" != "" ]; then
SOURCE_BRANCH="$2"
if [ "$3" != "" ]; then NUMCORES="$3"; fi
fi
fi
VERSION="$(../linux/mg-version.sh --version)"
kernel="macos"
REPODIR="$CURRENTDIR/../../"
if [ -d "$REPODIR/.git" ] && [ "$(which git 2>/dev/null)" != "" ]; then
cd "$REPODIR"
if [ "$SOURCE_BRANCH" = "" ]; then SOURCE_BRANCH="$(git branch | grep '^* ' | awk '{print $2}')"; fi
# on macos are problems with more advanced using awk ^
SOURCE_COMMIT="$(echo "[$(git rev-list HEAD --count).$(git log -1 --format=%h --abbrev=7)]")"
fi
ARCHIVE_TYPE="tar.bz2"
SNAPSHOTNAME="mg-binary-$kernel"
SN_PACKAGE="$SNAPSHOTNAME-$VERSION-$SOURCE_BRANCH.$ARCHIVE_TYPE"
RELEASENAME="megaglest-binary-$kernel"
PACKAGE="$RELEASENAME-$VERSION.$ARCHIVE_TYPE"
RELEASEDIR_ROOT="$CURRENTDIR/../../../release"
if [ "$SOURCE_BRANCH" != "" ] && [ "$SOURCE_BRANCH" != "master" ] && [ "$(echo "$VERSION" | grep '\-dev$')" != "" ]; then
RELEASENAME="$SNAPSHOTNAME"; PACKAGE="$SN_PACKAGE"
fi
RELEASEDIR="${RELEASEDIR_ROOT}/${RELEASENAME-$VERSION}"
if [ "$1" = "--show-result-path" ]; then echo "${RELEASEDIR_ROOT}/$PACKAGE"; exit 0
elif [ "$1" = "--show-result-path2" ]; then echo "${RELEASEDIR_ROOT}/$RELEASENAME"; exit 0; fi
echo "Creating binary package in $RELEASEDIR"
if [ "$SOURCE_BRANCH" != "" ]; then echo "Detected parameters for source repository: branch=[$SOURCE_BRANCH], commit=$SOURCE_COMMIT"; fi
if [ -d "$RELEASEDIR" ]; then rm -rf "$RELEASEDIR"; fi
mkdir -p "$RELEASEDIR"
if [ "$skipbinarybuild" -eq "0" ]; then
echo "building binaries ..."
cd "$CURRENTDIR"
if [ -d "build" ]; then rm -rf "build"; fi
build_command="./build-zg.sh -b"
if [ "$NUMCORES" != "" ]; then build_command="$build_command -c $NUMCORES"; fi
$build_command
if [ "$?" -ne "0" ]; then echo 'ERROR: "./build-zg.sh" failed.' >&2; exit 1; fi
else
echo "SKIPPING build of binaries ..."
fi
cd "$CURRENTDIR"
echo "copying binaries ..."
cp ../shared/*.ico "$RELEASEDIR"
if [ -e "$RELEASEDIR/zetaglest.ico" ]; then rm "$RELEASEDIR/zetaglest.ico"; fi
#cp bundle_resources/*.icns "$RELEASEDIR"
cp {../shared/,}*.ini "$RELEASEDIR"
if [ -e "$RELEASEDIR/glest-dev.ini" ]; then rm "$RELEASEDIR/glest-dev.ini"; fi
cp megaglest ../linux/start_megaglest_gameserver bundle_resources/MegaGlest.sh "$RELEASEDIR"
if [ -e "megaglest_editor" ]; then
cp megaglest_editor "$RELEASEDIR"
else
if [ -e "$RELEASEDIR/editor.ico" ]; then rm "$RELEASEDIR/editor.ico"; fi
fi
if [ -e "megaglest_g3dviewer" ]; then
cp megaglest_g3dviewer "$RELEASEDIR"
else
if [ -e "$RELEASEDIR/g3dviewer.ico" ]; then rm "$RELEASEDIR/g3dviewer.ico"; fi
fi
if [ -d "p7zip" ]; then cp -r p7zip "$RELEASEDIR"; fi
if [ -d "lib" ]; then cp -r lib "$RELEASEDIR"; fi
if [ "$(echo "$VERSION" | grep -v '\-dev$')" != "" ]; then
echo "$(date -u)" > "$RELEASEDIR/build-time.log"
fi
if [ "$1" != "--installer" ]; then
echo "creating $PACKAGE"
cd "$RELEASEDIR_ROOT"
if [ -f "$PACKAGE" ]; then rm "$PACKAGE"; fi
cd "$RELEASENAME"
tar -cf - * | bzip2 -9 > "../$PACKAGE"
cd "$CURRENTDIR"
ls -lhA "${RELEASEDIR_ROOT}/$PACKAGE"
fi
cd "$CURRENTDIR"
if [ "$1" = "-CI" ] || [ "$1" = "-" ]; then
if [ -d "$RELEASEDIR" ]; then rm -rf "$RELEASEDIR"; fi
fi

View File

@@ -1,59 +0,0 @@
#!/bin/sh
# Use this script to build MegaGlest release archives for a Version Release
# ----------------------------------------------------------------------------
# 2015 Written by filux <heross(@@)o2.pl>
# Copyright (c) 2015 under GNU GPL v3.0+
# ----------------------------------------------------------------------------
LANG=C
CURRENTDIR="$(cd "$(dirname "$0")"; pwd)"
cd "$CURRENTDIR"
VERSION="$(../linux/mg-version.sh --version)"
kernel="macos"
RELEASENAME="MegaGlest-game-$kernel"
PACKAGE="$RELEASENAME-$VERSION.zip"
PACKAGE2="$RELEASENAME-$VERSION.dmg"
RELEASEDIR_ROOT="$CURRENTDIR/../../../release"
RELEASEDIR="${RELEASEDIR_ROOT}/${RELEASENAME-$VERSION}"
BINARY_DIR="$(./make-binary-archive.sh --show-result-path2)"
DATA_DIR="$(../linux/make-data-archive.sh --show-result-path2)"
APP_RES_DIR="$RELEASEDIR/MegaGlest.app/Contents/Resources"
APP_BIN_DIR="$RELEASEDIR/MegaGlest.app/Contents/MacOS"
APP_PLIST_DIR="$RELEASEDIR/MegaGlest.app/Contents"
APP_GAME_DIR="$APP_RES_DIR/megaglest-game"
if [ -d "$RELEASEDIR" ]; then rm -rf "$RELEASEDIR"; fi
mkdir -p "$APP_GAME_DIR"
mkdir -p "$APP_BIN_DIR"
./make-binary-archive.sh --installer
cp -r "$BINARY_DIR/"* "$APP_GAME_DIR"
../linux/make-data-archive.sh --installer
cp -r "$DATA_DIR/"* "$APP_GAME_DIR"; sleep 0.5s
if [ -f "$APP_GAME_DIR/MegaGlest.sh" ]; then rm -f "$APP_GAME_DIR/MegaGlest.sh"; fi
cp "$CURRENTDIR/build/mk/macos/bundle_resources/Info.plist" "$APP_PLIST_DIR"
cp "$CURRENTDIR/bundle_resources/MegaGlest.icns" "$APP_RES_DIR"
cp "$CURRENTDIR/bundle_resources/MegaGlest.sh" "$APP_BIN_DIR"
mv "$APP_BIN_DIR/MegaGlest.sh" "$APP_BIN_DIR/MegaGlest"
mv "$APP_GAME_DIR/lib" "$APP_GAME_DIR/Frameworks"; sleep 0.5s
mv "$APP_GAME_DIR/Frameworks" "$APP_PLIST_DIR/"
echo "creating $PACKAGE"
cd "$RELEASEDIR_ROOT"
if [ -f "$PACKAGE" ]; then rm -f "$PACKAGE"; fi
cd "$RELEASENAME"
zip -9r "../$PACKAGE" "MegaGlest.app" >/dev/null
ls -lhA "${RELEASEDIR_ROOT}/$PACKAGE"
echo "creating $PACKAGE2"
cd "$CURRENTDIR/build"
if [ -f "$RELEASEDIR_ROOT/$PACKAGE2" ]; then rm -f "$RELEASEDIR_ROOT/$PACKAGE2"; fi
cpack
mv -f MegaGlest*.dmg "$RELEASEDIR_ROOT"
ls -lhA "${RELEASEDIR_ROOT}/$PACKAGE2"
cd "$RELEASEDIR_ROOT"
find "${RELEASEDIR_ROOT}" -name "MegaGlest*" -type d | xargs rm -rf 2>/dev/null
find "${RELEASEDIR_ROOT}" -name "megaglest*" -type d | xargs rm -rf 2>/dev/null