You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This allows WSL compiles to use the same workspace as normal Windows. It works because it prevents the perforce client from modifying the line ending to be CRLF. #jira none #rb Brandon.Schaefer #ROBOMERGE-SOURCE: CL 16299647 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v800-16297934) [CL 16299663 by james singer in ue5-release-engine-test branch]
43 lines
1.7 KiB
Bash
Executable File
43 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
SCRIPT_DIR=$(cd "$(dirname "$BASH_SOURCE")" ; pwd)
|
|
TOP_DIR=$(cd "$SCRIPT_DIR/../../.." ; pwd)
|
|
|
|
AddGDBPrettyPrinters()
|
|
{
|
|
echo -ne "Attempting to set up UE pretty printers for gdb (existing UEPrinters.py, if any, will be overwritten)...\n\t"
|
|
|
|
# Copy the pretty printer into the appropriate folder.
|
|
mkdir -p ~/.config/Epic/GDBPrinters/
|
|
if [ -e ~/.config/Epic/GDBPrinters/UEPrinters.py ]; then
|
|
chmod 644 ~/.config/Epic/GDBPrinters/UEPrinters.py # set R/W so we can overwrite it
|
|
fi
|
|
cp "$TOP_DIR/Extras/GDBPrinters/UEPrinters.py" ~/.config/Epic/GDBPrinters/
|
|
echo -ne "updated UEPrinters.py\n\t"
|
|
chmod 644 ~/.config/Epic/GDBPrinters/UEPrinters.py # set R/W again (it can be read-only if copied from Perforce)
|
|
|
|
# Check if .gdbinit exists. If not create else add needed parts.
|
|
if [ ! -f ~/.gdbinit ]; then
|
|
echo "no ~/.gdbinit file found - creating a new one."
|
|
echo -e "python \nimport sys\n\nsys.path.append('$HOME/.config/Epic/GDBPrinters/')\n\nfrom UEPrinters import register_ue_printers\nregister_ue_printers(None)\nprint(\"Registered pretty printers for UE classes\")\n\nend" >> ~/.gdbinit
|
|
else
|
|
if grep -q "register_ue_printers" ~/.gdbinit; then
|
|
echo "found necessary entries in ~/.gdbinit file, not changing it."
|
|
else
|
|
echo -e "cannot modify .gdbinit. Please add the below lines manually:\n\n"
|
|
echo -e "python"
|
|
echo -e "\timport sys"
|
|
echo -e "\tsys.path.append('$HOME/.config/Epic/GDBPrinters/')"
|
|
echo -e "\tfrom UEPrinters import register_ue_printers"
|
|
echo -e "\tregister_ue_printers(None)"
|
|
echo -e "\tprint(\"Registered pretty printers for UE classes\")"
|
|
echo -e "\tend"
|
|
echo -e "\n\n"
|
|
fi
|
|
fi
|
|
}
|
|
|
|
# Add GDB scripts for common Unreal types.
|
|
AddGDBPrettyPrinters
|