fix generate script to work with new ffigen
This commit is contained in:
parent
1efb68ebe0
commit
51ef66174a
1 changed files with 5 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import "dart:io";
|
import "dart:io";
|
||||||
|
|
||||||
import "package:ffigen/ffigen.dart";
|
import "package:ffigen/ffigen.dart";
|
||||||
import "package:path/path.dart";
|
import "package:path/path.dart";
|
||||||
import "package:nexus/helpers/extensions/get_xcode_sdk.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"];
|
final libclangPath = Platform.environment["LIBCLANG_PATH"];
|
||||||
FfiGenerator(
|
FfiGenerator(
|
||||||
output: Output(
|
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],
|
entryPoints: [File(join(repoDir.path, "pkg", "ffi", "gomuksffi.h")).uri],
|
||||||
compilerOptions: [
|
compilerOptions: [
|
||||||
"--no-warnings",
|
"--no-warnings",
|
||||||
if (Platform.isMacOS) "-I${await getXCodeTool()}/usr/include",
|
if (Platform.isMacOS) "-I${await getXCodeTool()}/usr/include",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
functions: Functions.includeAll,
|
|
||||||
).generate(
|
).generate(
|
||||||
libclangDylib: libclangPath == null
|
libclangDylib: libclangPath == null
|
||||||
? null
|
? null
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue