Skip to content

Commit

Permalink
change expected path to the crashpad handler
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Nov 21, 2024
1 parent b25bb77 commit 9495f39
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,6 @@ jobs:
;;
esac
- name: Upload temp artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: native-test-temp
path: flutter/temp

analyze:
uses: ./.github/workflows/analyze.yml
with:
Expand Down
4 changes: 1 addition & 3 deletions flutter/lib/src/native/c/sentry_native.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ class SentryNative with SentryNativeSafeInvoker implements SentryNativeBinding {
static String dynamicLibraryDirectory = '';

@visibleForTesting
static String? crashpadPath = Platform.isLinux
? '${path.dirname(Platform.resolvedExecutable)}/bin/crashpad_handler'
: null;
static String? crashpadPath;

SentryNative(this.options);

Expand Down
8 changes: 5 additions & 3 deletions flutter/sentry-native/sentry-native.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ FetchContent_Declare(
FetchContent_MakeAvailable(sentry-native)

# List of absolute paths to libraries that should be bundled with the plugin.
# This list could contain prebuilt libraries, or libraries created by an
# external build triggered from this build file.
# On Linux, we don't need to explicitly add crashpad_handler - it's coppied to `bin/crashpad_handler` automatically.
# This list could contain prebuilt libraries, or libraries created by an external build triggered from this build file.
if(WIN32)
set(sentry_flutter_bundled_libraries
$<TARGET_FILE:crashpad_handler>
$<TARGET_FILE:crashpad_wer>
PARENT_SCOPE)
else()
set(sentry_flutter_bundled_libraries
$<TARGET_FILE:crashpad_handler>
PARENT_SCOPE)
endif()

# `*_plugin` is the name of the plugin library as expected by flutter.
Expand Down
4 changes: 2 additions & 2 deletions flutter/test/sentry_native/sentry_native_test_ffi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void main() {

expectedDistFiles = platform.instance.isWindows
? ['sentry.dll', 'crashpad_handler.exe', 'crashpad_wer.dll']
: ['libsentry.so', 'bin/crashpad_handler'];
: ['libsentry.so', 'crashpad_handler'];

setUpAll(() async {
Directory.current =
Expand Down Expand Up @@ -282,7 +282,7 @@ set(CMAKE_INSTALL_PREFIX "${buildOutputDir.replaceAll('\\', '/')}")
'Release',
]);
if (platform.instance.isLinux) {
await _exec('chmod', ['+x', '$buildOutputDir/bin/crashpad_handler']);
await _exec('chmod', ['+x', '$buildOutputDir/crashpad_handler']);
}
}
return buildOutputDir;
Expand Down

0 comments on commit 9495f39

Please sign in to comment.