Skip to content

Commit

Permalink
dll
Browse files Browse the repository at this point in the history
  • Loading branch information
petiaccja committed Mar 22, 2024
1 parent caf2b5e commit 82ddccf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:

- name: "Install core"
run: |
cp ${{github.workspace}}/core_binary/*SEDManagerCAPI* ${{github.workspace}}/src/SEDManagerGUI/
cp ${{github.workspace}}/core_binary/*SEDManagerCAPI* ${{github.workspace}}/src/SEDManagerGUI/${{matrix.binary_path}}
- name: "Install GUI Dart dependencies"
working-directory: ${{github.workspace}}/src/SEDManagerGUI
Expand Down
15 changes: 3 additions & 12 deletions src/SEDManagerGUI/lib/bindings/sedmanager_capi.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
// TODO:
// Use native finalizers.
// This would help with this dispose hell...
// Then I could define multiple wrapper classes properly:
// - StorageDevice
// - EncryptedDevice -> must still be dispose()-ed
// - Value
// - Type
// - Future_Void / Future_String / Future_UID / Future_Value
// https://api.dart.dev/stable/3.2.4/dart-ffi/NativeFinalizer-class.html

import 'dart:ffi';
import 'package:ffi/ffi.dart';
import 'dart:io' show Platform;
import 'package:path/path.dart' as path;

final libraryPath = Platform.isWindows ? "SEDManagerCAPI.dll" : "libSEDManagerCAPI.so";
final libraryName = Platform.isWindows ? "SEDManagerCAPI.dll" : "libSEDManagerCAPI.so";
final libraryPath = path.join(Platform.resolvedExecutable, libraryName)

typedef CUID = Uint64;

Expand Down
1 change: 1 addition & 0 deletions src/SEDManagerGUI/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dependencies:
ffi: ^2.1.0
table_sticky_headers: ^2.0.5
marquee_widget: ^1.2.0
path: ^1.8.3

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 82ddccf

Please sign in to comment.