improved formatting of '--help' output in a way to be more friendly for help2man

This commit is contained in:
filux 2017-04-01 14:53:34 +02:00
parent f5e09c2a7c
commit ef1c26d931
16 changed files with 479 additions and 455 deletions

View File

@ -37,7 +37,6 @@ OPTION(BUILD_MEGAGLEST "Build MegaGlest" ON)
OPTION(BUILD_MEGAGLEST_TESTS "Build MegaGlest Unit Tests" OFF)
OPTION(WANT_SINGLE_INSTALL_DIRECTORY "Use single install directory for everything. It is useful for example for MacOS cpack bundles." OFF)
OPTION(WANT_STATIC_LIBS "Builds as many static libs as possible." OFF)
OPTION(WANT_STATIC_WX_LIBS "Builds with static wxWidgets libs if possible." OFF)
OPTION(WANT_USE_VLC "Use libVLC to play videos." ON)
OPTION(WANT_USE_OpenSSL "Use libOpenSSL during CURL linking." ON)
OPTION(WANT_USE_FriBiDi "Enable libFriBIDi support." ON)
@ -255,44 +254,56 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
ENDIF()
ENDIF()
SET(COMMON_INFO_ABOUT_PATH "(if the path is relative then is appended to the CMAKE_INSTALL_PREFIX)")
IF(CMAKE_INSTALL_PREFIX STREQUAL "")
MESSAGE(STATUS "*NOTE: NOT USING a Custom Data Install Path...")
ELSE()
IF(WANT_SINGLE_INSTALL_DIRECTORY AND NOT MEGAGLEST_SINGLE_DIRECTORY_INSTALL_PATH)
SET(MEGAGLEST_SINGLE_DIRECTORY_INSTALL_PATH "megaglest-game/" CACHE STRING "The single directory installation path for game (this is appended to the CMAKE_INSTALL_PREFIX)")
SET(MEGAGLEST_SINGLE_DIRECTORY_INSTALL_PATH "megaglest-game/" CACHE STRING "The single directory installation path for game ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
IF(NOT MEGAGLEST_BIN_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
SET(MEGAGLEST_BIN_INSTALL_PATH "bin/" CACHE STRING "The installation path for binaries (this is appended to the CMAKE_INSTALL_PREFIX)")
SET(MEGAGLEST_BIN_INSTALL_PATH "bin/" CACHE STRING "The installation path for binaries ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
IF(NOT MEGAGLEST_DATA_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
SET(MEGAGLEST_DATA_INSTALL_PATH "share/megaglest/" CACHE STRING "The installation path for data files (this is appended to the CMAKE_INSTALL_PREFIX)")
SET(MEGAGLEST_DATA_INSTALL_PATH "share/megaglest/" CACHE STRING "The installation path for data files ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
SET(MEGAGLEST_INI_INSTALL_PATH "${MEGAGLEST_DATA_INSTALL_PATH}")
IF(NOT MEGAGLEST_DESKTOP_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
SET(MEGAGLEST_DESKTOP_INSTALL_PATH "share/applications/" CACHE STRING "The installation path for desktop files (this is appended to the CMAKE_INSTALL_PREFIX)")
SET(MEGAGLEST_DESKTOP_INSTALL_PATH "share/applications/" CACHE STRING "The installation path for desktop files ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
IF(NOT MEGAGLEST_ICON_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
SET(MEGAGLEST_ICON_INSTALL_PATH "share/pixmaps/" CACHE STRING "The installation path for icon files (this is appended to the CMAKE_INSTALL_PREFIX)")
SET(MEGAGLEST_ICON_INSTALL_PATH "share/pixmaps/" CACHE STRING "The installation path for icon files ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
IF(NOT MEGAGLEST_MANPAGE_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
SET(MEGAGLEST_MANPAGE_INSTALL_PATH "share/man/man6/" CACHE STRING "The installation path for manpage files (this is appended to the CMAKE_INSTALL_PREFIX)")
SET(MEGAGLEST_MANPAGE_INSTALL_PATH "share/man/man6/" CACHE STRING "The installation path for manpage files ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
IF(WANT_SINGLE_INSTALL_DIRECTORY)
FOREACH(MG_PATH BIN DATA DESKTOP ICON)
FOREACH(MG_PATH BIN DATA INI DESKTOP ICON)
IF(NOT MEGAGLEST_${MG_PATH}_INSTALL_PATH)
SET(MEGAGLEST_${MG_PATH}_INSTALL_PATH "${MEGAGLEST_SINGLE_DIRECTORY_INSTALL_PATH}")
ENDIF()
ENDFOREACH()
ENDIF()
IF(NOT WANT_SINGLE_INSTALL_DIRECTORY)
FOREACH(MG_PATH DATA INI)
IF(IS_ABSOLUTE "${MEGAGLEST_${MG_PATH}_INSTALL_PATH}")
SET(MEGAGLEST_FULL_${MG_PATH}_INSTALL_PATH "${MEGAGLEST_${MG_PATH}_INSTALL_PATH}/")
ELSE()
SET(MEGAGLEST_FULL_${MG_PATH}_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_${MG_PATH}_INSTALL_PATH}/")
ENDIF()
STRING(REGEX REPLACE "//+" "/" MEGAGLEST_FULL_${MG_PATH}_INSTALL_PATH "${MEGAGLEST_FULL_${MG_PATH}_INSTALL_PATH}")
ENDFOREACH()
IF(NOT CUSTOM_DATA_INSTALL_PATH)
SET(CUSTOM_DATA_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_DATA_INSTALL_PATH}" CACHE STRING "The FULL installation path for data files (this is build automatically by combining CMAKE_INSTALL_PREFIX and MEGAGLEST_DATA_INSTALL_PATH)")
SET(CUSTOM_DATA_INSTALL_PATH "${MEGAGLEST_FULL_DATA_INSTALL_PATH}")
# ^ someday this intermediate step may be removed
ENDIF()
SET(CUSTOM_DATA_INSTALL_PATH_VALUE "-DCUSTOM_DATA_INSTALL_PATH=${CUSTOM_DATA_INSTALL_PATH}")
SET(CUSTOM_INSTALL_PATHS_VALUES "-DCUSTOM_DATA_INSTALL_PATH=${CUSTOM_DATA_INSTALL_PATH}")
ENDIF()
SET(PKG_DATADIR ${CUSTOM_DATA_INSTALL_PATH_VALUE})
SET(PKG_BINDIR ${MEGAGLEST_BIN_INSTALL_PATH})
#SET(PKG_DATADIR ${CUSTOM_DATA_INSTALL_PATH_VALUE})
#SET(PKG_BINDIR ${MEGAGLEST_BIN_INSTALL_PATH})
# ^ hard to tell for what it is needed and most likely both were set to wrong values, so let's try to not use them
MESSAGE(STATUS "*NOTE: Custom Data Install Path is [${CUSTOM_DATA_INSTALL_PATH}]")
ENDIF()
@ -300,7 +311,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
IF(HAS_GIT STREQUAL "TRUE")
SET(CMAKE_CXX_FLAGS_${MG_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${MG_BUILD_TYPE}} ${GIT_VERSION_CMD}")
ENDIF()
SET(CMAKE_CXX_FLAGS_${MG_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${MG_BUILD_TYPE}} ${CUSTOM_DATA_INSTALL_PATH_VALUE}")
SET(CMAKE_CXX_FLAGS_${MG_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${MG_BUILD_TYPE}} ${CUSTOM_INSTALL_PATHS_VALUES}")
# We do some funky character escaping to get the right stuff written out to
# the final Makefile so we get the GIT Global Revsion #
@ -330,12 +341,9 @@ IF(NOT WANT_DEPRECATION_WARNINGS)
ENDIF()
MARK_AS_ADVANCED(WANT_DEPRECATION_WARNINGS)
SET(WANT_USE_SDL2 ON)
IF(WANT_USE_SDL2)
SET(SDL_WINDOWS_DIR_DINC "SDL-2.0.x")
SET(SDL_VERSION_NAME "SDL2")
SET(SDL_VERSION_SNAME "sdl")
ENDIF()
SET(SDL_WINDOWS_DIR_DINC "SDL-2.0.x")
SET(SDL_VERSION_NAME "SDL2")
SET(SDL_VERSION_SNAME "sdl")
OPTION(WANT_DEV_OUTPATH "Use developer friendly output paths." OFF)
IF(UNIX AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")

View File

@ -3,8 +3,7 @@
MegaGlest (http://megaglest.org) is a libre software cross
platform real-time strategy game.
[![logo](http://megaglest.org/uploads/megaglest2011/logo/logo.png)]
(http://megaglest.org/)
![logo](http://megaglest.org/uploads/megaglest2011/logo/logo.png)
MegaGlest is an entertaining free (freeware and free software)
and open source cross-platform 3D real-time strategy (RTS) game,
@ -17,10 +16,8 @@ within the game at no cost.
[**MegaGlest Downloads**](http://megaglest.org/download.html)
[![gif](http://megaglest.org/uploads/images/screenshots/game_screens.gif)]
(http://megaglest.org/screenshots.html)
[![intro](http://megaglest.org/uploads/images/trailer3.png)]
(http://downloads.megaglest.org/videos/megaglest_game_trailer_lq.webm)
![gif](http://megaglest.org/uploads/images/screenshots/game_screens.gif)
[> game trailer <](http://downloads.megaglest.org/videos/megaglest_game_trailer_lq.webm)
If you want to compile MegaGlest yourself, you should read the following:

@ -1 +1 @@
Subproject commit 32a8f459f095185bb503a876433ebefac77fd24e
Subproject commit 7385926ed8f36bcafb876ca4b61a413fe9ae8e40

View File

@ -26,13 +26,17 @@ IF(WANT_STATIC_LIBS)
LIST(APPEND LIST_OF_STATIC_LIBS_MG "${STATIC_LIB}")
ENDFOREACH()
ENDIF()
IF(WANT_STATIC_WX_LIBS AND (BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST))
MESSAGE(STATUS "==========> wxWidgets looking for STATIC libs.")
IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR)
# wxWidgets for tools
FOREACH(STATIC_LIB
wxWidgets)
LIST(APPEND LIST_OF_STATIC_LIBS_MG "${STATIC_LIB}")
ENDFOREACH()
IF(NOT DEFINED STATIC_wxWidgets)
SET(STATIC_wxWidgets OFF)
# wxWidgets by default are not available static
ENDIF()
ENDIF()
IF(BUILD_MEGAGLEST)
# only libs not used by shared lib
@ -47,7 +51,12 @@ IF(WANT_STATIC_LIBS)
UNSET(STATIC_${STATIC_LIB} CACHE)
ENDIF()
ELSE()
OPTION("STATIC_${STATIC_LIB}" "Set to ON to link your project with static library (instead of DLL)." ON)
IF(DEFINED STATIC_${STATIC_LIB} AND NOT STATIC_${STATIC_LIB})
SET(STATIC_OPTION_VALUE OFF)
ELSE()
SET(STATIC_OPTION_VALUE ON)
ENDIF()
OPTION("STATIC_${STATIC_LIB}" "Set to ON to link your project with static ${STATIC_LIB} library (instead of DLL)." "${STATIC_OPTION_VALUE}")
ENDIF()
ENDFOREACH()
ENDIF()

View File

@ -19,7 +19,7 @@ CMAKE_ONLY=0
MAKE_ONLY=0
CLANG_FORCED=0
WANT_STATIC_LIBS="-DWANT_STATIC_LIBS=ON"
WANT_STATIC_WX_LIBS="-DWANT_STATIC_WX_LIBS=OFF"
WANT_STATIC_WX_LIBS=0
FORCE_EMBEDDED_LIBS=0
GCC_FORCED_VERSION=0
LUA_FORCED_VERSION=0
@ -82,7 +82,7 @@ while getopts "c:defg:hl:mnswx" option; do
# echo "${option} value: ${OPTARG}"
;;
s)
WANT_STATIC_WX_LIBS="-DWANT_STATIC_WX_LIBS=ON"
WANT_STATIC_WX_LIBS=1
# echo "${option} value: ${OPTARG}"
;;
w)
@ -172,6 +172,11 @@ if [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ]; then
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_FontConfig=OFF"
fi
if [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ] && \
[ "$WANT_STATIC_WX_LIBS" != "0" ] && [ "$WANT_STATIC_WX_LIBS" != "" ]; then
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_wxWidgets=ON"
fi
if [ "$distribution" != "Mageia" ]; then
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DWANT_USE_OpenSSL=OFF"
fi
@ -189,8 +194,8 @@ case $distribution in
;;
*)
if [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ]; then
echo 'Turning ON dynamic FTGL, LUA, PNG ... and forcing use the embedded IRCCLIENT'
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_FTGL=OFF -DSTATIC_LUA=OFF -DSTATIC_PNG=OFF -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
echo 'Turning ON dynamic OGG ... and forcing use the embedded IRCCLIENT'
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
fi
if [ $CLANG_FORCED = 1 ]; then BUILD_MEGAGLEST_TESTS="OFF"; fi
# ^ may be removed ~ when default clang's version will be 3.9+
@ -209,17 +214,24 @@ case $distribution in
;;
*)
if [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ]; then
echo 'Turning ON dynamic FTGL, LUA, PNG ... and forcing use the embedded IRCCLIENT'
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_FTGL=OFF -DSTATIC_LUA=OFF -DSTATIC_PNG=OFF -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
echo 'Turning ON dynamic OGG ... and forcing use the embedded IRCCLIENT'
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
fi
;;
esac
;;
LinuxMint)
LinuxMint|Linuxmint)
case $release in
2)
#LMDE
if [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ]; then
echo 'Turning ON dynamic FTGL, LUA, JPEG, PNG ... and forcing use the embedded IRCCLIENT'
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_FTGL=OFF -DSTATIC_LUA=OFF -DSTATIC_JPEG=OFF -DSTATIC_PNG=OFF -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
fi
;;
13|13.*|14|15|16|17|17.*) ;;
18|18.*|19|19.*)
18|18.*)
if [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ]; then
echo 'Turning ON dynamic FTGL, LUA, JPEG, PNG ... and forcing use the embedded IRCCLIENT'
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_FTGL=OFF -DSTATIC_LUA=OFF -DSTATIC_JPEG=OFF -DSTATIC_PNG=OFF -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
@ -227,8 +239,8 @@ case $distribution in
;;
*)
if [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ]; then
echo 'Turning ON dynamic FTGL, LUA, PNG ... and forcing use the embedded IRCCLIENT'
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_FTGL=OFF -DSTATIC_LUA=OFF -DSTATIC_PNG=OFF -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
echo 'Turning ON dynamic OGG ... and forcing use the embedded IRCCLIENT'
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
fi
;;
esac
@ -301,8 +313,8 @@ if [ "$COMPILATION_WITHOUT" != "0" ] && [ "$COMPILATION_WITHOUT" != "" ]; then
fi
if [ $MAKE_ONLY = 0 ]; then
echo "Calling cmake with EXTRA_CMAKE_OPTIONS = ${EXTRA_CMAKE_OPTIONS} AND WANT_STATIC_LIBS = ${WANT_STATIC_LIBS} AND WANT_STATIC_WX_LIBS = ${WANT_STATIC_WX_LIBS}"
cmake -DCMAKE_INSTALL_PREFIX='' -DWANT_DEV_OUTPATH=ON $WANT_STATIC_LIBS $WANT_STATIC_WX_LIBS -DBUILD_MEGAGLEST_TESTS=$BUILD_MEGAGLEST_TESTS -DBREAKPAD_ROOT=$BREAKPAD_ROOT $EXTRA_CMAKE_OPTIONS ../../..
echo "Calling cmake with EXTRA_CMAKE_OPTIONS = ${EXTRA_CMAKE_OPTIONS} AND WANT_STATIC_LIBS = ${WANT_STATIC_LIBS}"
cmake -DCMAKE_INSTALL_PREFIX='' -DWANT_DEV_OUTPATH=ON $WANT_STATIC_LIBS -DBUILD_MEGAGLEST_TESTS=$BUILD_MEGAGLEST_TESTS -DBREAKPAD_ROOT=$BREAKPAD_ROOT $EXTRA_CMAKE_OPTIONS ../../..
if [ $? -ne 0 ]; then
echo 'ERROR: CMAKE failed.' >&2; exit 1
fi

View File

@ -108,6 +108,7 @@ if [ "$quiet" -eq "1" ]; then
URPMI_OPTIONS="$URPMI_OPTIONS -q --auto"
PACMAN_OPTIONS="$PACMAN_OPTIONS -q --noconfirm"
DNF_OPTIONS="$DNF_OPTIONS -y -q"
ZYPPER_OPTIONS="$ZYPPER_OPTIONS -y"
fi
packages_for_next_debian_ubuntu_mint="build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn2-0-dev libpsl-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev"
@ -116,12 +117,15 @@ case $distribution in
Debian)
case $release in
oldstable|7|7.*)
#name > wheezy, EoL May 2018
installcommand="apt-get install $APT_OPTIONS build-essential cmake libsdl2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libminiupnpc-dev librtmp-dev libgtk2.0-dev libcppunit-dev"
;;
stable|8|8.*)
#name > jessie, EoL May 2020
installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.2-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev"
;;
testing|unstable|9|9.0)
#name > stretch / sid
installcommand="apt-get install $APT_OPTIONS $packages_for_next_debian_ubuntu_mint"
;;
*)
@ -139,19 +143,19 @@ case $distribution in
unsupported_currently_this_OS="release"
;;
12.04*)
#LTS, name > precise
#LTS, name > precise, EoL April 2017
installcommand="apt-get install $APT_OPTIONS build-essential cmake libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libcppunit-dev"
;;
14.04*)
#LTS, name > trusty
#LTS, name > trusty, EoL April 2019
installcommand="apt-get install $APT_OPTIONS build-essential cmake libsdl2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxgtk3.0-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libvlccore-dev libcppunit-dev"
;;
16.04*)
#LTS, name > xenial
#LTS, name > xenial, EoL April 2021
installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev"
;;
16.10)
#name > yakkety
#name > yakkety, EoL July 2017
installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev"
;;
*)
@ -161,18 +165,22 @@ case $distribution in
esac
;;
LinuxMint)
LinuxMint|Linuxmint)
case $release in
2)
#LMDE 2, related with Debian ~ 8/jessie
installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.2-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev"
;;
13|13.*)
#LTS, based on Ubuntu 12.04
#LTS, based on Ubuntu 12.04, EoL April 2017
installcommand="apt-get install $APT_OPTIONS build-essential cmake libsdl2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libcppunit-dev"
;;
17|17.*)
#LTS, based on Ubuntu 14.04
#LTS, based on Ubuntu 14.04, EoL April 2019
installcommand="apt-get install $APT_OPTIONS build-essential cmake libsdl2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxgtk3.0-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libvlccore-dev libcppunit-dev"
;;
18|18.*)
#LTS, based on Ubuntu 16.04
#LTS, based on Ubuntu 16.04, EoL April 2021
installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev"
;;
*)
@ -185,10 +193,11 @@ case $distribution in
SuSE|SUSE?LINUX|Opensuse*|openSUSE*)
case $release in
42.1)
installcommand="zypper install gcc gcc-c++ cmake libSDL2-devel Mesa-libGL-devel freeglut-devel libvorbis-devel wxWidgets-devel lua-devel libjpeg8-devel libpng16-devel libcurl-devel openal-soft-devel libX11-devel libxml2-devel libircclient-devel glew-devel ftgl-devel fribidi-devel cppunit-devel libminiupnpc-devel vlc-devel"
#EoL May 2017
installcommand="zypper install $ZYPPER_OPTIONS gcc gcc-c++ cmake libSDL2-devel Mesa-libGL-devel freeglut-devel libvorbis-devel wxWidgets-devel lua-devel libjpeg8-devel libpng16-devel libcurl-devel openal-soft-devel libX11-devel libxml2-devel libircclient-devel glew-devel ftgl-devel fribidi-devel cppunit-devel libminiupnpc-devel vlc-devel"
;;
*)
installcommand="zypper install gcc gcc-c++ cmake libSDL2-devel Mesa-libGL-devel freeglut-devel libvorbis-devel wxWidgets-devel lua-devel libjpeg8-devel libpng16-devel libcurl-devel openal-soft-devel libX11-devel libxml2-devel libircclient-devel glew-devel ftgl-devel fribidi-devel cppunit-devel libminiupnpc-devel vlc-devel"
installcommand="zypper install $ZYPPER_OPTIONS gcc gcc-c++ cmake libSDL2-devel Mesa-libGL-devel freeglut-devel libvorbis-devel wxWidgets-devel lua-devel libjpeg8-devel libpng16-devel libcurl-devel openal-soft-devel libX11-devel libxml2-devel libircclient-devel glew-devel ftgl-devel fribidi-devel cppunit-devel libminiupnpc-devel vlc-devel"
unsupported_currently_this_OS="release"
;;
esac
@ -214,7 +223,7 @@ case $distribution in
esac
;;
ManjaroLinux)
ManjaroLinux|Manjarolinux)
if [ "$architecture" = "x86_64" ]; then lib=""; else lib="lib32-"; fi
case $release in
*)

