fix generate script to work with new ffigen

This commit is contained in:
Henry Hiles 2026-09-10 15:15:12 -04:00
commit 51ef66174a
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -1,4 +1,5 @@
import "dart:io";
import "package:ffigen/ffigen.dart";
import "package:path/path.dart";
import "package:nexus/helpers/extensions/get_xcode_sdk.dart";
@ -11,16 +12,17 @@ void main(List<String> args) async {
final libclangPath = Platform.environment["LIBCLANG_PATH"];
FfiGenerator(
output: Output(
dartFile: Platform.script.resolve("../lib/src/third_party/gomuks.g.dart"),
dart: .new(
path: Platform.script.resolve("../lib/src/third_party/gomuks.g.dart"),
),
headers: Headers(
),
input: .new(
entryPoints: [File(join(repoDir.path, "pkg", "ffi", "gomuksffi.h")).uri],
compilerOptions: [
"--no-warnings",
if (Platform.isMacOS) "-I${await getXCodeTool()}/usr/include",
],
),
functions: Functions.includeAll,
).generate(
libclangDylib: libclangPath == null
? null