mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-25 06:04:57 +00:00
- Added platform detection and user configuration directory retrieval in platform.cpp and platform.hpp. - Implemented detailed error reporting for Windows in platform.cpp. - Updated logger to use std::source_location for improved trace logging in logger.hpp. - Refactored existing trace guards in various application files to remove function name parameters, utilizing the new logger functionality. - Introduced a new script (add_traces.sh) to automate the addition of logging includes in relevant source files. - Enhanced audio_player.cpp and other script files to include detailed logging for function entries and variable states.
30 lines
852 B
Bash
Executable File
30 lines
852 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Script to add logging includes to files that need them
|
|
|
|
FILES=(
|
|
"src/script/lua_helpers.cpp"
|
|
"src/script/mesh_loader.cpp"
|
|
"src/app/vulkan_api.cpp"
|
|
"src/script/physics_bridge.cpp"
|
|
"src/script/scene_manager.cpp"
|
|
"src/script/shader_manager.cpp"
|
|
"src/script/audio_manager.cpp"
|
|
"src/script/gui_manager.cpp"
|
|
"src/gui/gui_renderer.cpp"
|
|
"src/script/lua_bindings.cpp"
|
|
)
|
|
|
|
for file in "${FILES[@]}"; do
|
|
# Check if file already includes logger.hpp
|
|
if ! grep -q "#include.*logging/logger.hpp" "$file"; then
|
|
echo "Adding logger include to $file"
|
|
# Add include after the first #include line
|
|
sed -i '0,/#include/s|#include.*|&\n#include "logging/logger.hpp"|' "$file"
|
|
else
|
|
echo "Skipping $file - already includes logger"
|
|
fi
|
|
done
|
|
|
|
echo "Done adding logger includes"
|