View File

@ -177,7 +177,7 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
# If line is ended by /|L/ this mean 'L'ower priority about finding local library instead of existing
# (if exist) embedded version, (rarely) useful in case if embedded library may eliminate ABI-API
# conflixts, e.g. binary <> WxWidgets.
# ignored: linux-vdso.so*, linux-gate.so*, ld-linux-*.so*, libpthread.so*, libpulsecommon-*.so, libresolv.so*
# ignored: linux-vdso.so*, linux-gate.so*, ld-linux-*.so*, libpthread.so*, libpulsecommon-*.so
libs_list="/libSDL2-2.0.so.0/libSDL2-2.[num].so/libSDL2-[0-9].[num].so/libSDL2-/|H/
/libGLU.so.1/libGLU.so/|/
/libGL.so.1/libGL.so/|/
@ -232,6 +232,7 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
/libk5crypto.so.3/libk[0-9]crypto.so/libk[num]crypto/|/
/libcom_err.so.2/libcom_err.so/libcom_err/|/
/libkrb5support.so.0/libkrb[0-9]support.so/libkrb[num]support/|/
/libresolv.so.2/libresolv.so/|/
/libsasl2.so.2/libsasl[0-9].so/libsasl/|/
/libgssapi.so.3/libgssapi.so/|/
/libexpat.so.1/libexpat.so/|/
@ -332,7 +333,7 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
if [ "$1" = "create_new" ]; then
echo "#" > "$lw_log"; echo "#" > "$li_log"
elif [ "$1" = "save_new" ] && [ "$OperatingMode" = "--game" ]; then
echo "$LibsWarnings" > "$lw_log"; echo "$IgnoredLibs" > "$li_log"
echo "$LibsWarnings" | sed 's/^[\t ]*||/ ||/g' > "$lw_log"; echo "$IgnoredLibs" > "$li_log"
elif [ "$1" = "read_old" ]; then
LibsWarnings="$(cat "$pw_log")"; IgnoredLibs="$(cat "$pi_log")"
elif [ "$1" = "check_old" ]; then

