Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
61492b6
Add debug symbol upload commandlet
tustanivsky Sep 11, 2025
7442379
Reorganize sym uploading steps
tustanivsky Sep 11, 2025
0ed8700
Clean up
tustanivsky Sep 11, 2025
abeb1a3
Format code
getsentry-bot Sep 11, 2025
08db832
Add engine version check for commadlet run
tustanivsky Sep 11, 2025
0467add
Merge branch 'feat/debug-sym-upload-commandlet' of github.com:getsent…
tustanivsky Sep 11, 2025
9cb33a9
Merge branch 'main' into feat/debug-sym-upload-commandlet
tustanivsky Sep 11, 2025
afd4ca6
Update changelog
tustanivsky Sep 12, 2025
351475a
Retrieve project and plugin path automatically
tustanivsky Sep 12, 2025
dd45092
Set sample engine version in CI
tustanivsky Sep 12, 2025
572b600
Update package snapshot
tustanivsky Sep 12, 2025
225f11a
Set sample engine version in CI for Linux
tustanivsky Sep 12, 2025
bdd1336
Fix snapshot
tustanivsky Sep 15, 2025
edbf3eb
Fix includes
tustanivsky Sep 15, 2025
0acc98c
Format code
getsentry-bot Sep 15, 2025
dafc563
Merge branch 'feat/debug-sym-upload-commandlet' of github.com:getsent…
tustanivsky Sep 15, 2025
2668955
Fix post build step on Linux
tustanivsky Sep 15, 2025
c78a829
Merge remote-tracking branch 'origin/feat/debug-sym-upload-commandlet…
tustanivsky Sep 15, 2025
cada132
Merge branch 'feat/debug-sym-upload-commandlet' of github.com:getsent…
tustanivsky Sep 15, 2025
05bbde0
Fix indent
tustanivsky Sep 15, 2025
e300266
Fix variable expansion on Linux
tustanivsky Sep 15, 2025
6e92ee1
Move post build steps to separate scripts
tustanivsky Sep 15, 2025
827a58b
Update snapshot
tustanivsky Sep 15, 2025
c2d6332
Clean up
tustanivsky Sep 15, 2025
ca864db
Merge branch 'main' into feat/debug-sym-upload-commandlet
tustanivsky Sep 17, 2025
8a58c1d
Update changelog
tustanivsky Sep 17, 2025
783ffec
Clean up
tustanivsky Sep 17, 2025
b0cf8d1
Try moving commandlet to a separate module
tustanivsky Sep 19, 2025
bc9082f
Add commandlet module essentials
tustanivsky Sep 19, 2025
363aa49
Remove redundant module deps
tustanivsky Sep 19, 2025
6a80848
Test
tustanivsky Sep 19, 2025
1cdb699
Test
tustanivsky Sep 19, 2025
99551d2
Test
tustanivsky Sep 19, 2025
9d3dae9
Revert
tustanivsky Sep 22, 2025
60c42bf
Remove module deps
tustanivsky Sep 22, 2025
3b6bf2e
Merge branch 'main' into feat/debug-sym-upload-commandlet
tustanivsky Sep 22, 2025
d0ca66e
Add empty lines
tustanivsky Sep 22, 2025
52f6601
Test
tustanivsky Sep 22, 2025
5e831ac
Test
tustanivsky Sep 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ jobs:
path: checkout
submodules: recursive

- name: Update associated engine version in sample project descriptor
env:
UNREAL_VERSION: ${{ inputs.unreal-version }}
run: |
sed -i 's/"EngineAssociation":[[:space:]]*"[^"]*"/"EngineAssociation": "'"$UNREAL_VERSION"'"/g' checkout/sample/SentryPlayground.uproject

