From 553311881f281a69e0b521df13fd540302a764f0 Mon Sep 17 00:00:00 2001 From: Krispy Date: Sat, 14 Dec 2024 13:39:03 -0500 Subject: [PATCH] Minor house keeping --- .gitignore | 4 +- neo/cmake-linux-debug.sh | 25 ------------ neo/cmake-linux-release.sh | 25 ------------ neo/cmake-linux-retail.sh | 25 ------------ neo/cmake-vs2022.bat | 43 --------------------- neo/cmake-win-ninja-debug-x64.bat | 32 --------------- neo/cmake-win-ninja-debug-x86.bat | 32 --------------- neo/cmake-win-ninja-release-x64.bat | 33 ---------------- neo/cmake-win-ninja-release-x86.bat | 32 --------------- neo/cmake_linux.sh | 60 +++++++++++++++++++++++++++++ neo/cmake_msvc2019.cmd | 7 ++++ neo/cmake_msvc2022.cmd | 7 ++++ neo/renderer/tr_font.cpp | 4 +- vcpkg | 2 +- 14 files changed, 80 insertions(+), 251 deletions(-) delete mode 100644 neo/cmake-linux-debug.sh delete mode 100644 neo/cmake-linux-release.sh delete mode 100644 neo/cmake-linux-retail.sh delete mode 100644 neo/cmake-vs2022.bat delete mode 100644 neo/cmake-win-ninja-debug-x64.bat delete mode 100644 neo/cmake-win-ninja-debug-x86.bat delete mode 100644 neo/cmake-win-ninja-release-x64.bat delete mode 100644 neo/cmake-win-ninja-release-x86.bat create mode 100644 neo/cmake_linux.sh create mode 100644 neo/cmake_msvc2019.cmd create mode 100644 neo/cmake_msvc2022.cmd diff --git a/.gitignore b/.gitignore index 89930a0c7..e094beb87 100644 --- a/.gitignore +++ b/.gitignore @@ -1051,8 +1051,8 @@ neo/libs/MayaSDKDevKit/* docs/html/* # Doom 3: Build directory & log directory -buildlog/ -build*/ +build/ +output/*/* # Doom 3: Ignore PK4 & Keys config.spec diff --git a/neo/cmake-linux-debug.sh b/neo/cmake-linux-debug.sh deleted file mode 100644 index db248e001..000000000 --- a/neo/cmake-linux-debug.sh +++ /dev/null @@ -1,25 +0,0 @@ -clear -echo -------------------------------------------------------------------------------- -COLUMNS=$(tput cols) -title="DOOM 3 MODDING KIT" -printf "%*s\n" $(((${#title}+$COLUMNS)/2)) "$title" -COLUMNS=$(tput cols) -title="UNIX MakeFile GENERATION FOR x86 - x64" -printf "%*s\n" $(((${#title}+$COLUMNS)/2)) "$title" -COLUMNS=$(tput cols) -title="DEBUG BUILD" -printf "%*s\n" $(((${#title}+$COLUMNS)/2)) "$title" -echo -------------------------------------------------------------------------------- -cd .. -rm -rf buildDb > /dev/null 2>&1 -mkdir buildDb > /dev/null 2>&1 -cd buildDb -echo Generating files -cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../neo > log.txt ||( -echo ERROR Generating files -cd .. -rmdir /Q /S buildDb -#read -rsp $'Press any key to continue...\n' -n1 key -) -#read -rsp $'Press any key to continue...\n' -n1 key -echo Files generated Successfully diff --git a/neo/cmake-linux-release.sh b/neo/cmake-linux-release.sh deleted file mode 100644 index 0e3be4611..000000000 --- a/neo/cmake-linux-release.sh +++ /dev/null @@ -1,25 +0,0 @@ -clear -echo -------------------------------------------------------------------------------- -COLUMNS=$(tput cols) -title="DOOM 3 MODDING KIT" -printf "%*s\n" $(((${#title}+$COLUMNS)/2)) "$title" -COLUMNS=$(tput cols) -title="UNIX MakeFile GENERATION FOR x86 - x64" -printf "%*s\n" $(((${#title}+$COLUMNS)/2)) "$title" -COLUMNS=$(tput cols) -title="RELEASE BUILD" -printf "%*s\n" $(((${#title}+$COLUMNS)/2)) "$title" -echo -------------------------------------------------------------------------------- -cd .. -rm -rf build > /dev/null 2>&1 -mkdir build > /dev/null 2>&1 -cd build -echo Generating files -cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DONATIVE=ON ../neo > log.txt ||( -echo ERROR Generating files -cd .. -rmdir /Q /S build -#read -rsp $'Press any key to continue...\n' -n1 key -) -#read -rsp $'Press any key to continue...\n' -n1 key -echo Files generated Successfully diff --git a/neo/cmake-linux-retail.sh b/neo/cmake-linux-retail.sh deleted file mode 100644 index 90f2ba83a..000000000 --- a/neo/cmake-linux-retail.sh +++ /dev/null @@ -1,25 +0,0 @@ -clear -echo -------------------------------------------------------------------------------- -COLUMNS=$(tput cols) -title="DOOM 3 MODDING KIT" -printf "%*s\n" $(((${#title}+$COLUMNS)/2)) "$title" -COLUMNS=$(tput cols) -title="UNIX MakeFile GENERATION FOR x86 - x64" -printf "%*s\n" $(((${#title}+$COLUMNS)/2)) "$title" -COLUMNS=$(tput cols) -title="RETAIL BUILD" -printf "%*s\n" $(((${#title}+$COLUMNS)/2)) "$title" -echo -------------------------------------------------------------------------------- -cd .. -rm -rf build > /dev/null 2>&1 -mkdir build > /dev/null 2>&1 -cd build -echo Generating files -cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Retail ../neo > log.txt ||( -echo ERROR Generating files -cd .. -rmdir /Q /S build -#read -rsp $'Press any key to continue...\n' -n1 key -) -#read -rsp $'Press any key to continue...\n' -n1 key -echo Files generated Successfully diff --git a/neo/cmake-vs2022.bat b/neo/cmake-vs2022.bat deleted file mode 100644 index d72a0a489..000000000 --- a/neo/cmake-vs2022.bat +++ /dev/null @@ -1,43 +0,0 @@ -@ECHO OFF -@ECHO -------------------------------------------------------------------------------- -@ECHO DOOM 3 MODDING KIT -@ECHO VS 2022 PROJECT GENERATION FOR x86 - x64 -@ECHO -------------------------------------------------------------------------------- -pause -cd .. -mkdir buildlog > NUL 2>&1 -cd buildlog -mkdir x64 > NUL 2>&1 -cd.. -del /s /q buildx64 > NUL 2>&1 -mkdir buildx64 > NUL 2>&1 -cd buildx64 -@ECHO Generating x64 files -cmake -G "Visual Studio 17" -A "x64" ../neo > ../buildlog/x64/log.txt -if ERRORLEVEL == 1 goto ERRORX64 -:x86 -cd .. -mkdir buildlog > NUL 2>&1 -cd buildlog -mkdir x86 > NUL 2>&1 -cd .. -del /s /q buildx86 > NUL 2>&1 -mkdir buildx86 > NUL 2>&1 -cd buildx86 -@ECHO Generating x86 files -cmake -G "Visual Studio 17" -A "Win32" ../neo > ../buildlog/x86/log.txt -if ERRORLEVEL == 1 goto ERRORX86 -pause -exit - -:ERRORX64 -@ECHO ERROR Generating x64 files -cd .. -rmdir /Q /S buildx64 -goto x86 -:ERRORX86 -@ECHO ERROR Generating x86 files -cd .. -rmdir /Q /S buildx86 -pause -exit \ No newline at end of file diff --git a/neo/cmake-win-ninja-debug-x64.bat b/neo/cmake-win-ninja-debug-x64.bat deleted file mode 100644 index b91d7f74f..000000000 --- a/neo/cmake-win-ninja-debug-x64.bat +++ /dev/null @@ -1,32 +0,0 @@ -@call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" -@cls - -@ECHO OFF -@ECHO -------------------------------------------------------------------------------- -@ECHO DOOM 3 MODDING KIT -@ECHO NINJA PROJECT GENERATION FOR x64 -@ECHO [DEBUG] -@ECHO -------------------------------------------------------------------------------- -pause -cd .. -mkdir buildlog > NUL 2>&1 -cd buildlog -mkdir x64_ninja > NUL 2>&1 -cd .. -del /s /q buildx64_ninja > NUL 2>&1 -mkdir buildx64_ninja > NUL 2>&1 -cd buildx64_ninja -@ECHO Generating x64 files -cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ../neo > ../buildlog/x64_ninja/log.txt -@ECHO Compiling project -ninja > ../buildlog/x64_ninja/build.txt -if ERRORLEVEL == 1 goto ERROR -pause -exit - -:ERROR -@ECHO ERROR Generating x64 files -cd .. -rmdir /Q /S buildx64_ninja -pause -exit \ No newline at end of file diff --git a/neo/cmake-win-ninja-debug-x86.bat b/neo/cmake-win-ninja-debug-x86.bat deleted file mode 100644 index a53c92bb7..000000000 --- a/neo/cmake-win-ninja-debug-x86.bat +++ /dev/null @@ -1,32 +0,0 @@ -@call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat" -@cls - -@ECHO OFF -@ECHO -------------------------------------------------------------------------------- -@ECHO DOOM 3 MODDING KIT -@ECHO NINJA PROJECT GENERATION FOR x86 -@ECHO [DEBUG] -@ECHO -------------------------------------------------------------------------------- -pause -cd .. -mkdir buildlog > NUL 2>&1 -cd buildlog -mkdir x86_ninja > NUL 2>&1 -cd .. -del /s /q buildx86_ninja > NUL 2>&1 -mkdir buildx86_ninja > NUL 2>&1 -cd buildx86_ninja -@ECHO Generating x86 files -cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ../neo > ../buildlog/x86_ninja/log.txt -@ECHO Compiling project -ninja > ../buildlog/x86_ninja/build.txt -if ERRORLEVEL == 1 goto ERROR -pause -exit - -:ERROR -@ECHO ERROR Generating x86 files -cd .. -rmdir /Q /S buildx86_ninja -pause -exit \ No newline at end of file diff --git a/neo/cmake-win-ninja-release-x64.bat b/neo/cmake-win-ninja-release-x64.bat deleted file mode 100644 index 16e03df4a..000000000 --- a/neo/cmake-win-ninja-release-x64.bat +++ /dev/null @@ -1,33 +0,0 @@ -@call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" -@cls - -@ECHO OFF -@ECHO -------------------------------------------------------------------------------- -@ECHO DOOM 3 MODDING KIT -@ECHO NINJA PROJECT GENERATION FOR x64 -@ECHO [RELEASE] -@ECHO -------------------------------------------------------------------------------- -pause - -cd .. -mkdir buildlog > NUL 2>&1 -cd buildlog -mkdir x64_ninja > NUL 2>&1 -cd .. -del /s /q buildx64_ninja > NUL 2>&1 -mkdir buildx64_ninja > NUL 2>&1 -cd buildx64_ninja -@ECHO Generating x64 files -cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ../neo > ../buildlog/x64_ninja/log.txt -@ECHO Compiling project -ninja > ../buildlog/x64_ninja/build.txt -if ERRORLEVEL == 1 goto ERROR -pause -exit - -:ERROR -@ECHO ERROR Generating x64 files -cd .. -rmdir /Q /S buildx64_ninja -pause -exit \ No newline at end of file diff --git a/neo/cmake-win-ninja-release-x86.bat b/neo/cmake-win-ninja-release-x86.bat deleted file mode 100644 index be65ed46b..000000000 --- a/neo/cmake-win-ninja-release-x86.bat +++ /dev/null @@ -1,32 +0,0 @@ -@call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat" -@cls - -@ECHO OFF -@ECHO -------------------------------------------------------------------------------- -@ECHO DOOM 3 MODDING KIT -@ECHO NINJA PROJECT GENERATION FOR x86 -@ECHO [RELEASE] -@ECHO -------------------------------------------------------------------------------- -pause -cd .. -mkdir buildlog > NUL 2>&1 -cd buildlog -mkdir x86_ninja > NUL 2>&1 -cd .. -del /s /q buildx86_ninja > NUL 2>&1 -mkdir buildx86_ninja > NUL 2>&1 -cd buildx86_ninja -@ECHO Generating x86 files -cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ../neo > ../buildlog/x86_ninja/log.txt -@ECHO Compiling project -ninja > ../x86_ninja/x64_ninja/build.txt -if ERRORLEVEL == 1 goto ERROR -pause -exit - -:ERROR -@ECHO ERROR Generating x86 files -cd .. -rmdir /Q /S buildx86_ninja -pause -exit \ No newline at end of file diff --git a/neo/cmake_linux.sh b/neo/cmake_linux.sh new file mode 100644 index 000000000..6b06f9434 --- /dev/null +++ b/neo/cmake_linux.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +BUILD_DIR=build/gcc/debug +DIRECTORY="gcc" +BUILDTYPE="debug" +CMAKE_BUILD_TYPE="Debug" +CMAKE_GENERATOR="Sublime Text 2 - Unix Makefiles" + +if [ "$#" -ne "2" ]; then + echo "Usage cmake_linux.sh " + exit 1 +fi + +if [ "$#" -ge "1" ]; then + + if [ "$1" = "gcc" ]; then + export CXX="g++" + export CC="gcc" + DIRECTORY="gcc" + fi + + if [ "$1" = "clang" ]; then + export CXX="clang++" + export CC="clang" + DIRECTORY="clang" + CMAKE_CXX_FLAGS="-stdlib=libstdc++" + fi + + if [ "$1" = "clang-libc++" ]; then + export CXX="clang++" + export CC="clang" + DIRECTORY="clang-libc++" + CMAKE_CXX_FLAGS="-stdlib=libc++" + fi +fi + +if [ "$#" -ge "2" ]; then + + if [ "$2" = "debug" ]; then + BUILDTYPE="debug" + CMAKE_BUILD_TYPE="Debug" + fi + + if [ "$2" = "release" ]; then + BUILDTYPE="release" + CMAKE_BUILD_TYPE="Release" + fi + + if [ "$2" = "reldeb" ]; then + BUILDTYPE="relwithdebinfo" + CMAKE_BUILD_TYPE="relwithdebinfo" + fi +fi + +BUILDDIR=build/$DIRECTORY/$BUILDTYPE + +mkdir -p $BUILDDIR +cd $BUILDDIR + +cmake -G"$CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" ../../.. \ No newline at end of file diff --git a/neo/cmake_msvc2019.cmd b/neo/cmake_msvc2019.cmd new file mode 100644 index 000000000..46a399909 --- /dev/null +++ b/neo/cmake_msvc2019.cmd @@ -0,0 +1,7 @@ +@echo off +cls +mkdir build\msvc2019-x86 +pushd build\msvc2019-x86 +cmake -G "Visual Studio 16" %* ../.. +popd +@pause \ No newline at end of file diff --git a/neo/cmake_msvc2022.cmd b/neo/cmake_msvc2022.cmd new file mode 100644 index 000000000..ac8c4733e --- /dev/null +++ b/neo/cmake_msvc2022.cmd @@ -0,0 +1,7 @@ +@echo off +cls +mkdir build\msvc2022-x86 +pushd build\msvc2022-x86 +cmake -G "Visual Studio 17" %* ../.. +popd +@pause \ No newline at end of file diff --git a/neo/renderer/tr_font.cpp b/neo/renderer/tr_font.cpp index 3b1d80515..65a58bcd2 100644 --- a/neo/renderer/tr_font.cpp +++ b/neo/renderer/tr_font.cpp @@ -365,10 +365,12 @@ bool idRenderSystemLocal::RegisterFont( const char *fontName, fontInfoEx_t &font glyphInfo_t *glyph; const idMaterial *h; float max; -#endif // ID_BUILD_FREETYPE void *faceData; ID_TIME_T ftime; int i, len, fontCount; +#else + int fontCount; +#endif // ID_BUILD_FREETYPE idStr name; float dpi = 72; int pointSize = 12; diff --git a/vcpkg b/vcpkg index 49ac2134b..b545373a9 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 49ac2134b31b95b0ddf29d56873dcd24392691df +Subproject commit b545373a9a536dc559dac8583467a21497a0e897