View File

@ -38,23 +38,27 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER)
ENDIF()
ENDIF()
IF(STATIC_wxWidgets)
SET(wxWidgets_USE_STATIC ON)
# ^ This is not needed here (once, globally is enough) if every find run returns the same status.
# With wx this is not so 100% sure.
ENDIF()
# It was noticed that when using MinGW gcc it is essential that 'core' is mentioned before 'base'.
# Optimal order most likely is gl > core > base, in some cases it may do difference.
IF(STATIC_wxWidgets)
SET(wxWidgets_USE_STATIC ON)
MESSAGE(STATUS "==========> wxWidgets wanting STATIC libs.")
ENDIF()
FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS gl core base)
IF(wxWidgets_USE_STATIC)
MESSAGE(STATUS "==========> wxWidgets using STATIC libs: ${wxWidgets_LIBRARIES}")
ELSE()
MESSAGE(STATUS "==========> wxWidgets NOT using STATIC libs: ${wxWidgets_LIBRARIES}")
ENDIF()
IF(UNIX)
# wxWidgets include (this will do all the magic to configure everything)
INCLUDE( ${wxWidgets_USE_FILE} )
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${wxWidgets_LIBRARIES})
IF(STATIC_wxWidgets)
IF(wxWidgets_USE_STATIC)
MESSAGE(STATUS "==========> wxWidgets using STATIC libs:")
ELSE()
MESSAGE(STATUS "==========> wxWidgets STATIC libs NOT found:")
ENDIF()
ENDIF()
MESSAGE(STATUS " wxWidgets: ${wxWidgets_INCLUDE_DIRS} ;/; ${wxWidgets_LIBRARIES}")
ENDIF()
@ -215,13 +219,13 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER)
IF(EXISTS ${XVFB_EXEC})
MESSAGE(STATUS "***-- Found xvfb-run: ${XVFB_EXEC} about to build manpage with it.")
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --no-discard-stderr --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --no-discard-stderr --name="${MG_MANPAGE_DESCRIPTION}" --source="${TARGET_NAME}" --version-string="${TARGET_NAME}" --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
ELSE()
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${HELP2MAN} --no-discard-stderr --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${HELP2MAN} --no-discard-stderr --name="${MG_MANPAGE_DESCRIPTION}" --source="${TARGET_NAME}" --version-string="${TARGET_NAME}" --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
ENDIF()
ENDIF()
@ -244,6 +248,6 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER)
# Installation of the program config and image files
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/mk/shared/g3dviewer.ico"
DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
ENDIF()
ENDIF()

View File

@ -159,102 +159,108 @@ void printParameterHelp(const char *argv0, bool foundInvalidArgs) {
printf("\n");
}
// "================================================================================"
printf("\n%s %s, [Using %s] usage:\n",extractFileFromDirectoryPath(argv0).c_str(),g3dviewerVersionString.c_str(),(const char *)wxConvCurrent->cWX2MB(wxVERSION_STRING));
// "================================================================================"
printf("\n%s %s, [Using %s]\n",extractFileFromDirectoryPath(argv0).c_str(),g3dviewerVersionString.c_str(),(const char *)wxConvCurrent->cWX2MB(wxVERSION_STRING));
printf("\n%s [G3D FILE]\n\n",extractFileFromDirectoryPath(argv0).c_str());
printf("Displays glest 3D-models and unit/projectile/splash particle systems.\n");
printf("rotate with left mouse button, zoom with right mouse button or mousewheel.\n");
printf("Use ctrl to load more than one particle system.\n");
printf("Press R to restart particles, this also reloads all files if they are changed.\n\n");
printf("\nDisplays glest 3D-models and unit/projectile/splash particle systems.\n");
printf("\nRotate with left mouse button. Zoom with right mouse button or mousewheel.");
printf("\nUse ctrl to load more than one particle system.");
printf("\nPress R to restart particles, this also reloads all files if they are changed.");
printf("optionally you may use any of the following:\n");
printf("Parameter:\t\t\tDescription:");
printf("\n----------------------\t\t------------");
printf("\n%s\t\t\t\tdisplays this help text.",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_HELP]));
//printf("\n\noptionally you may use any of the following:\n");
printf("\n\n%s [G3D FILE], usage",extractFileFromDirectoryPath(argv0).c_str());
printf("\n\nCommandline Parameter: Description:");
printf("\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
printf("\n\n%s \t\tDisplays this help text.",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_HELP]));
// "================================================================================"
printf("\n%s=x",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_UNIT]));
printf("\n \t\tAuto load the unit / skill information specified");
printf("\n \t\tin path/filename x");
printf("\n \t\tWhere x is a g3d filename to load separated with a");
printf("\n \t\tcomma and one or more skill names to try loading:");
printf("\n \t\texample:");
printf("\n %s\n %s=techs/megapack/factions/tech/units/battle_machine,attack_skill,stop_skill",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_UNIT]));
// "================================================================================"
printf("\n\n%s=x \t\tAuto load the unit / skill information specified",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_UNIT]));
printf("\n\n \tin path/filename x.");
printf("\n\n \tWhere x is a g3d filename to load separated with a");
printf("\n\n \tcomma and one or more skill names to try loading.");
printf("\n\n \texample:");
printf("\n\n \t%s %s=techs/megapack/factions/",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_UNIT]));
printf("\n\n \ttech/units/battle_machine,attack_skill,stop_skill");
printf("\n%s=x\t\t\tAuto load the model specified in path/filename x",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_MODEL]));
printf("\n \t\tWhere x is a g3d filename to load:");
printf("\n \t\texample:");
printf("\n %s\n %s=techs/megapack/factions/tech/units/battle_machine/models/battle_machine_dying.g3d",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_MODEL]));
printf("\n\n%s=x \tAuto load the model specified in path/filename x.",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_MODEL]));
printf("\n\n \tWhere x is a g3d filename to load.");
printf("\n\n \texample:");
printf("\n\n \t%s %s=techs/megapack/factions/",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_MODEL]));
printf("\n\n \ttech/units/battle_machine/models/battle_machine_dying.g3d");
printf("\n%s=x\tAnimation value when loading a model",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_MODEL_ANIMATION_VALUE]));
printf("\n \t\tWhere x is a decimal value from -1.0 to 1.0:");
printf("\n \t\texample:");
printf("\n %s %s=0.5",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_MODEL_ANIMATION_VALUE]));
printf("\n\n%s=x ",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_MODEL_ANIMATION_VALUE]));
printf("\n\n \tAnimation value when loading a model.");
printf("\n\n \tWhere x is a decimal value from -1.0 to 1.0");
printf("\n\n \texample:");
printf("\n\n \t%s %s=0.5",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_MODEL_ANIMATION_VALUE]));
// "================================================================================"
printf("\n%s=x",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_AUTO_SCREENSHOT]));
printf("\n \t\tAutomatically takes a screenshot of the items you");
printf("\n \t\tare loading.");
printf("\n \t\tWhere x is a comma-delimited list of one or more");
printf("\n \t\t of the optional settings:");
printf("\n \t\ttransparent, enable_grid, enable_wireframe,");
printf("\n \t\tenable_normals, disable_grid, disable_wireframe,");
printf("\n \t\tdisable_normals, saveas-<filename>, resize-wxh");
printf("\n \t\texample:");
printf("\n %s\n %s=transparent,disable_grid,saveas-test.png,resize-800x600\n %s=techs/megapack/factions/tech/units/battle_machine/models/battle_machine_dying.g3d",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_AUTO_SCREENSHOT]),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_MODEL]));
// "================================================================================"
printf("\n\n%s=x \tAutomatically takes a screenshot of the items you",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_AUTO_SCREENSHOT]));
printf("\n\n \tare loading.");
printf("\n\n \tWhere x is a comma-delimited list of one or more");
printf("\n\n \t of the optional settings:");
printf("\n\n \t transparent, enable_grid, enable_wireframe,");
printf("\n\n \t enable_normals, disable_grid, disable_wireframe,");
printf("\n\n \t disable_normals, saveas-<filename>, resize-wxh");
printf("\n\n \texample:");
printf("\n\n \t%s %s=transparent,",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_AUTO_SCREENSHOT]));
printf("\n\n \tdisable_grid,saveas-test.png,resize-800x600");
printf("\n\n \t%s=techs/megapack/factions/tech/units/",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_MODEL]));
printf("\n\n \tbattle_machine/models/battle_machine_dying.g3d");
// "================================================================================"
printf("\n%s=x",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE]));
printf("\n \t\tAuto load the particle specified in path/filename x");
printf("\n \t\tWhere x is a Particle XML filename to load:");
printf("\n \t\texample:");
printf("\n %s\n %s=techs/megapack/factions/persian/units/genie/glow_particles.xml",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE]));
// "================================================================================"
printf("\n\n%s=x \tAuto load the particle specified in path/filename x.",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE]));
printf("\n\n \tWhere x is a Particle XML filename to load.");
printf("\n\n \texample:");
printf("\n\n \t%s %s=techs/megapack/factions/",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE]));
printf("\n\n \tpersian/units/genie/glow_particles.xml");
printf("\n%s=x",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_PROJECTILE]));
printf("\n \t\tAuto load the projectile particle specified in");
printf("\n \t\tpath/filename x");
printf("\n \t\tWhere x is a Projectile Particle Definition XML");
printf("\n \t\t filename to load:");
printf("\n \t\texample:");
printf("\n %s\n %s=techs/megapack/factions/persian/units/genie/particle_proj.xml",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_PROJECTILE]));
printf("\n\n%s=x ",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_PROJECTILE]));
printf("\n\n \tAuto load the projectile particle specified in");
printf("\n\n \tpath/filename x.");
printf("\n\n \tWhere x is a Projectile Particle Definition XML");
printf("\n\n \t filename to load.");
printf("\n\n \texample:");
printf("\n\n \t%s %s=techs/megapack/",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_PROJECTILE]));
printf("\n\n \tfactions/persian/units/genie/particle_proj.xml");
printf("\n%s=x",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_SPLASH]));
printf("\n \t\tAuto load the splash particle specified in");
printf("\n \t\tpath/filename x");
printf("\n \t\tWhere x is a Splash Particle Definition XML");
printf("\n \t\t filename to load:");
printf("\n \t\texample:");
printf("\n %s\n %s=techs/megapack/factions/persian/units/genie/particle_splash.xml",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_SPLASH]));
printf("\n\n%s=x ",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_SPLASH]));
printf("\n\n \tAuto load the splash particle specified in");
printf("\n\n \tpath/filename x.");
printf("\n\n \tWhere x is a Splash Particle Definition XML");
printf("\n\n \t filename to load.");
printf("\n\n \texample:");
printf("\n\n \t%s %s=techs/megapack/",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_SPLASH]));
printf("\n\n \tfactions/persian/units/genie/particle_splash.xml");
printf("\n%s=x",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_LOOP_VALUE]));
printf("\n \t\tParticle loop value when loading one or more");
printf("\n \t\tparticles");
printf("\n \t\tWhere x is an integer value from 1 to particle count:");
printf("\n \t\texample:");
printf("\n %s %s=25",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_LOOP_VALUE]));
printf("\n\n%s=x ",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_LOOP_VALUE]));
printf("\n\n \tParticle loop value when loading one or more");
printf("\n\n \tparticles.");
printf("\n\n \tWhere x is an integer value from 1 to particle count.");
printf("\n\n \texample:");
printf("\n\n \t%s %s=25",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_LOAD_PARTICLE_LOOP_VALUE]));
printf("\n%s=x\t\t\tZoom value when loading a model",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ZOOM_VALUE]));
printf("\n \t\tWhere x is a decimal value from 0.1 to 10.0:");
printf("\n \t\texample:");
printf("\n %s %s=4.2",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ZOOM_VALUE]));
printf("\n\n%s=x \tZoom value when loading a model.",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ZOOM_VALUE]));
printf("\n\n \tWhere x is a decimal value from 0.1 to 10.0");
printf("\n\n \texample:");
printf("\n\n \t%s %s=4.2",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ZOOM_VALUE]));
printf("\n%s=x\t\tX Coordinate Rotation value when loading a model",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ROTATE_X_VALUE]));
printf("\n \t\tWhere x is a decimal value from -10.0 to 10.0:");
printf("\n \t\texample:");
printf("\n %s %s=2.2",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ROTATE_X_VALUE]));
printf("\n\n%s=x \tX Coordinate Rotation value when loading a model.",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ROTATE_X_VALUE]));
printf("\n\n \tWhere x is a decimal value from -10.0 to 10.0");
printf("\n\n \texample:");
printf("\n\n \t%s %s=2.2",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ROTATE_X_VALUE]));
printf("\n%s=x\t\tY Coordinate Rotation value when loading a model",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ROTATE_Y_VALUE]));
printf("\n \t\tWhere x is a decimal value from -10.0 to 10.0:");
printf("\n \t\texample:");
printf("\n %s %s=2.2",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ROTATE_Y_VALUE]));
printf("\n\n%s=x \tY Coordinate Rotation value when loading a model.",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ROTATE_Y_VALUE]));
printf("\n\n \tWhere x is a decimal value from -10.0 to 10.0");
printf("\n\n \texample:");
printf("\n\n \t%s %s=2.2",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_ROTATE_Y_VALUE]));
printf("\n%s=x\t\tSpecify which image format to use for screenshots.",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_SCREENSHOT_FORMAT]));
printf("\n \t\tWhere x is one of the following supported formats");
printf("\n \t\tpng,jpg,tga,bmp");
printf("\n \t\t*NOTE: png is the default (and supports transparency)");
printf("\n \t\texample:");
printf("\n %s %s=jpg",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_SCREENSHOT_FORMAT]));
printf("\n\n%s=x \tSpecify which image format to use for screenshots.",(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_SCREENSHOT_FORMAT]));
printf("\n\n \tWhere x is one of the following supported formats:");
printf("\n\n \t png,jpg,tga,bmp");
printf("\n\n \t*NOTE: png is the default (and supports transparency)");
printf("\n\n \texample:");
printf("\n\n \t%s %s=jpg",extractFileFromDirectoryPath(argv0).c_str(),(const char *)wxConvCurrent->cWX2MB(GAME_ARGS[GAME_ARG_SCREENSHOT_FORMAT]));
printf("\n\n");
}

View File

@ -316,13 +316,13 @@ IF(BUILD_MEGAGLEST)
IF(EXISTS ${XVFB_EXEC})
MESSAGE(STATUS "***-- Found xvfb-run: ${XVFB_EXEC} about to build manpage with it.")
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --name="${MG_MANPAGE_DESCRIPTION}" --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
ELSE()
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${HELP2MAN} --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${HELP2MAN} --name="${MG_MANPAGE_DESCRIPTION}" --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
ENDIF()
ENDIF()
@ -347,7 +347,7 @@ IF(BUILD_MEGAGLEST)
IF(UNIX)
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/mk/linux/start_megaglest_gameserver"
DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
ENDIF()
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/mk/shared/glestkeys.ini"
@ -356,15 +356,15 @@ IF(BUILD_MEGAGLEST)
IF(WIN32)
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/mk/windoze/glest.ini"
DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
ELSEIF(UNIX AND NOT APPLE)
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/mk/linux/glest.ini"
DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
ELSEIF(UNIX AND APPLE)
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/mk/macos/glest.ini"
DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
IF(WANT_SINGLE_INSTALL_DIRECTORY AND EXISTS "${PROJECT_SOURCE_DIR}/mk/macos/p7zip/")
INSTALL(DIRECTORY
"${PROJECT_SOURCE_DIR}/mk/macos/p7zip"
@ -379,7 +379,7 @@ IF(BUILD_MEGAGLEST)
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/mk/shared/megaglest.ico"
DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
IF(UNIX AND APPLE AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/mk/macos/bundle_resources/MegaGlest.icns"

View File

@ -4571,7 +4571,7 @@ int glestMain(int argc, char** argv) {
}
if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_ENABLE_NEW_PROTOCOL]) == true) {
printf("*NOTE: enabling new newtork protocol.\n");
printf("*NOTE: enabling new network protocol.\n");
NetworkMessage::useOldProtocol = false;
}

View File

