mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Merge remote-tracking branch 'SRSaunders/basepath-sdl-fixes'
This commit is contained in:
commit
7a4c56e105
18 changed files with 185 additions and 102 deletions
3
.gitattributes
vendored
3
.gitattributes
vendored
|
@ -5,3 +5,6 @@
|
|||
|
||||
# Don't count 3rd-party libraries
|
||||
neo/libs/* linguist-vendored
|
||||
|
||||
# Make sure script files always have CRLF line endings for save file checksum portability
|
||||
*.script text eol=crlf
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
build*
|
||||
eclipse*
|
||||
xcode*
|
||||
neo/ipch
|
||||
*~
|
||||
*.gch
|
||||
|
@ -7,6 +8,7 @@ neo/ipch
|
|||
*.exe
|
||||
*.7z
|
||||
*.zip
|
||||
.DS_Store
|
||||
imgui.ini
|
||||
|
||||
Doom3BFG.exe
|
||||
|
@ -36,6 +38,7 @@ base/strings/
|
|||
base/video/
|
||||
base/wads/
|
||||
base/renderprogs2/
|
||||
base/generated/
|
||||
|
||||
GPATH
|
||||
GRTAGS
|
||||
|
|
22
README.md
22
README.md
|
@ -492,20 +492,24 @@ Recommended in this case is `cmake-vs2019-64bit.bat` or `cmake-vs2019-64bit-no-f
|
|||
> sudo port install cmake libsdl2 +universal openal-soft +universal (for universal arch libraries)
|
||||
|
||||
You don't need FFmpeg to be installed. You can turn it off by adding -DFFMPEG=OFF and -DBINKDEC=ON to the CMake options. For debug builds FFmpeg is enabled by default because the bundled libbinkdec is slow during development if compiled for Debug mode. For release, retail and universal builds FFmpeg is disabled and libbinkdec is enabled by default.
|
||||
|
||||
The Vulkan SDK must be installed and can be obtained from https://vulkan.lunarg.com/sdk/home#mac
|
||||
|
||||
3. Generate the Makefiles using CMake:
|
||||
|
||||
For command line builds:
|
||||
|
||||
> cd neo/
|
||||
> ./cmake-macos-opengl-release.sh
|
||||
> ./cmake-macos-release.sh
|
||||
|
||||
For Xcode builds:
|
||||
|
||||
> cd neo/
|
||||
> ./cmake-xcode-opengl-release.sh
|
||||
> ./cmake-xcode-release.sh
|
||||
or
|
||||
> ./cmake-xcode-opengl-universal.sh (universal build on macOS Big Sur / Xcode 12.2 or later)
|
||||
> ./cmake-xcode-universal.sh (universal build on macOS Big Sur / Xcode 12.2 or later)
|
||||
|
||||
Xcode release and universal builds now automatically package the executable into a macOS app bundle, defining an Info.plist file and copying the base directory and custom icon into the application bundle's Contents/Resources folder. This is controlled by adding -DMACOSX_BUNDLE=ON to the CMake options.
|
||||
|
||||
Depending on which package manager you install (Homebrew or MacPorts) you may need to change the openal-soft library and include paths specified in the cmake shell scripts. For single architecture builds (debug, release, retail) the default openal-soft paths are set for Homebrew on x86, while for universal builds the default paths are set for MacPorts on x86 or Apple Silicon. If you want to build using the single architecture shell scripts (debug, release, retail) on Apple Silicon, you will need to change the openal-soft paths from `/usr/local/...` to either `/opt/homebrew/...` (Homebrew) or `/opt/local/...` (MacPorts).
|
||||
|
||||
|
@ -516,7 +520,7 @@ Recommended in this case is `cmake-vs2019-64bit.bat` or `cmake-vs2019-64bit-no-f
|
|||
> cd ../build
|
||||
> make
|
||||
|
||||
For Xcode builds double click on RBDOOM-3-BFG/xcode-opengl-\<buildtype\>/RBDoom3BFG.xcodeproj and start the build. The generated Xcode project file is pre-configured with the correct targets and build settings.
|
||||
For Xcode builds double click on RBDOOM-3-BFG/xcode-\<buildtype\>/RBDoom3BFG.xcodeproj and start the build. The generated Xcode project file is pre-configured with the correct targets and build settings.
|
||||
|
||||
---
|
||||
# Installation, Getting the Game Data, Running the Game <a name="installation"></a>
|
||||
|
@ -609,15 +613,15 @@ Anyway:
|
|||
* _common.crc
|
||||
* (etc)
|
||||
|
||||
5. On macOS the RBDoom3BFG executable will also search for game data within an app bundle's relative path ../Resources/base and, as a last resort, within the absolute path /Applications/RBDoom-3-BFG.app/Contents/Resources/base. In addition, if you want the game to be standalone without dependencies on pre-installed dynamic libs, you can use macdylibbundler to bundle all external dylib dependencies into the app bundle (see https://github.com/auriamg/macdylibbundler or simply install via "brew install dylibbundler" or "sudo port install dylibbundler"). For example, the following command will copy all external dynamic library dependencies to the Contents/libs directory of the game's app bundle and adjust the rpaths within the RBDoom3BFG executable and copied dylibs.
|
||||
5. On macOS the RBDoom3BFG executable will also search for game data within an app bundle's Contents/Resources/base folder, and as a last resort, within the absolute path /Applications/RBDoom3BFG.app/Contents/Resources/base. In addition, if you want the game to be standalone without dependencies on pre-installed dynamic libs, you can use macdylibbundler to bundle all external dylib dependencies into the app bundle (see https://github.com/auriamg/macdylibbundler or simply install via "brew install dylibbundler" or "sudo port install dylibbundler"). For example, the following command will copy all external dylib dependencies to the Contents/libs directory of the game's app bundle and adjust the rpaths within the RBDoom3BFG executable and copied dylibs.
|
||||
|
||||
> dylibbundler -od -b -x RBDoom-3-BFG.app/Contents/MacOS/RBDoom3BFG -d RBDoom-3-BFG.app/Contents/libs/
|
||||
> dylibbundler -od -b -x RBDoom3BFG.app/Contents/MacOS/RBDoom3BFG -d RBDoom3BFG.app/Contents/libs/
|
||||
|
||||
After running dylibbundler you must re-sign the modified executable and dylibs if planning to run on **Apple Silicon** machines. The output of dylibbundler will indicate which dylibs (if any) require re-signing. This code signing step is not needed for x86-based Macs.
|
||||
After running dylibbundler you may need to re-sign the modified executable and dylibs if planning to run on **Apple Silicon** machines. Newer versions of dylibbundler now do this automatically. The output of dylibbundler will indicate which executable and dylibs (if any) require re-signing. This code signing step is not needed for x86-based Macs.
|
||||
|
||||
> codesign -s - --force RBDoom-3-BFG.app/Contents/libs/lib<modified-by-dylibbundler>.dylib
|
||||
> codesign -s - --force RBDoom3BFG.app/Contents/libs/lib<modified-by-dylibbundler>.dylib
|
||||
...
|
||||
> codesign -s - --force RBDoom-3-BFG.app/Contents/MacOS/RBDoom3BFG
|
||||
> codesign -s - --force RBDoom3BFG.app/Contents/MacOS/RBDoom3BFG
|
||||
|
||||
6. Run the game by executing the RBDoom3BFG executable.
|
||||
|
||||
|
|
|
@ -94,10 +94,18 @@ if(UNIX)
|
|||
set(USE_VULKAN ON)
|
||||
|
||||
# SRS - Disable precompiled headers when cross-compiling on OSX, e.g. when creating universal binaries
|
||||
if((CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" AND CMAKE_OSX_ARCHITECTURES MATCHES "arm64" ) OR
|
||||
(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_OSX_ARCHITECTURES MATCHES "x86_64"))
|
||||
# - Also disable precompiled headers when using the Ninja Multi-Config generator on linux or macOS
|
||||
if((CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" AND CMAKE_OSX_ARCHITECTURES MATCHES "arm64" ) OR
|
||||
(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_OSX_ARCHITECTURES MATCHES "x86_64") OR
|
||||
(CMAKE_GENERATOR MATCHES "Ninja Multi-Config"))
|
||||
set(USE_PRECOMPILED_HEADERS OFF)
|
||||
endif()
|
||||
|
||||
# SRS - For single-config dev builds, define NO_MULTI_CONFIG to search for basepath up 1 dir level vs 2
|
||||
if((CMAKE_GENERATOR MATCHES "Unix Makefiles") OR
|
||||
(CMAKE_GENERATOR MATCHES "Ninja" AND NOT CMAKE_GENERATOR MATCHES "Multi-Config"))
|
||||
add_definitions(-DNO_MULTI_CONFIG)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(COMPILE_COMMANDS)
|
||||
|
@ -502,17 +510,18 @@ file(GLOB RENDERER_VULKAN_SOURCES renderer/Vulkan/*.cpp)
|
|||
file(GLOB RENDERER_NVRHI_INCLUDES renderer/NVRHI/*.h)
|
||||
file(GLOB RENDERER_NVRHI_SOURCES renderer/NVRHI/*.cpp)
|
||||
|
||||
file(GLOB SHADERS shaders/*.hlsl shaders/*.inc )
|
||||
file(GLOB SHADERS_BUILTIN shaders/builtin/*.hlsl )
|
||||
file(GLOB SHADERS_BUILTIN_DEBUG shaders/builtin/debug/*.hlsl )
|
||||
file(GLOB SHADERS_BUILTIN_FOG shaders/builtin/fog/*.hlsl )
|
||||
file(GLOB SHADERS_BUILTIN_LEGACY shaders/builtin/legacy/*.hlsl )
|
||||
file(GLOB SHADERS_BUILTIN_LIGHTING shaders/builtin/lighting/*.hlsl )
|
||||
file(GLOB SHADERS_BUILTIN_POST shaders/builtin/post/*.hlsl )
|
||||
file(GLOB SHADERS_BUILTIN_SSAO shaders/builtin/SSAO/*.hlsl )
|
||||
file(GLOB SHADERS_BUILTIN_SSGI shaders/builtin/SSGI/*.hlsl )
|
||||
file(GLOB SHADERS_BUILTIN_VIDEO shaders/builtin/video/*.hlsl )
|
||||
file(GLOB SHADERS_BUILTIN_VR shaders/builtin/VR/*.hlsl )
|
||||
# SRS - not needed, since handled by CMakeLists.txt for Shaders target
|
||||
#file(GLOB SHADERS shaders/*.hlsl shaders/*.inc )
|
||||
#file(GLOB SHADERS_BUILTIN shaders/builtin/*.hlsl )
|
||||
#file(GLOB SHADERS_BUILTIN_DEBUG shaders/builtin/debug/*.hlsl )
|
||||
#file(GLOB SHADERS_BUILTIN_FOG shaders/builtin/fog/*.hlsl )
|
||||
#file(GLOB SHADERS_BUILTIN_LEGACY shaders/builtin/legacy/*.hlsl )
|
||||
#file(GLOB SHADERS_BUILTIN_LIGHTING shaders/builtin/lighting/*.hlsl )
|
||||
#file(GLOB SHADERS_BUILTIN_POST shaders/builtin/post/*.hlsl )
|
||||
#file(GLOB SHADERS_BUILTIN_SSAO shaders/builtin/SSAO/*.hlsl )
|
||||
#file(GLOB SHADERS_BUILTIN_SSGI shaders/builtin/SSGI/*.hlsl )
|
||||
#file(GLOB SHADERS_BUILTIN_VIDEO shaders/builtin/video/*.hlsl )
|
||||
#file(GLOB SHADERS_BUILTIN_VR shaders/builtin/VR/*.hlsl )
|
||||
|
||||
file(GLOB IRRXML_INCLUDES libs/irrxml/src/*.h)
|
||||
file(GLOB IRRXML_SOURCES libs/irrxml/src/*.cpp)
|
||||
|
@ -1139,17 +1148,18 @@ source_group("renderer\\Vulkan" FILES ${RENDERER_VULKAN_SOURCES})
|
|||
|
||||
source_group("renderer\\SMAA" FILES ${RENDERER_SMAA_INCLUDES})
|
||||
|
||||
source_group("renderer\\Shaders" FILES ${SHADERS})
|
||||
source_group("renderer\\Shaders\\builtin" FILES ${SHADERS_BUILTIN})
|
||||
source_group("renderer\\Shaders\\builtin\\debug" FILES ${SHADERS_BUILTIN_DEBUG})
|
||||
source_group("renderer\\Shaders\\builtin\\fog" FILES ${SHADERS_BUILTIN_FOG})
|
||||
source_group("renderer\\Shaders\\builtin\\legacy" FILES ${SHADERS_BUILTIN_LEGACY})
|
||||
source_group("renderer\\Shaders\\builtin\\lighting" FILES ${SHADERS_BUILTIN_LIGHTING})
|
||||
source_group("renderer\\Shaders\\builtin\\post" FILES ${SHADERS_BUILTIN_POST})
|
||||
source_group("renderer\\Shaders\\builtin\\SSAO" FILES ${SHADERS_BUILTIN_SSAO})
|
||||
source_group("renderer\\Shaders\\builtin\\SSGI" FILES ${SHADERS_BUILTIN_SSGI})
|
||||
source_group("renderer\\Shaders\\builtin\\video" FILES ${SHADERS_BUILTIN_VIDEO})
|
||||
source_group("renderer\\Shaders\\builtin\\VR" FILES ${SHADERS_BUILTIN_VR})
|
||||
# SRS - not needed, since handled by CMakeLists.txt for Shaders target
|
||||
#source_group("renderer\\Shaders" FILES ${SHADERS})
|
||||
#source_group("renderer\\Shaders\\builtin" FILES ${SHADERS_BUILTIN})
|
||||
#source_group("renderer\\Shaders\\builtin\\debug" FILES ${SHADERS_BUILTIN_DEBUG})
|
||||
#source_group("renderer\\Shaders\\builtin\\fog" FILES ${SHADERS_BUILTIN_FOG})
|
||||
#source_group("renderer\\Shaders\\builtin\\legacy" FILES ${SHADERS_BUILTIN_LEGACY})
|
||||
#source_group("renderer\\Shaders\\builtin\\lighting" FILES ${SHADERS_BUILTIN_LIGHTING})
|
||||
#source_group("renderer\\Shaders\\builtin\\post" FILES ${SHADERS_BUILTIN_POST})
|
||||
#source_group("renderer\\Shaders\\builtin\\SSAO" FILES ${SHADERS_BUILTIN_SSAO})
|
||||
#source_group("renderer\\Shaders\\builtin\\SSGI" FILES ${SHADERS_BUILTIN_SSGI})
|
||||
#source_group("renderer\\Shaders\\builtin\\video" FILES ${SHADERS_BUILTIN_VIDEO})
|
||||
#source_group("renderer\\Shaders\\builtin\\VR" FILES ${SHADERS_BUILTIN_VR})
|
||||
|
||||
source_group("libs\\irrxml" FILES ${IRRXML_INCLUDES})
|
||||
source_group("libs\\irrxml" FILES ${IRRXML_SOURCES})
|
||||
|
@ -1336,17 +1346,18 @@ set(RBDOOM3_INCLUDES
|
|||
${RENDERER_JOBS_STATICSHADOWVOLUME_INCLUDES}
|
||||
${RENDERER_PASSES_INCLUDES}
|
||||
|
||||
${SHADERS}
|
||||
${SHADERS_BUILTIN}
|
||||
${SHADERS_BUILTIN_DEBUG}
|
||||
${SHADERS_BUILTIN_FOG}
|
||||
${SHADERS_BUILTIN_LEGACY}
|
||||
${SHADERS_BUILTIN_LIGHTING}
|
||||
${SHADERS_BUILTIN_POST}
|
||||
${SHADERS_BUILTIN_SSAO}
|
||||
${SHADERS_BUILTIN_SSGI}
|
||||
${SHADERS_BUILTIN_VIDEO}
|
||||
${SHADERS_BUILTIN_VR}
|
||||
# SRS - not needed, since handled by CMakeLists.txt for Shaders target
|
||||
#${SHADERS}
|
||||
#${SHADERS_BUILTIN}
|
||||
#${SHADERS_BUILTIN_DEBUG}
|
||||
#${SHADERS_BUILTIN_FOG}
|
||||
#${SHADERS_BUILTIN_LEGACY}
|
||||
#${SHADERS_BUILTIN_LIGHTING}
|
||||
#${SHADERS_BUILTIN_POST}
|
||||
#${SHADERS_BUILTIN_SSAO}
|
||||
#${SHADERS_BUILTIN_SSGI}
|
||||
#${SHADERS_BUILTIN_VIDEO}
|
||||
#${SHADERS_BUILTIN_VR}
|
||||
|
||||
${RENDERER_SMAA_INCLUDES}
|
||||
${IRRXML_INCLUDES}
|
||||
|
@ -1602,17 +1613,18 @@ if(MSVC)
|
|||
)
|
||||
endif()
|
||||
|
||||
set_source_files_properties( ${SHADERS} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
set_source_files_properties( ${SHADERS_BUILTIN} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
set_source_files_properties( ${SHADERS_BUILTIN_DEBUG} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
set_source_files_properties( ${SHADERS_BUILTIN_FOG} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
set_source_files_properties( ${SHADERS_BUILTIN_LEGACY} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
set_source_files_properties( ${SHADERS_BUILTIN_LIGHTING} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
set_source_files_properties( ${SHADERS_BUILTIN_POST} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
set_source_files_properties( ${SHADERS_BUILTIN_SSAO} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
set_source_files_properties( ${SHADERS_BUILTIN_SSGI} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
set_source_files_properties( ${SHADERS_BUILTIN_VIDEO} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
set_source_files_properties( ${SHADERS_BUILTIN_VR} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
# SRS - not needed, since handled by CMakeLists.txt for Shaders target
|
||||
#set_source_files_properties( ${SHADERS} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
#set_source_files_properties( ${SHADERS_BUILTIN} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
#set_source_files_properties( ${SHADERS_BUILTIN_DEBUG} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
#set_source_files_properties( ${SHADERS_BUILTIN_FOG} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
#set_source_files_properties( ${SHADERS_BUILTIN_LEGACY} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
#set_source_files_properties( ${SHADERS_BUILTIN_LIGHTING} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
#set_source_files_properties( ${SHADERS_BUILTIN_POST} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
#set_source_files_properties( ${SHADERS_BUILTIN_SSAO} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
#set_source_files_properties( ${SHADERS_BUILTIN_SSGI} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
#set_source_files_properties( ${SHADERS_BUILTIN_VIDEO} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
#set_source_files_properties( ${SHADERS_BUILTIN_VR} PROPERTIES VS_TOOL_OVERRIDE "None" )
|
||||
|
||||
list(APPEND RBDOOM3_SOURCES ${WIN32_RESOURCES})
|
||||
|
||||
|
@ -1771,7 +1783,27 @@ else()
|
|||
add_dependencies(precomp_header_rbdoom3bfg idlib)
|
||||
endif()
|
||||
|
||||
add_executable(RBDoom3BFG WIN32 ${RBDOOM3_SOURCES})
|
||||
if(MACOSX_BUNDLE)
|
||||
# define contents of macOS app bundle Resources folder
|
||||
set(MACOS_RESOURCES sys/posix/res/Doom3BFG.icns ../base)
|
||||
source_group("Resources" FILES ${MACOS_RESOURCES})
|
||||
set_source_files_properties(${MACOS_RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
|
||||
# enable Xcode to display the icons file properly
|
||||
set_source_files_properties(sys/posix/res/Doom3BFG.icns PROPERTIES XCODE_EXPLICIT_FILE_TYPE .icns)
|
||||
|
||||
# add macOS bundle properties to executable
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME RBDoom-3-BFG)
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION 1.5.0)
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING 1.5.0)
|
||||
set(MACOSX_BUNDLE_ICON_FILE Doom3BFG.icns)
|
||||
set(MACOSX_BUNDLE_INFO_STRING "") # to be added by author if desired
|
||||
set(MACOSX_BUNDLE_COPYRIGHT "") # to be added by author if desired
|
||||
|
||||
add_executable(RBDoom3BFG MACOSX_BUNDLE ${MACOS_RESOURCES} ${RBDOOM3_INCLUDES} ${RBDOOM3_SOURCES})
|
||||
else()
|
||||
add_executable(RBDoom3BFG WIN32 ${RBDOOM3_INCLUDES} ${RBDOOM3_SOURCES})
|
||||
endif()
|
||||
|
||||
if(USE_VULKAN)
|
||||
add_dependencies(RBDoom3BFG nvrhi_vk)
|
||||
|
|
6
neo/cmake-macos-release.sh
Executable file
6
neo/cmake-macos-release.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
cd ..
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
# change or remove -DCMAKE_OSX_DEPLOYMENT_TARGET=<version> to match supported runtime targets
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_DEPLOYMENT_TARGET=12.1 -DFFMPEG=OFF -DBINKDEC=ON -DUSE_MoltenVK=ON -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include ../neo -Wno-dev
|
6
neo/cmake-macos-retail.sh
Executable file
6
neo/cmake-macos-retail.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
cd ..
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
# change or remove -DCMAKE_OSX_DEPLOYMENT_TARGET=<version> to match supported runtime targets
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG -DID_RETAIL" -DCMAKE_OSX_DEPLOYMENT_TARGET=12.1 -DFFMPEG=OFF -DBINKDEC=ON -DUSE_MoltenVK=ON -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include ../neo -Wno-dev
|
|
@ -1,6 +0,0 @@
|
|||
cd ..
|
||||
rm -rf build-vulkan
|
||||
mkdir build-vulkan
|
||||
cd build-vulkan
|
||||
# change or remove -DCMAKE_OSX_DEPLOYMENT_TARGET=<version> to match supported runtime targets
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG -DNO_MULTI_CONFIG" -DCMAKE_OSX_DEPLOYMENT_TARGET=12.1 -DFFMPEG=OFF -DBINKDEC=ON -DUSE_VULKAN=ON -DUSE_MoltenVK=ON -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include ../neo -Wno-dev
|
|
@ -1,6 +0,0 @@
|
|||
cd ..
|
||||
rm -rf build-vulkan
|
||||
mkdir build-vulkan
|
||||
cd build-vulkan
|
||||
# change or remove -DCMAKE_OSX_DEPLOYMENT_TARGET=<version> to match supported runtime targets
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG -DNO_MULTI_CONFIG -DID_RETAIL" -DCMAKE_OSX_DEPLOYMENT_TARGET=12.1 -DFFMPEG=OFF -DBINKDEC=ON -DUSE_VULKAN=ON -DUSE_MoltenVK=ON -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include ../neo -Wno-dev
|
|
@ -1,10 +1,10 @@
|
|||
cd ..
|
||||
rm -rf xcode-vulkan-debug
|
||||
mkdir xcode-vulkan-debug
|
||||
cd xcode-vulkan-debug
|
||||
rm -rf xcode-debug
|
||||
mkdir xcode-debug
|
||||
cd xcode-debug
|
||||
# note 1: remove or set -DCMAKE_SUPPRESS_REGENERATION=OFF to reenable ZERO_CHECK target which checks for CMakeLists.txt changes and re-runs CMake before builds
|
||||
# however, if ZERO_CHECK is reenabled **must** add VULKAN_SDK location to Xcode Custom Paths (under Prefs/Locations) otherwise build failures may occur
|
||||
# note 2: policy CMAKE_POLICY_DEFAULT_CMP0142=NEW suppresses non-existant per-config suffixes on Xcode library search paths, works for cmake version 3.25 and later
|
||||
#note 3: env variable MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE=1 enables MoltenVK's image view swizzle which may be required on older macOS versions or hardware (see vulkaninfo)
|
||||
# note 4: env variable MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=2 enables MoltenVK's use of Metal argument buffers only if VK_EXT_descriptor_indexing is enabled
|
||||
cmake -G Xcode -DCMAKE_BUILD_TYPE=Debug -DUSE_VULKAN=ON -DCMAKE_XCODE_GENERATE_SCHEME=ON -DCMAKE_XCODE_SCHEME_ENVIRONMENT="MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE=1;MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=2" -DCMAKE_SUPPRESS_REGENERATION=ON -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include ../neo -DCMAKE_POLICY_DEFAULT_CMP0142=NEW -Wno-dev
|
||||
cmake -G Xcode -DCMAKE_BUILD_TYPE=Debug -DCMAKE_XCODE_GENERATE_SCHEME=ON -DCMAKE_XCODE_SCHEME_ENVIRONMENT="MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE=1;MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=2" -DCMAKE_SUPPRESS_REGENERATION=ON -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include ../neo -DCMAKE_POLICY_DEFAULT_CMP0142=NEW -Wno-dev
|
|
@ -1,8 +1,8 @@
|
|||
cd ..
|
||||
rm -rf xcode-vulkan-release
|
||||
mkdir xcode-vulkan-release
|
||||
cd xcode-vulkan-release
|
||||
rm -rf xcode-release
|
||||
mkdir xcode-release
|
||||
cd xcode-release
|
||||
# note 1: remove or set -DCMAKE_SUPPRESS_REGENERATION=OFF to reenable ZERO_CHECK target which checks for CMakeLists.txt changes and re-runs CMake before builds
|
||||
# however, if ZERO_CHECK is reenabled **must** add VULKAN_SDK location to Xcode Custom Paths (under Prefs/Locations) otherwise build failures may occur
|
||||
# note 2: policy CMAKE_POLICY_DEFAULT_CMP0142=NEW suppresses non-existant per-config suffixes on Xcode library search paths, works for cmake version 3.25 and later
|
||||
cmake -G Xcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES="Release;MinSizeRel;RelWithDebInfo" -DFFMPEG=OFF -DBINKDEC=ON -DUSE_VULKAN=ON -DUSE_MoltenVK=ON -DCMAKE_XCODE_GENERATE_SCHEME=ON -DCMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION=OFF -DCMAKE_SUPPRESS_REGENERATION=ON -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include ../neo -DCMAKE_POLICY_DEFAULT_CMP0142=NEW -Wno-dev
|
||||
cmake -G Xcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES="Release;MinSizeRel;RelWithDebInfo" -DMACOSX_BUNDLE=ON -DFFMPEG=OFF -DBINKDEC=ON -DUSE_MoltenVK=ON -DCMAKE_XCODE_GENERATE_SCHEME=ON -DCMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION=OFF -DCMAKE_SUPPRESS_REGENERATION=ON -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include ../neo -DCMAKE_POLICY_DEFAULT_CMP0142=NEW -Wno-dev
|
|
@ -1,9 +1,9 @@
|
|||
cd ..
|
||||
rm -rf xcode-vulkan-universal
|
||||
mkdir xcode-vulkan-universal
|
||||
cd xcode-vulkan-universal
|
||||
rm -rf xcode-universal
|
||||
mkdir xcode-universal
|
||||
cd xcode-universal
|
||||
# note 1: remove or set -DCMAKE_SUPPRESS_REGENERATION=OFF to reenable ZERO_CHECK target which checks for CMakeLists.txt changes and re-runs CMake before builds
|
||||
# however, if ZERO_CHECK is reenabled **must** add VULKAN_SDK location to Xcode Custom Paths (under Prefs/Locations) otherwise build failures may occur
|
||||
# note 2: policy CMAKE_POLICY_DEFAULT_CMP0142=NEW suppresses non-existant per-config suffixes on Xcode library search paths, works for cmake version 3.25 and later
|
||||
# note 3: universal openal-soft library and include paths assume MacPorts install locations
|
||||
cmake -G Xcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_CONFIGURATION_TYPES="Release;MinSizeRel;RelWithDebInfo" -DFFMPEG=OFF -DBINKDEC=ON -DUSE_VULKAN=ON -DUSE_MoltenVK=ON -DCMAKE_XCODE_GENERATE_SCHEME=ON -DCMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION=OFF -DCMAKE_SUPPRESS_REGENERATION=ON -DOPENAL_LIBRARY=/opt/local/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/opt/local/include ../neo -DCMAKE_POLICY_DEFAULT_CMP0142=NEW -Wno-dev
|
||||
cmake -G Xcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_CONFIGURATION_TYPES="Release;MinSizeRel;RelWithDebInfo" -DMACOSX_BUNDLE=ON -DFFMPEG=OFF -DBINKDEC=ON -DUSE_MoltenVK=ON -DCMAKE_XCODE_GENERATE_SCHEME=ON -DCMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION=OFF -DCMAKE_SUPPRESS_REGENERATION=ON -DOPENAL_LIBRARY=/opt/local/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/opt/local/include ../neo -DCMAKE_POLICY_DEFAULT_CMP0142=NEW -Wno-dev
|
|
@ -68,7 +68,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
// RB begin
|
||||
// Default base path (used only if none could be found)
|
||||
#ifdef __APPLE__
|
||||
#define DEFAULT_BASEPATH "/Applications/RBDOOM-3-BFG.app/Contents/Resources"
|
||||
#define DEFAULT_BASEPATH "/Applications/RBDoom3BFG.app/Contents/Resources"
|
||||
#else
|
||||
#define DEFAULT_BASEPATH "/usr/share/games/doom3bfg"
|
||||
#endif
|
||||
|
@ -79,4 +79,4 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#define STEAMPATH_NAME "DOOM 3 BFG Edition"
|
||||
|
||||
// raynorpat: GOG.com Galaxy Launcher Game ID for figuring out Steam base path
|
||||
#define GOGPATH_ID "1733124578"
|
||||
#define GOGPATH_ID "1733124578"
|
||||
|
|
|
@ -1150,11 +1150,18 @@ int idParser::Directive_include( idToken* token, bool supressWarning )
|
|||
// try relative to the current file
|
||||
path = scriptstack->GetFileName();
|
||||
path.StripFilename();
|
||||
path += "/";
|
||||
path += *token;
|
||||
if( !script->LoadFile( path, OSPath ) )
|
||||
// first remove any trailing path overlap with token
|
||||
idStr token_path = *token;
|
||||
if( !path.StripTrailingOnce( token_path.StripFilename() ) )
|
||||
{
|
||||
// try absolute path
|
||||
// if no path overlap add separator before token
|
||||
path += "/";
|
||||
}
|
||||
path += *token;
|
||||
// try assuming a full os path from GetFileName()
|
||||
if( !script->LoadFile( path, true ) )
|
||||
{
|
||||
// try from the token path
|
||||
path = *token;
|
||||
if( !script->LoadFile( path, OSPath ) )
|
||||
{
|
||||
|
|
|
@ -254,6 +254,10 @@ bool Init( int windowWidth, int windowHeight )
|
|||
io.GetClipboardTextFn = GetClipboardText;
|
||||
io.ClipboardUserData = NULL;
|
||||
|
||||
// SRS - store imgui.ini file in fs_savepath (not in cwd please!)
|
||||
static idStr BFG_IniFilename = fileSystem->BuildOSPath( cvarSystem->GetCVarString( "fs_savepath" ), io.IniFilename );
|
||||
io.IniFilename = BFG_IniFilename;
|
||||
|
||||
// make it a bit prettier with rounded edges
|
||||
ImGuiStyle& style = ImGui::GetStyle();
|
||||
//style.ChildWindowRounding = 9.0f;
|
||||
|
|
|
@ -425,8 +425,7 @@ const char* Sys_DefaultBasePath()
|
|||
basepath = Sys_EXEPath();
|
||||
if( basepath.Length() )
|
||||
{
|
||||
basepath.StripFilename();
|
||||
exepath = basepath;
|
||||
exepath = basepath.StripFilename();
|
||||
testbase = basepath;
|
||||
testbase += "/";
|
||||
testbase += BASE_GAMEDIR;
|
||||
|
@ -457,8 +456,9 @@ const char* Sys_DefaultBasePath()
|
|||
if( exepath.Length() )
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
// SRS - Check for macOS app bundle resources path
|
||||
basepath = exepath + "/../Resources";
|
||||
// SRS - Check for macOS app bundle resources path (up one dir level and down to Resources dir)
|
||||
basepath = exepath;
|
||||
basepath = basepath.StripFilename() + "/Resources";
|
||||
testbase = basepath;
|
||||
testbase += "/";
|
||||
testbase += BASE_GAMEDIR;
|
||||
|
@ -471,11 +471,11 @@ const char* Sys_DefaultBasePath()
|
|||
common->Printf( "no '%s' directory in macOS app bundle resources path %s, skipping\n", BASE_GAMEDIR, basepath.c_str() );
|
||||
}
|
||||
#endif
|
||||
// SRS - Check for macOS/linux build path (directory structure with build dir and possible config suffix)
|
||||
#if defined(__APPLE__) && !defined( NO_MULTI_CONFIG )
|
||||
basepath = exepath + "/../.."; // for macOS Xcode builds with Debug/Release/etc config suffix
|
||||
#else
|
||||
basepath = exepath + "/.."; // for linux and macOS single-config makefile builds
|
||||
// SRS - Check for linux/macOS build path (directory structure with build dir and possible config suffix)
|
||||
basepath = exepath;
|
||||
basepath.StripFilename(); // up 1st dir level for single-config dev builds
|
||||
#if !defined( NO_MULTI_CONFIG )
|
||||
basepath.StripFilename(); // up 2nd dir level for multi-config dev builds with Debug/Release/etc suffix
|
||||
#endif
|
||||
testbase = basepath;
|
||||
testbase += "/";
|
||||
|
|
BIN
neo/sys/posix/res/Doom3BFG.icns
Normal file
BIN
neo/sys/posix/res/Doom3BFG.icns
Normal file
Binary file not shown.
|
@ -994,8 +994,12 @@ sysEvent_t Sys_GetEvent()
|
|||
// SRS - Only save window moved events when in windowed modes
|
||||
if( !renderSystem->IsFullScreen() )
|
||||
{
|
||||
r_windowX.SetInteger( x );
|
||||
r_windowY.SetInteger( y );
|
||||
// SRS - take window border into account when when saving window position cvars
|
||||
int topBorder, leftBorder, bottomBorder, rightBorder;
|
||||
SDL_Window* window = SDL_GetWindowFromID( ev.window.windowID );
|
||||
SDL_GetWindowBordersSize( window, &topBorder, &leftBorder, &bottomBorder, &rightBorder );
|
||||
r_windowX.SetInteger( x - leftBorder );
|
||||
r_windowY.SetInteger( y - topBorder );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -484,7 +484,7 @@ static bool SetScreenParmsFullscreen( glimpParms_t parms )
|
|||
// if we're currently not in fullscreen mode, we need to switch to fullscreen
|
||||
if( !( SDL_GetWindowFlags( window ) & SDL_WINDOW_FULLSCREEN ) )
|
||||
{
|
||||
if( SDL_SetWindowFullscreen( window, SDL_TRUE ) < 0 )
|
||||
if( SDL_SetWindowFullscreen( window, SDL_WINDOW_FULLSCREEN ) < 0 )
|
||||
{
|
||||
common->Warning( "Couldn't switch to fullscreen mode, reason: %s!", SDL_GetError() );
|
||||
return false;
|
||||
|
@ -510,14 +510,16 @@ static bool SetScreenParmsWindowed( glimpParms_t parms )
|
|||
}
|
||||
}
|
||||
|
||||
// if window is maximized, restore it to normal before setting size
|
||||
if( SDL_GetWindowFlags( window ) & SDL_WINDOW_MAXIMIZED )
|
||||
{
|
||||
SDL_RestoreWindow( window );
|
||||
}
|
||||
|
||||
SDL_SetWindowSize( window, parms.width, parms.height );
|
||||
|
||||
// SRS - this logic prevents window position drift on linux when coming in and out of fullscreen
|
||||
#if !defined(__APPLE__)
|
||||
SDL_bool borderState = SDL_GetWindowFlags( window ) & SDL_WINDOW_BORDERLESS ? SDL_FALSE : SDL_TRUE;
|
||||
SDL_SetWindowBordered( window, SDL_FALSE );
|
||||
SDL_SetWindowPosition( window, parms.x, parms.y );
|
||||
SDL_SetWindowBordered( window, borderState );
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
@ -722,6 +724,8 @@ bool R_GetModeListForDisplay( const int requestedDisplayNum, idList<vidMode_t>&
|
|||
|
||||
modeList.Clear();
|
||||
|
||||
bool verbose = false;
|
||||
|
||||
// DG: SDL2 implementation
|
||||
if( requestedDisplayNum >= SDL_GetNumVideoDisplays() )
|
||||
{
|
||||
|
@ -742,6 +746,28 @@ bool R_GetModeListForDisplay( const int requestedDisplayNum, idList<vidMode_t>&
|
|||
continue;
|
||||
}
|
||||
|
||||
if( SDL_BITSPERPIXEL( m.format ) != 32 && SDL_BITSPERPIXEL( m.format ) != 24 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if( ( m.refresh_rate != 60 ) && ( m.refresh_rate != 120 ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if( m.h < 720 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if( verbose )
|
||||
{
|
||||
common->Printf( " -------------------\n" );
|
||||
common->Printf( " modeNum : %i\n", i );
|
||||
common->Printf( " dmBitsPerPel : %i\n", SDL_BITSPERPIXEL( m.format ) );
|
||||
common->Printf( " dmPelsWidth : %i\n", m.w );
|
||||
common->Printf( " dmPelsHeight : %i\n", m.h );
|
||||
common->Printf( " dmDisplayFrequency : %i\n", m.refresh_rate );
|
||||
}
|
||||
|
||||
vidMode_t mode;
|
||||
mode.width = m.w;
|
||||
mode.height = m.h;
|
||||
|
|
Loading…
Reference in a new issue