diff --git a/CMakeLists.txt b/CMakeLists.txt index 6413117570..156aaa299a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,8 +60,8 @@ IF (DEFINED ENV{SHORT_SHA} AND NOT "$ENV{SHORT_SHA}" STREQUAL "") SET(VEGASTRIKE_VERSION_TWEAK "$ENV{SHORT_SHA}") ELSE () SET (GIT_ROOT_DIR "${CMAKE_SOURCE_DIR}") - MESSAGE("-- CMAKE_SOURCE_DIR = ${CMAKE_SOURCE_DIR}") - MESSAGE("-- GIT_ROOT_DIR = ${GIT_ROOT_DIR}") + MESSAGE(STATUS "CMAKE_SOURCE_DIR = ${CMAKE_SOURCE_DIR}") + MESSAGE(STATUS "GIT_ROOT_DIR = ${GIT_ROOT_DIR}") EXECUTE_PROCESS( COMMAND git rev-parse --short HEAD WORKING_DIRECTORY ${GIT_ROOT_DIR} @@ -136,16 +136,16 @@ SET(CMAKE_C_EXTENSIONS ON) # - https://github.com/vegastrike/Vega-Strike-Engine-Source/issues/94 # OPTION(ENABLE_PIE "Enable Position Independent Executables/Shared Libraries (NOT RECOMMENDED on Ubuntu/Mint)" OFF) -MESSAGE("-- Always using preferred PIE logic now") +MESSAGE(STATUS "Always using preferred PIE logic now") include(CheckPIESupported) check_pie_supported() UNSET(CMAKE_POSITION_INDEPENDENT_CODE) IF (ENABLE_PIE) - MESSAGE("!! Enabling Position Independent Executables/Shared Libraries (NOT RECOMMENDED on Ubuntu/Mint) !!") + MESSAGE(WARNING "Enabling Position Independent Executables/Shared Libraries (NOT RECOMMENDED on Ubuntu/Mint) !!") SET(CMAKE_POSITION_INDEPENDENT_CODE ON) ELSE (ENABLE_PIE) - MESSAGE("++ Disabling Position Independent Executables/Shared Libraries (Recommended on Ubuntu/Mint)") + MESSAGE(STATUS "Disabling Position Independent Executables/Shared Libraries (Recommended on Ubuntu/Mint)") SET(CMAKE_POSITION_INDEPENDENT_CODE OFF) ENDIF (ENABLE_PIE) diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index c31ce5ef3c..e4a560faa0 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -173,8 +173,8 @@ ELSE () FIND_PACKAGE(Python3 3.7...<3.14 REQUIRED COMPONENTS Development Interpreter) ENDIF () -MESSAGE("++ Python library : ${Python3_LIBRARIES} (${Python3_VERSION})") -MESSAGE("++ Python include dir : ${Python3_INCLUDE_DIRS}") +MESSAGE(STATUS "Python library : ${Python3_LIBRARIES} (${Python3_VERSION})") +MESSAGE(STATUS "Python include dir : ${Python3_INCLUDE_DIRS}") IF (Python3_FOUND) SET(TST_INCLUDES ${Python3_INCLUDE_DIRS}) SET(TST_LIBS ${Python3_LIBRARIES}) @@ -189,10 +189,10 @@ ENDIF (Python3_FOUND) # Find Boost with boost_python library # Note: we now use Cmake 3.21 and Boost 1.75. -MESSAGE("++ From now on, always using System Boost (ver. 1.75 or higher)") +MESSAGE(STATUS "From now on, always using System Boost (ver. 1.75 or higher)") SET(BOOST_PYTHON_COMPONENT "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}") -FIND_PACKAGE(Boost COMPONENTS ${BOOST_PYTHON_COMPONENT} json log log_setup date_time system filesystem thread chrono atomic REQUIRED) -MESSAGE("++ Found System Boost version ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") +FIND_PACKAGE(Boost COMPONENTS ${BOOST_PYTHON_COMPONENT} json log log_setup date_time system filesystem thread chrono atomic program_options REQUIRED) +MESSAGE(STATUS "Found System Boost version ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") SET(BOOST_PYTHON_NO_PY_SIGNATURES 1) SET(TST_INCLUDES ${TST_INCLUDES} ${Python3_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) @@ -219,7 +219,7 @@ IF (NOT DISABLE_CLIENT) ########## MESSAGE(STATUS "Path to glu.h: ${VEGA_GLU_H_PATH}") SET(TST_INCLUDES ${TST_INCLUDES} ${VEGA_GLEXT_H_DIRECTORY} ${VEGA_GL_H_DIRECTORY} ${VEGA_GLU_H_DIRECTORY}) ELSE (OPENGL_FOUND AND OPENGL_GLU_FOUND) - MESSAGE(SEND_WARNING "Why you no have GL?") + MESSAGE(WARNING "Why you no have GL?") ENDIF (OPENGL_FOUND AND OPENGL_GLU_FOUND) # Workaround two oversights in FindGLUT (when trying to use freeglut on MacOS): @@ -251,7 +251,7 @@ IF (NOT DISABLE_CLIENT) ########## SET(TST_INCLUDES ${TST_INCLUDES} ${VEGA_GLUT_H_DIRECTORY} ${GLUT_INCLUDE_DIR}) SET(TST_LIBS ${TST_LIBS} ${GLUT_LIBRARIES}) ELSE (GLUT_FOUND) - MESSAGE(SEND_WARNING "I can't build this, missing GLUT") + MESSAGE(WARNING "I can't build this, missing GLUT") ENDIF (GLUT_FOUND) UNSET(OPENGL_LIBRARY_DIR) @@ -260,12 +260,12 @@ IF (NOT DISABLE_CLIENT) ########## #Find OpenAL FIND_PACKAGE(OpenAL REQUIRED) IF (OPENAL_FOUND) - MESSAGE("++ Found OpenAL") + MESSAGE(STATUS "Found OpenAL") SET(TST_INCLUDES ${TST_INCLUDES} ${OPENAL_INCLUDE_DIR}) SET(TST_LIBS ${TST_LIBS} ${OPENAL_LIBRARY}) SET(HAVE_AL 1) ELSE (OPENAL_FOUND) - MESSAGE("!! We aint got no sound") + MESSAGE(WARNING "We aint got no sound") ENDIF (OPENAL_FOUND) IF (NOT BEOS) @@ -274,11 +274,11 @@ IF (NOT DISABLE_CLIENT) ########## IF (SDL2_FOUND) SET(TST_INCLUDES ${TST_INCLUDES} ${SDL2_INCLUDE_DIRS}) SET(TST_LIBS ${TST_LIBS} ${SDL2_LIBRARIES}) - MESSAGE("++ SDL2 Found") + MESSAGE(STATUS "SDL2 Found") SET(HAVE_SDL 1) SET(SDL_WINDOWING 1) ELSE (SDL2_FOUND) - MESSAGE("!! How will we render to OpenGL without SDL2?") + MESSAGE(WARNING "How will we render to OpenGL without SDL2?") ENDIF (SDL2_FOUND) ENDIF (NOT BEOS) @@ -289,7 +289,7 @@ IF (NOT DISABLE_CLIENT) ########## SET(TST_LIBS ${TST_LIBS} ${Vorbis_LIBRARIES}) SET(HAVE_OGG 1) ELSE (Vorbis_FOUND) - MESSAGE("!! Can't find Vorbis libs") + MESSAGE(WARNING "Can't find Vorbis libs") ENDIF (Vorbis_FOUND) #Find JPEG @@ -298,7 +298,7 @@ IF (NOT DISABLE_CLIENT) ########## SET(TST_INCLUDES ${TST_INCLUDES} ${JPEG_INCLUDE_DIR}) SET(TST_LIBS ${TST_LIBS} ${JPEG_LIBRARIES}) ELSE (JPEG_FOUND) - MESSAGE("!! How are we gonna open jpegs?") + MESSAGE(WARNING "How are we gonna open jpegs?") ENDIF (JPEG_FOUND) #Find PNG @@ -307,7 +307,7 @@ IF (NOT DISABLE_CLIENT) ########## SET(TEST_INCLUDES ${TST_INCLUDES} ${PNG_INCLUDE_DIRS}) SET(TST_LIBS ${TST_LIBS} ${PNG_LIBRARIES}) ELSE (PNG_FOUND) - MESSAGE("!! Can't find PNG lib") + MESSAGE(WARNING "Can't find PNG lib") ENDIF (PNG_FOUND) ENDIF(NOT DISABLE_CLIENT) ########## @@ -318,7 +318,7 @@ IF (ZLIB_FOUND) SET(TST_INCLUDES ${TST_INCLUDES} ${ZLIB_INCLUDE_DIR}) SET(TST_LIBS ${TST_LIBS} ${ZLIB_LIBRARIES}) ELSE (ZLIB_FOUND) - MESSAGE("!! For the love of god, no zlib here") + MESSAGE(WARNING "For the love of god, no zlib here") ENDIF (ZLIB_FOUND) #find Expat @@ -327,7 +327,7 @@ IF (EXPAT_FOUND) SET(TST_INCLUDES ${TST_INCLUDES} ${EXPAT_INCLUDE_DIRS}) SET(TST_LIBS ${TST_LIBS} ${EXPAT_LIBRARIES}) ELSE (EXPAT_FOUND) - MESSAGE("!! We can't find expat for XML crap") + MESSAGE(WARNING "We can't find expat for XML crap") ENDIF (EXPAT_FOUND) #Find FFMpeg @@ -339,17 +339,17 @@ IF (NOT DISABLE_FFMPEG) SET(TST_LIBS ${TST_LIBS} ${FFMPEG_LIBRARIES}) ADD_DEFINITIONS(${FFMPEG_DEFINITIONS}) SET(HAVE_FFMPEG 1 ) - MESSAGE("++ FFmpeg found.") + MESSAGE(STATUS "FFmpeg found.") IF (swscale1_FOUND) - MESSAGE("++ FFmpeg's libswscale found.") + MESSAGE(STATUS "FFmpeg's libswscale found.") ELSE (swscale1_FOUND) - MESSAGE("-- FFMpeg's libswscale not found... depending on your ffmpeg version, VS might not build.") + MESSAGE(STATUS "FFMpeg's libswscale not found... depending on your ffmpeg version, VS might not build.") ENDIF (swscale1_FOUND) ELSE (FFMPEG_FOUND) - MESSAGE("-- FFMPEG Not Found") + MESSAGE(STATUS "FFMPEG Not Found") ENDIF (FFMPEG_FOUND) ELSE (NOT DISABLE_FFMPEG) - MESSAGE("-- FFMPEG disabled") + MESSAGE(STATUS "FFMPEG disabled") ENDIF (NOT DISABLE_FFMPEG) #Find Ogre @@ -362,12 +362,12 @@ IF (NOT DISABLE_OGRE) SET(TST_LIBS ${TST_LIBS} ${OGRE_LIBRARY}) ADD_DEFINITIONS(${OGRE_DEFINITIONS}) SET(HAVE_OGRE 1) - MESSAGE("++ Found Ogre: ${OGRE_VERSION}") + MESSAGE(STATUS "Found Ogre: ${OGRE_VERSION}") ELSE (OGRE_FOUND) - MESSAGE("-- Ogre Not Found: compiling without") + MESSAGE(STATUS "Ogre Not Found: compiling without") ENDIF (OGRE_FOUND) ELSE (NOT DISABLE_OGRE) - MESSAGE("-- Ogre disabled") + MESSAGE(STATUS "Ogre disabled") ENDIF (NOT DISABLE_OGRE) IF (NOT BEOS) @@ -1061,9 +1061,9 @@ ADD_SUBDIRECTORY(objconv) ## show debug output #GET_DIRECTORY_PROPERTY(TEMP_DIRECTORY INCLUDE_DIRECTORIES) -#MESSAGE("-- Default build type is RelWithDebInfo, no cpu opts enabled. ") -#MESSAGE("++ Building with BUILD_OPT: ${BUILD_OPT}") -#MESSAGE("++ Building with CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") +#MESSAGE(STATUS "Default build type is RelWithDebInfo, no cpu opts enabled. ") +#MESSAGE(STATUS "Building with BUILD_OPT: ${BUILD_OPT}") +#MESSAGE(STATUS "Building with CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") #MESSAGE("Linking with : ${TST_LIBS}") #MESSAGE("including : ${TEMP_DIRECTORY}") ## end debug output @@ -1157,7 +1157,7 @@ SET(CPACK_SOURCE_GENERATOR "TBZ2" "TXZ") # See https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/PackageGenerators for generator lists IF (WIN32 AND NOT UNIX) - MESSAGE("-- Configuring Packaging for Windows") + MESSAGE(STATUS "Configuring Packaging for Windows") # NSIS - See https://cmake.org/cmake/help/v3.3/module/CPackNSIS.html # NSI bug requires at least 1 set of 4 forwards slashes?? SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}\\\\icon4.ico") @@ -1172,7 +1172,7 @@ IF (WIN32 AND NOT UNIX) SET(CPACK_GENERATOR "NSIS" "NSIS64" "WIX" "7Z" "ZIP") SET(CPACK_PACKAGE_EXECUTABLES "vegastrike.exe" "vegastrike-engine.exe" "vega-meshtool.exe" "vegasettings.exe") ELSEIF (XCODE) - MESSAGE("-- Configuring Packaging for Mac OS X") + MESSAGE(STATUS "Configuring Packaging for Mac OS X") # Mac OS X # There's a few options for MacOSX; not sure what we want to use # DragNDrop -> DMG @@ -1181,7 +1181,7 @@ ELSEIF (XCODE) # PackageMaker - see https://cmake.org/cmake/help/v3.3/module/CPackPackageMaker.html SET(CPACK_GENERATOR "DragNDrop" "BUNDLE" "TBZ2" "TGZ" "TXZ") ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) - MESSAGE("-- Configuring Packaging for Linux") + MESSAGE(STATUS "Configuring Packaging for Linux") SET(CPACK_GENERATOR "TBZ2" "TGZ" "TXZ") # Linux @@ -1193,7 +1193,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) # "DEB" IF(VS_CAN_BUILD_DEB) - MESSAGE("-- Configuring Debian Packaging") + MESSAGE(STATUS "Configuring Debian Packaging") # See https://cmake.org/cmake/help/v3.3/module/CPackDeb.html SET(CPACK_DEBIAN_PACKAGE_NAME "Vega-Strike") SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "maintainers@vega-strike.org") @@ -1251,7 +1251,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl-gfx1.2-5, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl-gfx1.2-5, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (DEBIAN_RELEASE_VERSION STREQUAL "bullseye") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.9") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1259,7 +1259,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx1.2-5, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx1.2-5, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (DEBIAN_RELEASE_VERSION STREQUAL "buster") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.7") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1267,7 +1267,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (DEBIAN_RELEASE_VERSION STREQUAL "stretch") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.5") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1275,9 +1275,9 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSE () - MESSAGE(SEND_WARNING "!! Unsupported Debian version.") + MESSAGE(WARNING "!! Unsupported Debian version.") ENDIF () ELSE (USE_DEBIAN_VERSION) @@ -1289,7 +1289,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, ${VEGA_STRIKE_GLU_DEPENDENCY}, libopengl0, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER} libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, ${VEGA_STRIKE_GLU_DEPENDENCY}, libopengl0, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER} libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (LSB_LINUX_DISTRIBUTION_CODENAME STREQUAL "focal") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.8") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1297,7 +1297,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER} libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER} libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (LSB_LINUX_DISTRIBUTION_CODENAME STREQUAL "bookworm") # Apparently some versions of Debian have lsb_release after all SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.11") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1305,7 +1305,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (LSB_LINUX_DISTRIBUTION_CODENAME STREQUAL "bullseye") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.9") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1313,7 +1313,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl-gfx1.2-5, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER} libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl-gfx1.2-5, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER} libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (LSB_LINUX_DISTRIBUTION_CODENAME STREQUAL "buster") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.7") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1321,7 +1321,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER} libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER} libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (DEBIAN_RELEASE_VERSION STREQUAL "stretch") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.5") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1329,7 +1329,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (LSB_LINUX_DISTRIBUTION_CODENAME STREQUAL "groovy") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.9") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1337,7 +1337,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (LSB_LINUX_DISTRIBUTION_CODENAME STREQUAL "hirsute") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.9") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1345,7 +1345,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (LSB_LINUX_DISTRIBUTION_CODENAME STREQUAL "ulyana") # Linux Mint 20 codename "ulyana" SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.8") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1353,7 +1353,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (LSB_LINUX_DISTRIBUTION_CODENAME STREQUAL "vanessa") # Linux Mint 20 codename "vanessa" SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.10") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1361,7 +1361,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (LSB_LINUX_DISTRIBUTION_CODENAME STREQUAL "impish") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.10") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1369,7 +1369,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSEIF (LSB_LINUX_DISTRIBUTION_CODENAME STREQUAL "jammy") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython3.10") IF (Boost_DERIVED_VERSION STREQUAL "") @@ -1377,9 +1377,9 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libjpeg62-turbo, libpng16-16, freeglut3, libgtk-3-0, libvorbis0a, libopenal1, libsdl2-gfx2.0.14, xdg-utils, libgl1, libopengl0, ${VEGA_STRIKE_GLU_DEPENDENCY}, libboost-atomic${BOOST_VER}, libboost-chrono${BOOST_VER}, libboost-date-time${BOOST_VER}, libboost-filesystem${BOOST_VER}, libboost-log${BOOST_VER}, libboost-python${BOOST_VER}, libboost-regex${BOOST_VER}, libboost-system${BOOST_VER}, libboost-thread${BOOST_VER}, libboost-json${BOOST_VER}, libboost-program-options${BOOST_VER}") ELSE () - MESSAGE(SEND_WARNING "!! Unsupported Debian derivative.") + MESSAGE(WARNING "!! Unsupported Debian derivative.") ENDIF () ENDIF (USE_DEBIAN_VERSION) @@ -1400,7 +1400,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) # "RPM" IF (VS_CAN_BUILD_RPM) - MESSAGE("-- Configuring RPM Packaging") + MESSAGE(STATUS "Configuring RPM Packaging") # See https://cmake.org/cmake/help/v3.3/module/CPackRPM.html SET(CPACK_RPM_PACKAGE_LICENSE "GPLv3") # See ../LICENSE SET(CPACK_RPM_PACKAGE_URL "https://www.vega-strike.org") @@ -1420,7 +1420,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) IF (LINUX_ID STREQUAL opensuse-leap) IF (LINUX_VERSION_ID VERSION_EQUAL 15.2 OR LINUX_VERSION_ID VERSION_EQUAL 15.3) SET(CPACK_RPM_PACKAGE_REQUIRES "libboost_python-py3-1_66_0, libpython3_6m1_0") - SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng16-16, libglut3, libgtk-3-0, libvorbis0, libopenal0, libSDL-1_2-0, libglvnd, expat, libboost_log1_66_0, libboost_system1_66_0, libboost_filesystem1_66_0, libboost_thread1_66_0, libboost_regex1_66_0, libboost_chrono1_66_0, libboost_atomic1_66_0") + SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng16-16, libglut3, libgtk-3-0, libvorbis0, libopenal0, libSDL-1_2-0, libglvnd, expat, libboost_log1_66_0, libboost_system1_66_0, libboost_filesystem1_66_0, libboost_thread1_66_0, libboost_regex1_66_0, libboost_chrono1_66_0, libboost_atomic1_66_0, libboost_program_options1_66_0") ELSEIF (LINUX_VERSION_ID VERSION_EQUAL 15.4) IF (Boost_DERIVED_VERSION STREQUAL "") SET(BOOST_VER "1.75.0") @@ -1428,7 +1428,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) SET(BOOST_VER "${Boost_DERIVED_VERSION}") ENDIF (Boost_DERIVED_VERSION STREQUAL "") SET(CPACK_RPM_PACKAGE_REQUIRES "libboost_python-py3-${BOOST_VER}, libpython3_10-1_0") - SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng16-16, libglut3, libgtk-3-0, libvorbis0, libopenal0, libSDL-1_2-0, libglvnd, expat, libboost_log${BOOST_VER}, libboost_system${BOOST_VER}, libboost_filesystem${BOOST_VER}, libboost_thread${BOOST_VER}, libboost_regex${BOOST_VER}, libboost_chrono${BOOST_VER}, libboost_atomic${BOOST_VER}, libboost_json${BOOST_VER}") + SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng16-16, libglut3, libgtk-3-0, libvorbis0, libopenal0, libSDL-1_2-0, libglvnd, expat, libboost_log${BOOST_VER}, libboost_system${BOOST_VER}, libboost_filesystem${BOOST_VER}, libboost_thread${BOOST_VER}, libboost_regex${BOOST_VER}, libboost_chrono${BOOST_VER}, libboost_atomic${BOOST_VER}, libboost_json${BOOST_VER}, libboost_program_options${BOOST_VER}") ELSE (LINUX_VERSION_ID VERSION_EQUAL 15.2 OR LINUX_VERSION_ID VERSION_EQUAL 15.3) MESSAGE (SEND_WARNING "!! Unsupported version of openSUSE") SET(CPACK_RPM_PACKAGE_REQUIRES "") @@ -1443,30 +1443,30 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux) ELSE (LINUX_VERSION_ID VERSION_GREATER_EQUAL 34) SET(CPACK_RPM_PACKAGE_REQUIRES "python37, boost-python3") ENDIF (LINUX_VERSION_ID VERSION_GREATER_EQUAL 34) - SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng, freeglut, gtk3, libvorbis, openal-soft, SDL, libglvnd, expat, boost-log, boost-system, boost-filesystem, boost-thread, boost-regex, boost-chrono, boost-atomic") + SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng, freeglut, gtk3, libvorbis, openal-soft, SDL, libglvnd, expat, boost-log, boost-system, boost-filesystem, boost-thread, boost-regex, boost-chrono, boost-atomic, boost-program-options") ELSEIF (LINUX_ID STREQUAL centos AND LINUX_VERSION_ID STREQUAL "8") SET(CPACK_RPM_PACKAGE_REQUIRES "boost-python3") - SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng, freeglut, gtk3, libvorbis, openal-soft, SDL, libglvnd, expat, boost-log, boost-system, boost-filesystem, boost-thread, boost-regex, boost-chrono, boost-atomic") + SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng, freeglut, gtk3, libvorbis, openal-soft, SDL, libglvnd, expat, boost-log, boost-system, boost-filesystem, boost-thread, boost-regex, boost-chrono, boost-atomic, boost-program-options") ELSEIF (LINUX_ID STREQUAL rhel OR LINUX_ID STREQUAL redhat) SET(CPACK_RPM_PACKAGE_REQUIRES "boost-python3") - SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng, freeglut, gtk3, libvorbis, openal-soft, SDL, libglvnd, expat, boost-log, boost-system, boost-filesystem, boost-thread, boost-regex, boost-chrono, boost-atomic") + SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng, freeglut, gtk3, libvorbis, openal-soft, SDL, libglvnd, expat, boost-log, boost-system, boost-filesystem, boost-thread, boost-regex, boost-chrono, boost-atomic, boost-program-options") ELSEIF (LINUX_ID STREQUAL rocky) IF (LINUX_VERSION_ID VERSION_GREATER_EQUAL 8.0 AND LINUX_VERSION_ID VERSION_LESS_EQUAL 9.1) SET(CPACK_RPM_PACKAGE_REQUIRES "python39, boost-python3") - SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng, freeglut, gtk3, libvorbis, openal-soft, SDL, libglvnd, expat, boost-log, boost-system, boost-filesystem, boost-thread, boost-regex, boost-chrono, boost-atomic") + SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg-turbo, libpng, freeglut, gtk3, libvorbis, openal-soft, SDL, libglvnd, expat, boost-log, boost-system, boost-filesystem, boost-thread, boost-regex, boost-chrono, boost-atomic, boost-program-options") ELSE () - MESSAGE(SEND_WARNING "!! This version of Rocky Linux is not currently supported.") + MESSAGE(WARNING "!! This version of Rocky Linux is not currently supported.") SET(CPACK_RPM_PACKAGE_REQUIRES "") ENDIF () ELSE (LINUX_ID STREQUAL opensuse-leap) - MESSAGE(SEND_WARNING "!! Unrecognized RPM-based Linux distribution. RPM Dependencies may be wrong for this platform.") + MESSAGE(WARNING "!! Unrecognized RPM-based Linux distribution. RPM Dependencies may be wrong for this platform.") SET(CPACK_RPM_PACKAGE_REQUIRES "python3") SET(CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}, libjpeg, libpng, freeglut, gtk3, libvorbis, openal, SDL_mixer") ENDIF (LINUX_ID STREQUAL opensuse-leap) SET(CPACK_GENERATOR "RPM") ENDIF (VS_CAN_BUILD_RPM) ELSE () - MESSAGE("-- Configuring Packaging for Unknown Platforms - \"${CMAKE_SYSTEM_NAME}\"") + MESSAGE(STATUS "Configuring Packaging for Unknown Platforms - \"${CMAKE_SYSTEM_NAME}\"") # Unknown Platform --> Just do the various compressed tarballs SET(CPACK_GENERATOR "TBZ2" "TGZ" "TXZ") ENDIF (WIN32 AND NOT UNIX) diff --git a/engine/objconv/CMakeLists.txt b/engine/objconv/CMakeLists.txt index 1f6228a6a2..7a2553823c 100644 --- a/engine/objconv/CMakeLists.txt +++ b/engine/objconv/CMakeLists.txt @@ -1,7 +1,7 @@ ## # CMakeLists.txt # -# Copyright (C) 2001-2023 Daniel Horn, pyramid3d, Stephen G. Tuggy, +# Copyright (C) 2001-2025 Daniel Horn, pyramid3d, Stephen G. Tuggy, # Benjamen R. Meyer, and other Vega Strike contributors # # https://github.com/vegastrike/Vega-Strike-Engine-Source @@ -64,16 +64,16 @@ IF (EXPAT_FOUND) SET(MSH_INCLUDES ${MSH_INCLUDES} ${EXPAT_INCLUDE_DIRS}) SET(MSH_LIBS ${MSH_LIBS} ${EXPAT_LIBRARIES}) ELSE (EXPAT_FOUND) - MESSAGE("!! We can't find expat for XML crap") + MESSAGE(WARNING "We can't find expat for XML crap") ENDIF (EXPAT_FOUND) #ogre already looked for by parent IF (OGRE_FOUND) SET(MSH_INCLUDES ${MSH_INCLUDES} ${OGRE_INCLUDE_DIRS}) SET(MSH_LIBS ${MSH_LIBS} ${OGRE_LIBRARIES}) - MESSAGE("++ Compiling vega-meshtool with OgreMesh support") + MESSAGE(STATUS "Compiling vega-meshtool with OgreMesh support") ELSE (OGRE_FOUND) - MESSAGE("-- Compiling vega-meshtool without OgreMesh support: Ogre not found") + MESSAGE(STATUS "Compiling vega-meshtool without OgreMesh support: Ogre not found") ENDIF (OGRE_FOUND) SET(MESHER_SOURCES diff --git a/engine/objconv/mesher/CMakeLists.txt b/engine/objconv/mesher/CMakeLists.txt index cad1a3579c..34c1490005 100644 --- a/engine/objconv/mesher/CMakeLists.txt +++ b/engine/objconv/mesher/CMakeLists.txt @@ -60,7 +60,7 @@ IF (EXPAT_FOUND) # OGRE already looked for by parent # USE_SYSTEM_BOOST already set by main script - MESSAGE("-- ${OGRE_FOUND} ${USE_SYSTEM_BOOST}") + MESSAGE(STATUS "${OGRE_FOUND} ${USE_SYSTEM_BOOST}") IF (OGRE_FOUND AND NOT USE_SYSTEM_BOOST) # Ogre usage in mesher requires boost::system ADD_DEPENDENCIES(mesher boost_system) @@ -70,5 +70,5 @@ IF (EXPAT_FOUND) TARGET_LINK_LIBRARIES(mesher ${MESHER_LIBRARIES} ${EXPAT_LIBRARIES} ${OGRE_LIBRARIES}) SET_TARGET_PROPERTIES(mesher PROPERTIES LINK_FLAGS "-L/usr/lib") ELSE (EXPAT_FOUND) - MESSAGE("!! Not going to be able to compile mesher, no expat found") + MESSAGE(WARNING "Not going to be able to compile mesher, no expat found") ENDIF(EXPAT_FOUND) diff --git a/engine/setup/src/c/setup.cpp b/engine/setup/src/c/setup.cpp index b4839a71bb..a4eaf225ea 100644 --- a/engine/setup/src/c/setup.cpp +++ b/engine/setup/src/c/setup.cpp @@ -1,4 +1,6 @@ /* + * setup.cpp + * * Copyright (C) 2001-2025 Daniel Horn, David Ranger, pyramid3d, * Stephen G. Tuggy, and other Vega Strike contributors. * @@ -36,6 +38,9 @@ #endif #include #include +#include +#include + using std::string; using std::vector; char origpath[65536]; @@ -114,16 +119,42 @@ int main(int argc, char *argv[]) { changeToProgramDirectory(argv[0]); { + boost::program_options::options_description setup_options("Vega Strike setup utility"); + setup_options.add_options() + ("target,D", boost::program_options::value(), "Specify data directory, full path expected") + ("help,h", "Show this help and exit") + ("version,v", "Show version and exit") + ; + vector data_paths; - if (argc > 1) { - if (strcmp(argv[1], "--target") == 0 && argc > 2) { - data_paths.push_back(argv[2]); - fprintf(stdout, "Set data directory to %s\n", argv[2]); + try { + auto style = static_cast(boost::program_options::command_line_style::unix_style + | boost::program_options::command_line_style::case_insensitive); + boost::program_options::variables_map vm; + boost::program_options::store(boost::program_options::command_line_parser(argc, argv).options(setup_options).style(style).run(), vm); + boost::program_options::notify(vm); + + if (vm.count("help")) { + std::cout << setup_options << std::endl; + return EXIT_SUCCESS; + } + + if (vm.count("version")) { + std::cout << (boost::format("VegaSettings - Version %1%") % VEGASTRIKE_VERSION_STR).str() << std::endl; + return EXIT_SUCCESS; + } + + if (vm.count("target")) { + data_paths.push_back(vm["target"].as()); + std::cout << "Set data directory to " << vm["target"].as() << std::endl; } else { - fprintf(stderr, "Usage: vegasettings [--target DATADIR]\n"); - return 1; + std::cerr << setup_options << std::endl; + return EXIT_FAILURE; } + } catch (const boost::program_options::error& e) { + std::cerr << setup_options << std::endl; + return EXIT_FAILURE; } #ifdef DATA_DIR @@ -222,4 +253,3 @@ int main(int argc, char *argv[]) { Start(&argc, &argv); return 0; } - diff --git a/engine/src/main.cpp b/engine/src/main.cpp index 73528a6f30..cb13cef6af 100644 --- a/engine/src/main.cpp +++ b/engine/src/main.cpp @@ -26,6 +26,7 @@ #define PY_SSIZE_T_CLEAN #include #include +#include #include "audio/test.h" #if defined (HAVE_SDL) #include @@ -716,162 +717,163 @@ void bootstrap_main_loop() { ///Draw Texture } -// SGT 2020-07-16 This gets called from main() before initLogging, -// so it gets a pass on not using the Boost logging stuff -const char helpmessage[] = - "Command line options for vegastrike\n" - "\n" - " -D -d \t Specify data directory\n" - " -N -n \t Number of players\n" - " -M -m \t Specify a mod to play\n" - " -P -p \t Specify player location\n" - " -J -j \t Start in a specific system\n" - " -A -a \t Normal resolution (800x600)\n" - " -H -h \t High resolution (1024x768)\n" - " -V -v \t Super high resolution (1280x1024)\n" - " --net \t Networking Enabled (Experimental)\n" - " --debug[=#] \t Enable debugging output, 1 major warnings, 2 medium, 3 developer notes\n" - " --test-audio \t Run audio tests\n" - " --version \t Print the version and exit\n" - "\n"; const char versionmessage[] = // (BenjamenMeyer) this will be `major.minor.patch+githash` once all is said and done "Vega Strike Engine Version " VEGASTRIKE_VERSION_STR "\n" "\n"; std::pair ParseCommandLine(int argc, char **lpCmdLine) { - // TODO: replace with boot::program_options - std::string st; std::string retstr; std::string mission_name; - std::string datatmp; g_game.vsdebug = '0'; - QVector PlayerLocation; - for (int i = 1; i < argc; i++) { - if (lpCmdLine[i][0] == '-') { - std::cerr << "ARG #" << i << " = " << lpCmdLine[i] << std::endl; - std::string input(lpCmdLine[i]); + + boost::program_options::options_description vs_switches("Command line options for vegastrike; short options are case insensitive"); + vs_switches.add_options() + ("target,D", boost::program_options::value(), "Specify data directory, full path expected") + ("num-players,n", boost::program_options::value(), "Number of players") + ("mod,m", boost::program_options::value(), "Specify a mod to play") + ("start-in-system,j", boost::program_options::value(), "Start in a specific system") + ("location,l", boost::program_options::value(), "Specify player location") + ("h", "Medium-low resolution (1024x768)") + ("v", "Medium resolution (1280x1024)") + ("help,h", "Show this help") + ("version", "Print the version and exit") + ("debug", boost::program_options::value()->default_value('0'), "Enable debugging output, 1 major warnings, 2 medium, 3 developer notes") + ("benchmark", boost::program_options::value(), "Benchmark") + ("test-audio", "Run audio tests") // is handled in readCommandLineOptions, here is serves only for help message + ("r", "No-op") + ("f", "No-op") + ("p", "No-op") + ("g", "No-op") + ("u", "No-op") + ; + + boost::program_options::options_description vs_modules; + vs_modules.add_options() + ("mission_name", boost::program_options::value(), "Mission name") + ; + + boost::program_options::options_description vs_options; + vs_options.add(vs_switches).add(vs_modules); + + boost::program_options::positional_options_description vs_positionals; + vs_positionals.add("mission_name", 1); + + auto style = static_cast(boost::program_options::command_line_style::unix_style + | boost::program_options::command_line_style::case_insensitive); + boost::program_options::variables_map cmd_args; + try { + boost::program_options::store( + boost::program_options::command_line_parser(argc, lpCmdLine).options(vs_options).positional(vs_positionals).style(style).run(), + cmd_args + ); + boost::program_options::notify(cmd_args); + } catch (const boost::program_options::error& e) { + VS_LOG(fatal, (boost::format("Failed to parse arguments: %1%") % e.what())); + VS_LOG_FLUSH_EXIT(fatal, (boost::format("%1%") % vs_switches), EXIT_FAILURE); + } + + if (cmd_args.count("help")) { + std::cout << vs_switches << std::endl; + exit(0); + } + + if (cmd_args.count("version")) { + std::cout << versionmessage << std::endl; + exit(0); + } + + if (cmd_args.count("target")) { + std::string datatmp; + datatmp = cmd_args["target"].as(); + if (datatmp.empty()) { + VS_LOG_FLUSH_EXIT(fatal, "Target-data-directory option requires an argument", EXIT_FAILURE); + } else if (VSFileSystem::DirectoryExists(datatmp)) { + VSFileSystem::datadir = datatmp; + VS_LOG(important_info, (boost::format("Using target data directory specified on command line: '%1%'") % datatmp)); + } else { + VS_LOG_FLUSH_EXIT(fatal, (boost::format("Specified target data directory '%1%' not found... exiting") % datatmp), EXIT_FAILURE); + } + } + + if (cmd_args.count("num-players")) { + int num_players = cmd_args["num-players"].as(); + if (num_players > 1 && num_players <= 9) { + CONFIGFILE = new char[42]; + snprintf(CONFIGFILE, 42, "vegastrike.config.%dplayer", num_players); + } else if (num_players != 1) { + VS_LOG(warning, "Specified number of players out of range (1-9)"); + } + } + + if (cmd_args.count("mod")) { + retstr = cmd_args["mod"].as(); + } + + if (cmd_args.count("start-in-system")) { + std::string st; + st = cmd_args["start-in-system"].as(); + SetPlayerSystem(st, true); + } + + if (cmd_args.count("location")) { + QVector PlayerLocation; + try { + std::string input = cmd_args["location"].as(); std::istringstream iStringStream(input); - switch (lpCmdLine[i][1]) { - case 'd': - case 'D': - //Specifying data directory - if (lpCmdLine[i][2] == 0) { - std::cout << "Option -D requires an argument" << std::endl; - exit(1); - } - datatmp = &lpCmdLine[i][2]; - if (VSFileSystem::DirectoryExists(datatmp)) { - VSFileSystem::datadir = datatmp; - } else { - std::cout << "Specified data directory not found... exiting" << std::endl; - exit(1); - } - std::cout << "Using data dir specified on command line : " << datatmp << std::endl; - break; - case 'r': - case 'R': - break; - case 'N': - case 'n': - if (!(lpCmdLine[i][2] == '1' && lpCmdLine[i][3] == '\0')) { - CONFIGFILE = new char[40 + strlen(lpCmdLine[i]) + 1]; - sprintf(CONFIGFILE, "vegastrike.config.%splayer", lpCmdLine[i] + 2); - } - break; - case 'M': - case 'm': - retstr = string(lpCmdLine[i] + 2); - break; - case 'f': - case 'F': - break; - case 'U': - case 'u': - break; - case 'P': - case 'p': - break; - case 'L': - case 'l': - try { - iStringStream.ignore(2); - iStringStream >> PlayerLocation.i; - iStringStream.ignore(1, ','); - iStringStream >> PlayerLocation.j; - iStringStream.ignore(1, ','); - iStringStream >> PlayerLocation.k; - } catch (std::ios_base::failure &inputFailure) { - std::cout << "Error reading coordinates for player location: " << inputFailure.what() - << std::endl; - exit(1); - } - SetPlayerLoc(PlayerLocation, true); - break; - case 'J': - case 'j': //low rez - st = string((lpCmdLine[i]) + 2); - SetPlayerSystem(st, true); - break; - case 'A': //average rez - case 'a': - g_game.y_resolution = 600; - g_game.x_resolution = 800; - break; - case 'H': - case 'h': //high rez - g_game.y_resolution = 768; - g_game.x_resolution = 1024; - break; - case 'V': - case 'v': - g_game.y_resolution = 1024; - g_game.x_resolution = 1280; - break; - case 'G': - case 'g': - break; - case '-': - //long options - if (strcmp(lpCmdLine[i], "--benchmark") == 0) { - try { - iStringStream.ignore(1); - iStringStream >> benchmark; - } catch (std::ios_base::failure &inputFailure) { - std::cout << "Error parsing benchmark value: " << inputFailure.what() << std::endl; - exit(1); - } - i++; - } else if (strcmp(lpCmdLine[i], "--net") == 0) { - //don't ignore the network section of the config file - ignore_network = false; - } else if (strcmp(lpCmdLine[i], "--help") == 0) { - std::cout << helpmessage; - exit(0); - } else if (strcmp(lpCmdLine[i], "--version") == 0) { - std::cout << versionmessage; - exit(0); - } else if (strncmp(lpCmdLine[i], "--debug", 7) == 0) { - if (lpCmdLine[i][7] == 0) { - g_game.vsdebug = 1; - } else if (lpCmdLine[i][8] == 0) { - std::cout << helpmessage; - exit(0); - } - g_game.vsdebug = lpCmdLine[i][8] - '0'; - ++i; - } - break; - } + iStringStream.ignore(2); + iStringStream >> PlayerLocation.i; + iStringStream.ignore(1, ','); + iStringStream >> PlayerLocation.j; + iStringStream.ignore(1, ','); + iStringStream >> PlayerLocation.k; + } catch (std::ios_base::failure &inputFailure) { + std::cout << "Error reading coordinates for player location: " << inputFailure.what() + << std::endl; + exit(EXIT_FAILURE); + } + SetPlayerLoc(PlayerLocation, true); + } + + if (cmd_args.count("debug")) { + char vs_debug_level_temp = cmd_args["debug"].as(); + if (vs_debug_level_temp >= '0' && vs_debug_level_temp <= '3') { + g_game.vsdebug = vs_debug_level_temp - '0'; } else { - //no "-" before it - it's the mission name - mission_name = std::string(lpCmdLine[i]); + VS_LOG_FLUSH_EXIT(fatal, "Invalid debug level specified", EXIT_FAILURE); } } + + if (cmd_args.count("net")) { + //don't ignore the network section of the config file + ignore_network = false; + } + + if (cmd_args.count("benchmark")) { + benchmark = cmd_args["benchmark"].as(); + } + + if (cmd_args.count("test-audio")) { + // This is handled separately, since we have to undefine main first + // return Audio::Test::main(argc, argv); + } + + if (cmd_args.count("h")) { + g_game.x_resolution = 1024; + g_game.y_resolution = 768; + } + if (cmd_args.count("v")) { + g_game.x_resolution = 1280; + g_game.y_resolution = 1024; + } + + if (cmd_args.count("mission_name")) { + mission_name = cmd_args["mission_name"].as(); + } + if (false == legacy_data_dir_mode) { if (true == VSFileSystem::datadir.empty()) { - std::cout << "Data directory not specified." << std::endl; - exit(1); + VS_LOG_FLUSH_EXIT(fatal, "Data directory not specified.", EXIT_FAILURE); } }