@ -24,23 +24,27 @@ IF(BUILD_MEGAGLEST_MAP_EDITOR)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY})
IF(STATIC_wxWidgets)
SET(wxWidgets_USE_STATIC ON)
# ^ This is not needed here (once, globally is enough) if every find run returns the same status.
# With wx this is not so 100% sure.
ENDIF()
# It was noticed that when using MinGW gcc it is essential that 'core' is mentioned before 'base'.
# Optimal order most likely is gl > core > base, in some cases it may do difference.
IF(STATIC_wxWidgets)
SET(wxWidgets_USE_STATIC ON)
MESSAGE(STATUS "==========> wxWidgets wanting STATIC libs.")
ENDIF()
FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS gl core base)
IF(wxWidgets_USE_STATIC)
MESSAGE(STATUS "==========> wxWidgets using STATIC libs: ${wxWidgets_LIBRARIES}")
ELSE()
MESSAGE(STATUS "==========> wxWidgets NOT using STATIC libs: ${wxWidgets_LIBRARIES}")
ENDIF()
IF(UNIX)
# wxWidgets include (this will do all the magic to configure everything)
INCLUDE( ${wxWidgets_USE_FILE} )
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${wxWidgets_LIBRARIES})
IF(STATIC_wxWidgets)
IF(wxWidgets_USE_STATIC)
MESSAGE(STATUS "==========> wxWidgets using STATIC libs:")
ELSE()
MESSAGE(STATUS "==========> wxWidgets STATIC libs NOT found:")
ENDIF()
ENDIF()
MESSAGE(STATUS " wxWidgets: ${wxWidgets_INCLUDE_DIRS} ;/; ${wxWidgets_LIBRARIES}")
ENDIF()
@ -205,13 +209,13 @@ IF(BUILD_MEGAGLEST_MAP_EDITOR)
IF(EXISTS ${XVFB_EXEC})
MESSAGE(STATUS "***-- Found xvfb-run: ${XVFB_EXEC} about to build manpage with it.")
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --no-discard-stderr --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --no-discard-stderr --name="${MG_MANPAGE_DESCRIPTION}" --source="${TARGET_NAME}" --version-string="${TARGET_NAME}" --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
ELSE()
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${HELP2MAN} --no-discard-stderr --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
add_custom_target(${TARGET_NAME_MANPAGE} ALL
COMMAND ${HELP2MAN} --no-discard-stderr --name="${MG_MANPAGE_DESCRIPTION}" --source="${TARGET_NAME}" --version-string="${TARGET_NAME}" --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
ENDIF()
ENDIF()
@ -234,6 +238,6 @@ IF(BUILD_MEGAGLEST_MAP_EDITOR)
# Installation of the program config and image files
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/mk/shared/editor.ico"
DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
ENDIF()
ENDIF()

View File

@ -1643,12 +1643,12 @@ bool App::OnInit() {
string fileparam;
if(argc==2){
if(argv[1][0]=='-') { // any flag gives help and exits program.
std::cout << "MegaGlest map editor " << mapeditorVersionString << " [Using " << (const char *)wxConvCurrent->cWX2MB(wxVERSION_STRING) << "]" << std::endl << std::endl;
std::cout << "glest_map_editor [MGM FILE]" << std::endl << std::endl;
std::cout << "Creates or edits glest/megaglest maps." << std::endl;
std::cout << "Draw with left mouse button" << std::endl;
std::cout << "Move map with right mouse button" << std::endl;
std::cout << "Zoom with middle mouse button or mousewheel" << std::endl;
std::cout << std::endl << "MegaGlest map editor " << mapeditorVersionString << " [Using " << (const char *)wxConvCurrent->cWX2MB(wxVERSION_STRING) << "]" << std::endl << std::endl;
//std::cout << "\nglest_map_editor [MGM FILE]" << std::endl << std::endl;
std::cout << "Creates or edits megaglest/glest maps. [.mgm/.gbm]" << std::endl << std::endl;
std::cout << "Draw with left mouse button." << std::endl;
std::cout << "Move map with right mouse button." << std::endl;
std::cout << "Zoom with middle mouse button or mousewheel." << std::endl;
// std::cout << " ~ more helps should be written here ~" << std::endl;
std::cout << std::endl;

@ -1 +1 @@
Subproject commit 2a2d48ac6a3ffe948ae1d9f3e0a859a1d58bc2ab
Subproject commit c8717d3a5df60f623b454de020090cfededde149

View File

@ -189,306 +189,280 @@ enum GAME_ARG_TYPE {
};
void printParameterHelp(const char *argv0, bool foundInvalidArgs) {
// MAX WIDTH FOR MAN PAGE
// "================================================================================"
// MAX WIDTH FOR MAN PAGE
// "================================================================================"
if(foundInvalidArgs == true) {
printf("\n");
}
printf("\n%s, usage\n\n",extractFileFromDirectoryPath(argv0).c_str());
printf("Commandline Parameter:\t\tDescription:");
printf("\n----------------------\t\t------------");
printf("\n%s\t\t\t\tdisplays this help text.",GAME_ARGS[GAME_ARG_HELP]);
printf("\n%s, usage",extractFileFromDirectoryPath(argv0).c_str());
printf("\n\nCommandline Parameter: Description:");
printf("\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
printf("\n\n%s \t\tDisplays this help text.",GAME_ARGS[GAME_ARG_HELP]);
printf("\n%s\t\tAutomatically starts a game with the last game",GAME_ARGS[GAME_ARG_AUTOSTART_LASTGAME]);
printf("\n\t\t\t\tsettings you played.");
printf("\n\n%s \tAutomatically starts a game with the last game",GAME_ARGS[GAME_ARG_AUTOSTART_LASTGAME]);
printf("\n\n \tsettings you played.");
printf("\n%s=x\t\tLoads the last saved game.",GAME_ARGS[GAME_ARG_AUTOSTART_LAST_SAVED_GAME]);
printf("\n \t\tWhere x is an optional name of the saved game file to load.");
printf("\n \t\tIf x is not specified we load the last game that was saved.");
printf("\n\n%s=x \tLoads the last saved game.",GAME_ARGS[GAME_ARG_AUTOSTART_LAST_SAVED_GAME]);
printf("\n\n \tWhere x is an optional name of the saved game file to load.");
printf("\n\n \tIf x is not specified we load the last game that was saved.");
printf("\n%s=x,y,z\t\t\tRun in auto test mode.",GAME_ARGS[GAME_ARG_AUTO_TEST]);
printf("\n \t\tWhere x is an optional maximum # seconds to play.");
printf("\n \t\tIf x is not specified the default is 1200 seconds (20 minutes).");
printf("\n \t\tWhere y is an optional game settings file to play.");
printf("\n \t\tIf y is not specified (or is empty) then auto test cycles through playing scenarios.");
printf("\n \t\tWhere z is the word exit indicating the game should exit after the game is finished or the time runs out.");
printf("\n \t\tIf z is not specified (or is empty) then auto test continues to cycle.");
printf("\n\n%s=x,y,z \tRun in auto test mode.",GAME_ARGS[GAME_ARG_AUTO_TEST]);
printf("\n\n \tWhere x is an optional maximum # seconds to play.");
printf("\n\n \tIf x is not specified the default is 1200 seconds (20 minutes).");
printf("\n\n \tWhere y is an optional game settings file to play.");
printf("\n\n \tIf y is not specified (or is empty) then auto test cycles");
printf("\n\n \tthrough playing scenarios.");
printf("\n\n \tWhere z is the word 'exit' indicating the game should exit");
printf("\n\n \tafter the game is finished or the time runs out. If z is");
printf("\n\n \tnot specified (or is empty) then auto test continues to cycle.");
printf("\n%s=x:y\t\t\tAuto connect to host server at IP or hostname x using port y",GAME_ARGS[GAME_ARG_CONNECT]);
printf("\n \t\tShortcut version of using %s and %s.",GAME_ARGS[GAME_ARG_CLIENT],GAME_ARGS[GAME_ARG_USE_PORTS]);
printf("\n \t\t*NOTE: to automatically connect to the first LAN");
printf("\n \t\t host you may use: %s=auto-connect",GAME_ARGS[GAME_ARG_CONNECT]);
printf("\n\n%s=x:y \t\tAuto connect to host server at IP or hostname x using",GAME_ARGS[GAME_ARG_CONNECT]);
printf("\n\n \t port y. Shortcut version of using %s and %s.",GAME_ARGS[GAME_ARG_CLIENT],GAME_ARGS[GAME_ARG_USE_PORTS]);
printf("\n\n \t*NOTE: to automatically connect to the first LAN host you may");
printf("\n\n \t use: %s=auto-connect",GAME_ARGS[GAME_ARG_CONNECT]);
printf("\n%s=x\t\t\tAuto connect to host server at IP or hostname x",GAME_ARGS[GAME_ARG_CLIENT]);
printf("\n \t\t*NOTE: to automatically connect to the first LAN");
printf("\n \t\t host you may use: %s=auto-connect",GAME_ARGS[GAME_ARG_CLIENT]);
printf("\n\n%s=x \tAuto connect to host server at IP or hostname x.",GAME_ARGS[GAME_ARG_CLIENT]);
printf("\n\n \t*NOTE: to automatically connect to the first LAN host you may");
printf("\n\n \t use: %s=auto-connect",GAME_ARGS[GAME_ARG_CLIENT]);
printf("\n%s\t\t\tAuto create a host server.",GAME_ARGS[GAME_ARG_SERVER]);
printf("\n\n%s \t\tAuto create a host server.",GAME_ARGS[GAME_ARG_SERVER]);
printf("\n%s=x,x\tRun as a headless server.",GAME_ARGS[GAME_ARG_MASTERSERVER_MODE]);
printf("\n \t\tWhere x is an optional comma delimited command");
printf("\n \t\t list of one or more of the following: ");
printf("\n \t\texit - which quits the application after a game");
printf("\n \t has no more connected players.");
printf("\n \t\tvps - which does NOT read commands from the");
printf("\n \t local console (for some vps's).");
printf("\n \t\tlan - which does not broadcast the hosting server");
printf("\n \t to the masterserver (for local LAN games).");
printf("\n\n%s=x,x ",GAME_ARGS[GAME_ARG_MASTERSERVER_MODE]);
printf("\n\n \tRun as a headless server.");
printf("\n\n \tWhere x is an optional comma delimited command list of one or");
printf("\n\n \t more of the following: ");
printf("\n\n \t'exit' - which quits the application after a game has no more");
printf("\n\n \t connected players.");
printf("\n\n \t'vps' - which does NOT read commands from the local console");
printf("\n\n \t (for some vps's).");
printf("\n\n \t'lan' - which does not broadcast the hosting server to the");
printf("\n\n \t masterserver (for local LAN games).");
printf("\n%s\tCheck the current status of a headless server.",GAME_ARGS[GAME_ARG_MASTERSERVER_STATUS]);
printf("\n\n%s ",GAME_ARGS[GAME_ARG_MASTERSERVER_STATUS]);
printf("\n\n \tCheck the current status of a headless server.");
printf("\n%s=x,y,z\t\tForce hosted games to listen internally on port",GAME_ARGS[GAME_ARG_USE_PORTS]);
printf("\n\t\t\t\tx, externally on port y and game status on port z.");
printf("\n \t\tWhere x is the internal port # on the local");
printf("\n \t\t machine to listen for connects");
printf("\n \t\t y is the external port # on the");
printf("\n \t\t router/proxy to forward connection");
printf("\n \t\t from to the internal port #");
printf("\n \t\t z is the game status port # on the");
printf("\n \t\t local machine to listen for status requests");
printf("\n \t\t*NOTE: If enabled the FTP Server port #'s will");
printf("\n \t\t be set to x+1 to x+9");
printf("\n\n%s=x,y,z \tForce hosted games to listen internally on port",GAME_ARGS[GAME_ARG_USE_PORTS]);
printf("\n\n \t x, externally on port y and for game status on port z.");
printf("\n\n \tWhere x is the internal port # on the local machine to");
printf("\n\n \t listen for connects.");
printf("\n\n \tWhere y is the external port # on the router/proxy to");
printf("\n\n \t forward connection from to the internal port #.");
printf("\n\n \tWhere z is the game status port # on the local machine");
printf("\n\n \t to listen for status requests.");
printf("\n\n \t*NOTE: If enabled the FTP Server port #'s will be set");
printf("\n\n \t to x+1 to x+9.");
printf("\n%s=x\t\tSet server title.",GAME_ARGS[GAME_ARG_SERVER_TITLE]);
printf("\n\n%s=x \tSet server title.",GAME_ARGS[GAME_ARG_SERVER_TITLE]);
printf("\n%s=x\t\tAuto load a scenario by scenario name.",GAME_ARGS[GAME_ARG_LOADSCENARIO]);
printf("\n%s=x\t\t\tAuto load a mod by mod pathname.",GAME_ARGS[GAME_ARG_MOD]);
printf("\n\n%s=x \tAuto load a scenario by scenario name.",GAME_ARGS[GAME_ARG_LOADSCENARIO]);
printf("\n\n%s=x \t\tAuto load a mod by mod pathname.",GAME_ARGS[GAME_ARG_MOD]);
// "================================================================================"
printf("\n%s=Map,Tileset\tAuto Preview a map by map name. (tileset is optional)",GAME_ARGS[GAME_ARG_PREVIEW_MAP]);
printf("\n%s\t\t\tdisplays the version string of this program.",GAME_ARGS[GAME_ARG_VERSION]);
printf("\n%s\t\t\tdisplays your video driver's OpenGL info.",GAME_ARGS[GAME_ARG_OPENGL_INFO]);
printf("\n%s\t\t\tdisplays your SDL version information.",GAME_ARGS[GAME_ARG_SDL_INFO]);
printf("\n%s\t\t\tdisplays your LUA version information.",GAME_ARGS[GAME_ARG_LUA_INFO]);
printf("\n%s\t\t\tdisplays LUA debug information.",GAME_ARGS[GAME_ARG_LUA_DEBUG]);
printf("\n%s\t\t\tdisplays your CURL version information.",GAME_ARGS[GAME_ARG_CURL_INFO]);
printf("\n%s\t\t\tdisplays your XERCES version information.",GAME_ARGS[GAME_ARG_XERCES_INFO]);
// "================================================================================"
printf("\n\n%s=Map,Tileset ",GAME_ARGS[GAME_ARG_PREVIEW_MAP]);
printf("\n\n \tAuto Preview a map by map name. (tileset is optional)");
printf("\n\n%s \t\tDisplays the version string of this program.",GAME_ARGS[GAME_ARG_VERSION]);
printf("\n\n%s \t\tDisplays your video driver's OpenGL info.",GAME_ARGS[GAME_ARG_OPENGL_INFO]);
printf("\n\n%s \t\tDisplays your SDL version information.",GAME_ARGS[GAME_ARG_SDL_INFO]);
printf("\n\n%s \t\tDisplays your LUA version information.",GAME_ARGS[GAME_ARG_LUA_INFO]);
printf("\n\n%s \t\tDisplays LUA debug information.",GAME_ARGS[GAME_ARG_LUA_DEBUG]);
printf("\n\n%s \t\tDisplays your CURL version information.",GAME_ARGS[GAME_ARG_CURL_INFO]);
printf("\n\n%s \t\tDisplays your XERCES version information.",GAME_ARGS[GAME_ARG_XERCES_INFO]);
printf("\n%s=x=purgeunused=purgeduplicates=gitdelete=hideduplicates",GAME_ARGS[GAME_ARG_VALIDATE_TECHTREES]);
printf("\n \t\tdisplay a report detailing any known problems");
printf("\n \t\trelated to your selected techtrees game data.");
printf("\n \t\tWhere x is a comma-delimited list of techtrees");
printf("\n \t\t to validate.");
printf("\n \t\tWhere purgeunused is an optional parameter");
printf("\n \t\t telling the validation to delete");
printf("\n \t\t extra files in the techtree that are");
printf("\n \t\t not used.");
printf("\n \t\tWhere purgeduplicates is an optional parameter");
printf("\n \t\t telling the validation to merge");
printf("\n \t\t duplicate files in the techtree.");
printf("\n \t\tWhere gitdelete is an optional parameter");
printf("\n \t\t telling the validation to call");
printf("\n \t\t git rm on duplicate / unused");
printf("\n \t\t files in the techtree.");
printf("\n \t\tWhere hideduplicates is an optional parameter");
printf("\n \t\t telling the validation to NOT SHOW");
printf("\n \t\t duplicate files in the techtree.");
printf("\n \t\t*NOTE: This only applies when files are");
printf("\n \t\t purged due to the above flags being set.");
printf("\n \t\texample:");
printf("\n %s %s=megapack,vbros_pack_5",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_VALIDATE_TECHTREES]);
printf("\n%s=x=purgeunused=purgeduplicates=hideduplicates",GAME_ARGS[GAME_ARG_VALIDATE_FACTIONS]);
printf("\n \t\tdisplay a report detailing any known problems");
printf("\n \t\trelated to your selected factions game data.");
printf("\n \t\tWhere x is a comma-delimited list of factions");
printf("\n \t\t to validate.");
printf("\n \t\tWhere purgeunused is an optional parameter");
printf("\n \t\t telling the validation to delete");
printf("\n \t\t extra files in the faction that are");
printf("\n \t\t not used.");
printf("\n \t\tWhere purgeduplicates is an optional parameter");
printf("\n \t\t telling the validation to merge");
printf("\n \t\t duplicate files in the faction.");
printf("\n \t\tWhere hideduplicates is an optional parameter");
printf("\n \t\t telling the validation to NOT SHOW");
printf("\n \t\t duplicate files in the techtree.");
printf("\n \t\t*NOTE: leaving the list empty is the same as");
printf("\n \t\trunning: %s",GAME_ARGS[GAME_ARG_VALIDATE_TECHTREES]);
printf("\n \t\texample:");
printf("\n %s %s=tech,egypt",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_VALIDATE_FACTIONS]);
printf("\n\n%s=x=purgeunused=purgeduplicates=gitdelete=hideduplicates ",GAME_ARGS[GAME_ARG_VALIDATE_TECHTREES]);
printf("\n\n \tDisplay a report detailing any known problems related to");
printf("\n\n \t your selected techtrees game data.");
printf("\n\n \tWhere x is a comma-delimited list of techtrees to validate.");
printf("\n\n \tWhere 'purgeunused' is an optional parameter telling the");
printf("\n\n \t validation to delete extra files in the techtree that");
printf("\n\n \t are not used.");
printf("\n\n \tWhere 'purgeduplicates' is an optional parameter telling");
printf("\n\n \t the validation to merge duplicate files in the techtree.");
printf("\n\n \tWhere 'gitdelete' is an optional parameter telling the");
printf("\n\n \t validation to call 'git rm' on duplicate / unused files");
printf("\n\n \t in the techtree.");
printf("\n\n \tWhere 'hideduplicates' is an optional parameter telling the");
printf("\n\n \t validation to NOT SHOW duplicate files in the techtree.");
printf("\n\n \t*NOTE: This only applies when files are purged due to the");
printf("\n\n \t above flags being set.");
printf("\n\n \texample:");
printf("\n\n \t%s %s=megapack,vbros_pack_5",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_VALIDATE_TECHTREES]);
printf("\n%s=x=purgeunused=gitdelete",GAME_ARGS[GAME_ARG_VALIDATE_SCENARIO]);
printf("\n \t\tdisplay a report detailing any known problems");
printf("\n \t\trelated to your selected scenario game data.");
printf("\n \t\tWhere x is a single scenario to validate.");
printf("\n \t\tWhere purgeunused is an optional parameter");
printf("\n \t\t telling the validation to delete extra");
printf("\n \t\t files in the scenario that are not used.");
printf("\n \t\texample:");
printf("\n %s %s=stranded",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_VALIDATE_SCENARIO]);
printf("\n\n%s=x=purgeunused=purgeduplicates=hideduplicates ",GAME_ARGS[GAME_ARG_VALIDATE_FACTIONS]);
printf("\n\n \tDisplay a report detailing any known problems related to");
printf("\n\n \t your selected factions game data.");
printf("\n\n \tWhere x is a comma-delimited list of factions to validate.");
printf("\n\n \tWhere 'purgeunused' is an optional parameter telling the");
printf("\n\n \t validation to delete extra files in the faction that are");
printf("\n\n \t not used.");
printf("\n\n \tWhere 'purgeduplicates' is an optional parameter telling the");
printf("\n\n \t validation to merge duplicate files in the faction.");
printf("\n\n \tWhere 'hideduplicates' is an optional parameter telling the");
printf("\n\n \t validation to NOT SHOW duplicate files in the techtree.");
printf("\n\n \t*NOTE: leaving the list empty is the same as running:");
printf("\n\n \t %s",GAME_ARGS[GAME_ARG_VALIDATE_TECHTREES]);
printf("\n\n \texample: %s %s=tech,egypt",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_VALIDATE_FACTIONS]);
printf("\n%s=x=purgeunused=gitdelete",GAME_ARGS[GAME_ARG_VALIDATE_TILESET]);
printf("\n \t\tdisplay a report detailing any known problems");
printf("\n \t\trelated to your selected tileset game data.");
printf("\n \t\tWhere x is a single tileset to validate.");
printf("\n \t\tWhere purgeunused is an optional parameter");
printf("\n \t\t telling the validation to delete extra");
printf("\n \t\t files in the tileset that are not used.");
printf("\n \t\texample:");
printf("\n %s %s=desert2",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_VALIDATE_TILESET]);
printf("\n\n%s=x=purgeunused=gitdelete ",GAME_ARGS[GAME_ARG_VALIDATE_SCENARIO]);
printf("\n\n \tDisplay a report detailing any known problems related to");
printf("\n\n \t your selected scenario game data.");
printf("\n\n \tWhere x is a single scenario to validate.");
printf("\n\n \tWhere 'purgeunused' is an optional parameter telling the");
printf("\n\n \t validation to delete extra files in the scenario that");
printf("\n\n \t are not used.");
printf("\n\n \texample: %s %s=stranded",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_VALIDATE_SCENARIO]);
printf("\n%s=x",GAME_ARGS[GAME_ARG_TRANSLATE_TECHTREES]);
printf("\n \t\tProduces a default lng file for the specified techtree");
printf("\n \t\tto prepare for translation into other languages.");
printf("\n \t\tWhere x is a techtree name");
printf("\n\n%s=x=purgeunused=gitdelete ",GAME_ARGS[GAME_ARG_VALIDATE_TILESET]);
printf("\n\n \tDisplay a report detailing any known problems related to");
printf("\n\n \t your selected tileset game data.");
printf("\n\n \tWhere x is a single tileset to validate.");
printf("\n\n \tWhere 'purgeunused' is an optional parameter telling the");
printf("\n\n \t validation to delete extra files in the tileset that");
printf("\n\n \t are not used.");
printf("\n\n \texample: %s %s=desert2",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_VALIDATE_TILESET]);
printf("\n%s=x",GAME_ARGS[GAME_ARG_LIST_MAPS]);
printf("\n \t\tdisplay a list of game content: maps");
printf("\n \t\twhere x is an optional name filter.");
printf("\n \t\texample:");
printf("\n %s %s=island*",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LIST_MAPS]);
printf("\n\n%s=x ",GAME_ARGS[GAME_ARG_TRANSLATE_TECHTREES]);
printf("\n\n \tProduces a default lng file for the specified techtree to");
printf("\n\n \t prepare for translation into other languages.");
printf("\n\n \tWhere x is a techtree name.");
printf("\n%s=showfactions",GAME_ARGS[GAME_ARG_LIST_TECHTRESS]);
printf("\n \t\tdisplay a list of game content: techtrees");
printf("\n \t\twhere showfactions is an optional parameter.");
printf("\n \t\tto display factions in each techtree.");
printf("\n \t\texample:");
printf("\n %s %s=showfactions",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LIST_TECHTRESS]);
printf("\n\n%s=x \t\tDisplay a list of game content: maps.",GAME_ARGS[GAME_ARG_LIST_MAPS]);
printf("\n\n \tWhere x is an optional name filter.");
printf("\n\n \texample: %s %s=island*",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LIST_MAPS]);
printf("\n%s=x",GAME_ARGS[GAME_ARG_LIST_SCENARIOS]);
printf("\n \t\tdisplay a list of game content: scenarios");
printf("\n \t\twhere x is an optional name filter.");
printf("\n \t\texample:");
printf("\n %s %s=beginner*",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LIST_SCENARIOS]);
printf("\n\n%s=showfactions ",GAME_ARGS[GAME_ARG_LIST_TECHTRESS]);
printf("\n\n \tDisplay a list of game content: techtrees.");
printf("\n\n \tWhere 'showfactions' is an optional parameter to display");
printf("\n\n \t factions in each techtree.");
printf("\n\n \texample: %s %s=showfactions",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LIST_TECHTRESS]);
printf("\n%s=x",GAME_ARGS[GAME_ARG_LIST_TILESETS]);
printf("\n \t\tdisplay a list of game content: tilesets");
printf("\n \t\twhere x is an optional name filter.");
printf("\n \t\texample:");
printf("\n %s %s=f*",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LIST_TILESETS]);
printf("\n\n%s=x \tDisplay a list of game content: scenarios.",GAME_ARGS[GAME_ARG_LIST_SCENARIOS]);
printf("\n\n \tWhere x is an optional name filter.");
printf("\n\n \texample: %s %s=beginner*",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LIST_SCENARIOS]);
printf("\n%s=x",GAME_ARGS[GAME_ARG_LIST_TUTORIALS]);
printf("\n \t\tdisplay a list of game content: tutorials");
printf("\n \t\twhere x is an optional name filter.");
printf("\n \t\texample:");
printf("\n %s %s=*",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LIST_TUTORIALS]);
printf("\n\n%s=x \tDisplay a list of game content: tilesets.",GAME_ARGS[GAME_ARG_LIST_TILESETS]);
printf("\n\n \tWhere x is an optional name filter.");
printf("\n\n \texample: %s %s=f*",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LIST_TILESETS]);
// "================================================================================"
printf("\n%s=x\t\t\tSets the game data path to x",GAME_ARGS[GAME_ARG_DATA_PATH]);
printf("\n \t\texample:");
printf("\n %s %s=/usr/local/game_data/",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_DATA_PATH]);
printf("\n%s=x\t\t\tSets the game ini path to x",GAME_ARGS[GAME_ARG_INI_PATH]);
printf("\n \t\texample");
printf("\n %s %s=~/game_config/",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_INI_PATH]);
printf("\n%s=x\t\t\tSets the game logs path to x",GAME_ARGS[GAME_ARG_LOG_PATH]);
printf("\n \t\texample:");
printf("\n %s %s=~/game_logs/",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LOG_PATH]);
printf("\n%s=x\t\t\tSets the game fonts path to x",GAME_ARGS[GAME_ARG_FONT_PATH]);
printf("\n \t\texample:");
printf("\n %s %s=~/myfonts/",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_FONT_PATH]);
printf("\n\n%s=x \tDisplay a list of game content: tutorials.",GAME_ARGS[GAME_ARG_LIST_TUTORIALS]);
printf("\n\n \tWhere x is an optional name filter.");
printf("\n\n \texample: %s %s=*",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LIST_TUTORIALS]);
printf("\n%s=x\t\tdisplay merged ini settings information.",GAME_ARGS[GAME_ARG_SHOW_INI_SETTINGS]);
printf("\n \t\tWhere x is an optional property name to");
printf("\n \t\t filter (default shows all).");
printf("\n \t\texample:");
printf("\n %s %s=DebugMode",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_INI_SETTINGS]);
// "================================================================================"
printf("\n\n%s=x \t\tSets the game data path to x.",GAME_ARGS[GAME_ARG_DATA_PATH]);
printf("\n\n \texample:");
printf("\n\n \t%s %s=/usr/local/game_data/",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_DATA_PATH]);
printf("\n\n%s=x \t\tSets the game ini path to x.",GAME_ARGS[GAME_ARG_INI_PATH]);
printf("\n\n \texample: %s %s=~/game_config/",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_INI_PATH]);
printf("\n\n%s=x \t\tSets the game logs path to x.",GAME_ARGS[GAME_ARG_LOG_PATH]);
printf("\n\n \texample: %s %s=~/game_logs/",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_LOG_PATH]);
printf("\n\n%s=x \t\tSets the game fonts path to x.",GAME_ARGS[GAME_ARG_FONT_PATH]);
printf("\n\n \texample: %s %s=~/myfonts/",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_FONT_PATH]);
printf("\n%s=x=textureformat=keepsmallest",GAME_ARGS[GAME_ARG_CONVERT_MODELS]);
printf("\n \t\tConvert a model file or folder to the current g3d");
printf("\n \t\tversion format.");
printf("\n \t\tWhere x is a filename or folder containing the g3d");
printf("\n \t\t model(s).");
printf("\n \t\tWhere textureformat is an optional supported");
printf("\n \t\t texture format to convert to (tga,bmp,jpg,png).");
printf("\n \t\tWhere keepsmallest is an optional flag indicating");
printf("\n \t\t to keep original texture if its filesize is");
printf("\n \t\t smaller than the converted format.");
printf("\n \t\texample:");
printf("\n %s %s=techs/megapack/factions/tech/units/castle/models/castle.g3d=png=keepsmallest",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_CONVERT_MODELS]);
printf("\n\n%s=x \tDisplay merged ini settings information.",GAME_ARGS[GAME_ARG_SHOW_INI_SETTINGS]);
printf("\n\n \tWhere x is an optional property name to filter (default");
printf("\n\n \t shows all).");
printf("\n\n \texample:");
printf("\n\n \t%s %s=DebugMode",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_INI_SETTINGS]);
printf("\n%s=x\t\tforce the language to be the language specified by x.",GAME_ARGS[GAME_ARG_USE_LANGUAGE]);
printf("\n \t\tWhere x is a language filename or ISO639-1 code.");
printf("\n \t\texample: %s %s=english",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_LANGUAGE]);
printf("\n \t\texample: %s %s=en",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_LANGUAGE]);
printf("\n\n%s=x=textureformat=keepsmallest ",GAME_ARGS[GAME_ARG_CONVERT_MODELS]);
printf("\n\n \tConvert a model file or folder to the current g3d version");
printf("\n\n \t format.");
printf("\n\n \tWhere x is a filename or folder containing the g3d model(s).");
printf("\n\n \tWhere 'textureformat' is an optional supported texture");
printf("\n\n \t format to convert to (tga,bmp,jpg,png).");
printf("\n\n \tWhere 'keepsmallest' is an optional flag indicating to keep");
printf("\n\n \t the original texture if its filesize is smaller than the");
printf("\n\n \t converted format.");
printf("\n\n \texample:");
printf("\n\n \t%s %s=techs/megapack/factions/tech/",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_CONVERT_MODELS]);
printf("\n\n \tunits/castle/models/castle.g3d=png=keepsmallest");
printf("\n\n%s=x \tForce the language to be the language specified",GAME_ARGS[GAME_ARG_USE_LANGUAGE]);
printf("\n\n \t by x. Where x is a language filename or ISO639-1 code.");
printf("\n\n \texample: %s %s=english",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_LANGUAGE]);
printf("\n\n \texample: %s %s=en",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_LANGUAGE]);
printf("\n%s=x\t\tshow the calculated CRC for the map named x.",GAME_ARGS[GAME_ARG_SHOW_MAP_CRC]);
printf("\n \t\tWhere x is a map name.");
printf("\n \t\texample:");
printf("\n %s %s=four_rivers",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_MAP_CRC]);
printf("\n\n%s=x \tShow the calculated CRC for the map named x.",GAME_ARGS[GAME_ARG_SHOW_MAP_CRC]);
printf("\n\n \tWhere x is a map name.");
printf("\n\n \texample: %s %s=four_rivers",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_MAP_CRC]);
printf("\n%s=x\t\tshow the calculated CRC for the tileset named x.",GAME_ARGS[GAME_ARG_SHOW_TILESET_CRC]);
printf("\n \t\tWhere x is a tileset name.");
printf("\n \t\texample:");
printf("\n %s %s=forest",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_TILESET_CRC]);
printf("\n\n%s=x \tShow the calculated CRC for the tileset named x.",GAME_ARGS[GAME_ARG_SHOW_TILESET_CRC]);
printf("\n\n \tWhere x is a tileset name.");
printf("\n\n \texample: %s %s=forest",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_TILESET_CRC]);
printf("\n%s=x\t\tshow the calculated CRC for the techtree named x.",GAME_ARGS[GAME_ARG_SHOW_TECHTREE_CRC]);
printf("\n \t\tWhere x is a techtree name.");
printf("\n \t\texample:");
printf("\n %s %s=megapack",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_TECHTREE_CRC]);
printf("\n\n%s=x \tShow the calculated CRC for the techtree named x.",GAME_ARGS[GAME_ARG_SHOW_TECHTREE_CRC]);
printf("\n\n \tWhere x is a techtree name.");
printf("\n\n \texample: %s %s=megapack",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_TECHTREE_CRC]);
printf("\n%s=x\t\tshow the calculated CRC for the scenario named x.",GAME_ARGS[GAME_ARG_SHOW_SCENARIO_CRC]);
printf("\n \t\tWhere x is a scenario name.");
printf("\n \t\texample:");
printf("\n %s %s=storming",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_SCENARIO_CRC]);
printf("\n\n%s=x \tShow the calculated CRC for the scenario named x.",GAME_ARGS[GAME_ARG_SHOW_SCENARIO_CRC]);
printf("\n\n \tWhere x is a scenario name.");
printf("\n\n \texample: %s %s=storming",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_SCENARIO_CRC]);
// "================================================================================"
printf("\n%s=x=y",GAME_ARGS[GAME_ARG_SHOW_PATH_CRC]);
printf("\n \t\tShow the calculated CRC for files in the path located");
printf("\n \t\tin x using file filter y.");
printf("\n \t\tWhere x is a path name.");
printf("\n \t\tand y is file(s) filter.");
printf("\n \t\texample:");
printf("\n %s %s=techs/=megapack.7z",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_PATH_CRC]);
// "================================================================================"
printf("\n\n%s=x=y \tShow the calculated CRC for files in the path",GAME_ARGS[GAME_ARG_SHOW_PATH_CRC]);
printf("\n\n \t located in x using file filter y.");
printf("\n\n \tWhere x is a path name and y is file(s) filter.");
printf("\n\n \texample: %s %s=techs/=megapack.7z",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SHOW_PATH_CRC]);
printf("\n%s\t\tdisables stack backtrace on errors.",GAME_ARGS[GAME_ARG_DISABLE_BACKTRACE]);
printf("\n\n%s \tDisables stack backtrace on errors.",GAME_ARGS[GAME_ARG_DISABLE_BACKTRACE]);
printf("\n%s\tdisables the sigsegv error handler.",GAME_ARGS[GAME_ARG_DISABLE_SIGSEGV_HANDLER]);
printf("\n\n%s ",GAME_ARGS[GAME_ARG_DISABLE_SIGSEGV_HANDLER]);
printf("\n\n \tDisables the sigsegv error handler.");
printf("\n\n%s \t\tDisables trying to use Vertex Buffer Objects.",GAME_ARGS[GAME_ARG_DISABLE_VBO]);
printf("\n\n%s ",GAME_ARGS[GAME_ARG_DISABLE_VERTEX_INTERPOLATION]);
printf("\n\n \tDisables interpolating animations to make them smoother.");
printf("\n\n%s \tDisables the sound system.",GAME_ARGS[GAME_ARG_DISABLE_SOUND]);
printf("\n%s\t\t\tdisables trying to use Vertex Buffer Objects.",GAME_ARGS[GAME_ARG_DISABLE_VBO]);
printf("\n%s\t\t\tdisables interpolating animations to make them smoother.",GAME_ARGS[GAME_ARG_DISABLE_VERTEX_INTERPOLATION]);
printf("\n%s\t\t\tdisables the sound system.",GAME_ARGS[GAME_ARG_DISABLE_SOUND]);
printf("\n\n%s \tEnables using the legacy font system.",GAME_ARGS[GAME_ARG_ENABLE_LEGACYFONTS]);
printf("\n%s\t\tenables using the legacy font system.",GAME_ARGS[GAME_ARG_ENABLE_LEGACYFONTS]);
// "================================================================================"
printf("\n\n%s=x \tOverride the video resolution.",GAME_ARGS[GAME_ARG_USE_RESOLUTION]);
printf("\n\n \tWhere x is a string with the following format: 'width x height'.");
printf("\n\n \texample: %s %s=1024x768",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_RESOLUTION]);
// "================================================================================"
printf("\n%s=x\t\t\toverride the video resolution.",GAME_ARGS[GAME_ARG_USE_RESOLUTION]);
printf("\n \t\tWhere x is a string with the following format:");
printf("\n \t\twidthxheight");
printf("\n \t\texample: %s %s=1024x768",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_RESOLUTION]);
printf("\n\n%s=x \t\tOverride the video colorbits.",GAME_ARGS[GAME_ARG_USE_COLORBITS]);
printf("\n\n \tWhere x is a valid colorbits value supported by your video");
printf("\n\n \t driver.");
printf("\n\n \texample: %s %s=32",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_COLORBITS]);
printf("\n%s=x\t\t\toverride the video colorbits.",GAME_ARGS[GAME_ARG_USE_COLORBITS]);
printf("\n \t\tWhere x is a valid colorbits value supported by");
printf("\n \t\t your video driver");
printf("\n \t\texample: %s %s=32",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_COLORBITS]);
printf("\n\n%s=x \t\tOverride the video depthbits.",GAME_ARGS[GAME_ARG_USE_DEPTHBITS]);
printf("\n\n \tWhere x is a valid depthbits value supported by your video");
printf("\n\n \t driver.");
printf("\n\n \texample: %s %s=24",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_DEPTHBITS]);
printf("\n%s=x\t\t\toverride the video depthbits.",GAME_ARGS[GAME_ARG_USE_DEPTHBITS]);
printf("\n \t\tWhere x is a valid depthbits value supported by");
printf("\n \t\t your video driver");
printf("\n \t\texample: %s %s=24",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_DEPTHBITS]);
printf("\n\n%s=x \tOverride the video fullscreen mode.",GAME_ARGS[GAME_ARG_USE_FULLSCREEN]);
printf("\n\n \tWhere x either true or false.");
printf("\n\n \texample: %s %s=true",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_FULLSCREEN]);
printf("\n%s=x\t\t\toverride the video fullscreen mode.",GAME_ARGS[GAME_ARG_USE_FULLSCREEN]);
printf("\n \t\tWhere x either true or false");
printf("\n \t\texample: %s %s=true",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_FULLSCREEN]);
printf("\n\n%s=x \t\tOverride the video gamma (contrast) value.",GAME_ARGS[GAME_ARG_SET_GAMMA]);
printf("\n\n \tWhere x is a floating point value.");
printf("\n\n \texample: %s %s=1.5",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SET_GAMMA]);
printf("\n%s=x\t\t\toverride the video gamma (contrast) value.",GAME_ARGS[GAME_ARG_SET_GAMMA]);
printf("\n \t\tWhere x a floating point value");
printf("\n \t\texample: %s %s=1.5",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_SET_GAMMA]);
printf("\n\n%s=x \t\tOverride the font to use.",GAME_ARGS[GAME_ARG_USE_FONT]);
printf("\n\n \tWhere x is the path and name of a font file supported by");
printf("\n\n \t freetype2.");
printf("\n\n \texample:");
printf("\n\n \t%s %s=$APPLICATIONDATAPATH/data/core/fonts/Vera.ttf",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_FONT]);
printf("\n%s=x\t\t\toverride the font to use.",GAME_ARGS[GAME_ARG_USE_FONT]);
printf("\n \t\tWhere x is the path and name of a font file supported");
printf("\n \t\t by freetype2.");
printf("\n \t\texample:");
printf("\n %s %s=$APPLICATIONDATAPATH/data/core/fonts/Vera.ttf",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_USE_FONT]);
printf("\n\n%s=x \tOverride the font base size.",GAME_ARGS[GAME_ARG_FONT_BASESIZE]);
printf("\n\n \tWhere x is the numeric base font size to use.");
printf("\n\n \texample: %s %s=5",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_FONT_BASESIZE]);
printf("\n%s=x\t\toverride the font base size.",GAME_ARGS[GAME_ARG_FONT_BASESIZE]);
printf("\n \t\tWhere x is the numeric base font size to use.");
printf("\n \t\texample: %s %s=5",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_FONT_BASESIZE]);
printf("\n\n%s \tDisables video playback.",GAME_ARGS[GAME_ARG_DISABLE_VIDEOS]);
printf("\n%s\t\tdisables video playback.",GAME_ARGS[GAME_ARG_DISABLE_VIDEOS]);
printf("\n\n%s ",GAME_ARGS[GAME_ARG_DISABLE_OPENGL_CAPS_CHECK]);
printf("\n\n \tDisables opengl capability checks (for corrupt or flaky video");
printf("\n\n \t drivers).");
printf("\n%s\t\tdisables opengl capability checks (for corrupt or flaky video drivers).",GAME_ARGS[GAME_ARG_DISABLE_OPENGL_CAPS_CHECK]);
printf("\n%s=x=y\t\t\tcompress selected game data into archives for network sharing.",GAME_ARGS[GAME_ARG_CREATE_DATA_ARCHIVES]);
printf("\n \t\tWhere x is one of the following data items to compress.");
printf("\n \t\ttechtrees, tilesets or all.");
printf("\n \t\tWhere y = include_main to include main (non mod) data.");
printf("\n \t\texample: %s %s=all",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_CREATE_DATA_ARCHIVES]);
printf("\n%s\t\t\tdisplays verbose information in the console.",GAME_ARGS[GAME_ARG_VERBOSE_MODE]);
printf("\n\n%s=x=y ",GAME_ARGS[GAME_ARG_CREATE_DATA_ARCHIVES]);
printf("\n\n \tCompress selected game data into archives for network sharing.");
printf("\n\n \tWhere x is one of the following data items to compress:");
printf("\n\n \t techtrees, tilesets or all.");
printf("\n\n \tWhere y = include_main to include main (non mod) data.");
printf("\n\n \texample: %s %s=all",extractFileFromDirectoryPath(argv0).c_str(),GAME_ARGS[GAME_ARG_CREATE_DATA_ARCHIVES]);
printf("\n\n%s \t\tDisplays verbose information in the console.",GAME_ARGS[GAME_ARG_VERBOSE_MODE]);
printf("\n\n");
}
@ -624,15 +598,15 @@ int mainSetup(int argc, char **argv) {
if( hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_OPENGL_INFO]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_SDL_INFO]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_LUA_INFO]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_CURL_INFO]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_XERCES_INFO]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_VERSION]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_SHOW_INI_SETTINGS]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_CURL_INFO]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_XERCES_INFO]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_VERSION]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_SHOW_INI_SETTINGS]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_VALIDATE_TECHTREES]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_VALIDATE_FACTIONS]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_VALIDATE_SCENARIO]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_VALIDATE_TILESET]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_LIST_MAPS]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_LIST_MAPS]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_LIST_TECHTRESS]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_LIST_SCENARIOS]) == true ||
hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_LIST_TILESETS]) == true ||
@ -682,12 +656,12 @@ int mainSetup(int argc, char **argv) {
return 0;
}
#define MAIN_FUNCTION(X) int main(int argc, char **argv) { \
int result = mainSetup(argc,argv); \
if(result == 0) { \
result = X(argc, argv); \
} \
return result; \
#define MAIN_FUNCTION(X) int main(int argc, char **argv) { \
int result = mainSetup(argc,argv); \
if(result == 0) { \
result = X(argc, argv); \
} \
return result; \
}
#endif

View File

@ -217,12 +217,12 @@ void PlatformContextGl::init(int colorBits, int depthBits, int stencilBits,
#ifndef WIN32
string mg_icon_file = "";
#if defined(CUSTOM_DATA_INSTALL_PATH_VALUE)
if(fileExists(formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH_VALUE)) + "megaglest.png")) {
mg_icon_file = formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH_VALUE)) + "megaglest.png";
#if defined(CUSTOM_DATA_INSTALL_PATH)
if(fileExists(formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH)) + "megaglest.png")) {
mg_icon_file = formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH)) + "megaglest.png";
}
else if(fileExists(formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH_VALUE)) + "megaglest.bmp")) {
mg_icon_file = formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH_VALUE)) + "megaglest.bmp";
else if(fileExists(formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH)) + "megaglest.bmp")) {
mg_icon_file = formatPath(TOSTRING(CUSTOM_DATA_INSTALL_PATH)) + "megaglest.bmp";
}
#endif