- name: Extract package to sample/Plugins
env:
UNREAL_VERSION: ${{ inputs.unreal-version }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ jobs:
path: checkout
submodules: recursive

- name: Update associated engine version in sample project descriptor
env:
WORKSPACE_PATH: ${{ github.workspace }}
UNREAL_VERSION: ${{ inputs.unreal-version }}
run: |
$projectFile = "$env:WORKSPACE_PATH\checkout\sample\SentryPlayground.uproject"
$content = Get-Content -Path $projectFile -Raw
$content = $content -replace '"EngineAssociation":\s*"[^"]*"', "`"EngineAssociation`": `"$env:UNREAL_VERSION`""
Set-Content -Path $projectFile -Value $content

- name: Extract package to sample/Plugins
env:
WORKSPACE_PATH: ${{ github.workspace }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Features

- Add commandlet for debug symbols upload ([#1076](https://github.com/getsentry/sentry-unreal/pull/1076))

### Fixes

- Prevent usage of internal UE logger during crash handling ([#1081](https://github.com/getsentry/sentry-unreal/pull/1081))
Expand Down
33 changes: 33 additions & 0 deletions plugin-dev/Scripts/post-build-steps-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

TARGET_PLATFORM="$1"
TARGET_TYPE="$2"
TARGET_CONFIGURATION="$3"
PROJECT_FILE="$4"
PLUGIN_DIR="$5"
ENGINE_DIR="$6"

# Grant execute permissions to sentry-cli binary (FAB version of the plugin doesn't preserve file permissions)
if [ -f "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64" ]; then
chmod +x "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Linux-x86_64"
fi

# Skip commandlet execution for Editor target type
if [ "$TARGET_TYPE" = "Editor" ]; then
echo "Skipping SentrySymbolUpload commandlet for Editor target type"
return 0 2>/dev/null || true
fi

ENGINE_VERSION=$(grep -o '"EngineAssociation": *"[^"]*"' "$PROJECT_FILE" | cut -d'"' -f4)

if [ "$(printf %.1s "$ENGINE_VERSION")" = "4" ]; then
EDITOR_EXE="$ENGINE_DIR/Binaries/Linux/UE4Editor-Cmd"
else
EDITOR_EXE="$ENGINE_DIR/Binaries/Linux/UnrealEditor-Cmd"
fi

echo "Before SentrySymbolUpload..."

"$EDITOR_EXE" "$PROJECT_FILE" -run=SentrySymbolUpload -target-platform="$TARGET_PLATFORM" -target-type="$TARGET_TYPE" -target-configuration="$TARGET_CONFIGURATION" -unattended -nopause

echo "After SentrySymbolUpload..."
34 changes: 34 additions & 0 deletions plugin-dev/Scripts/post-build-steps-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

TARGET_PLATFORM="$1"
TARGET_TYPE="$2"
TARGET_CONFIGURATION="$3"
PROJECT_FILE="$4"
PLUGIN_DIR="$5"
ENGINE_DIR="$6"

# Copy sentry.dylib to plugin's Binaries\Mac dir if it doesn't exist there to ensure FAB version of the plugin works correctly - Epic obfuscates any extra binaries when pre-building the plugin
if [ "$TARGET_PLATFORM" = "Mac" ] && [ ! -f "$PLUGIN_DIR/Binaries/Mac/sentry.dylib" ]; then
cp "$PLUGIN_DIR/Source/ThirdParty/Mac/bin/sentry.dylib" "$PLUGIN_DIR/Binaries/Mac/sentry.dylib"
fi

# Grant execute permissions to sentry-cli binary (FAB version of the plugin doesn't preserve file permissions)
if [ -f "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Darwin-universal" ]; then
chmod +x "$PLUGIN_DIR/Source/ThirdParty/CLI/sentry-cli-Darwin-universal"
fi

# Skip commandlet execution for Editor target type
if [ "$TARGET_TYPE" = "Editor" ]; then
echo "Skipping SentrySymbolUpload commandlet for Editor target type"
exit 0
fi

ENGINE_VERSION=$(grep -o '"EngineAssociation": *"[^"]*"' "$PROJECT_FILE" | cut -d'"' -f4)

if [[ "${ENGINE_VERSION:0:1}" == "4" ]]; then
EDITOR_EXE="$ENGINE_DIR/Binaries/Mac/UE4Editor-Cmd"
else
EDITOR_EXE="$ENGINE_DIR/Binaries/Mac/UnrealEditor-Cmd"
fi

"$EDITOR_EXE" "$PROJECT_FILE" -run=SentrySymbolUpload -target-platform="$TARGET_PLATFORM" -target-type="$TARGET_TYPE" -target-configuration="$TARGET_CONFIGURATION" -unattended -nopause
39 changes: 39 additions & 0 deletions plugin-dev/Scripts/post-build-steps-win.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@echo off

setlocal enabledelayedexpansion

set "TARGET_PLATFORM=%~1"
set "TARGET_TYPE=%~2"
set "TARGET_CONFIGURATION=%~3"
set "PROJECT_FILE=%~4"
set "PLUGIN_DIR=%~5"
set "ENGINE_DIR=%~6"

:: Copy crashpad handler executable to plugin's Binaries\Linux dir if it doesn't exist there to enable cross-compilation for Linux on Windows with FAB version of the plugin
set "CRASHPAD_HANDLER_LINUX=%PLUGIN_DIR%\Binaries\Linux\crashpad_handler"
if "%TARGET_PLATFORM%"=="Linux" (
if not exist "%CRASHPAD_HANDLER_LINUX%" (xcopy "%PLUGIN_DIR%\Source\ThirdParty\Linux\bin\*" "%PLUGIN_DIR%\Binaries\Linux\" /F /R /Y /I)
)

:: Copy crashpad handler executable to plugin's Binaries\Win64 dir if it doesn't exist there to ensure FAB version of the plugin works correctly - Epic obfuscates any extra binaries when pre-building the plugin
set "CRASHPAD_HANDLER_WIN=%PLUGIN_DIR%\Binaries\Win64\crashpad_handler.exe"
if "%TARGET_PLATFORM%"=="Win64" (
if not exist "%CRASHPAD_HANDLER_WIN%" (xcopy "%PLUGIN_DIR%\Source\ThirdParty\Win64\Crashpad\bin\*" "%PLUGIN_DIR%\Binaries\Win64\" /F /R /Y /I)
)

:: Skip commandlet execution for Editor target type
if "%TARGET_TYPE%"=="Editor" (
echo Sentry: Automatic symbols upload is not required for Editor target. Skipping...
exit /B 0
)

for /f "tokens=2 delims=:, " %%i in ('type "%PROJECT_FILE%" ^| findstr /C:"EngineAssociation"') do set "ENGINE_VERSION=%%~i"
set "ENGINE_VERSION=!ENGINE_VERSION:~0,1!"

if "!ENGINE_VERSION!"=="4" (set "EDITOR_EXE=%ENGINE_DIR%\Binaries\Win64\UE4Editor-Cmd.exe") else (set "EDITOR_EXE=%ENGINE_DIR%\Binaries\Win64\UnrealEditor-Cmd.exe")

"!EDITOR_EXE!" "%PROJECT_FILE%" -run=SentrySymbolUpload -target-platform=%TARGET_PLATFORM% -target-type=%TARGET_TYPE% -target-configuration=%TARGET_CONFIGURATION% -unattended -nopause

endlocal

exit /B 0
183 changes: 0 additions & 183 deletions plugin-dev/Scripts/upload-debug-symbols-win.bat

This file was deleted.

Loading
Loading