diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index ac830908..fe3f1486 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -14,6 +14,8 @@ This is a simplified, Flutter-only wrapper around the underlying 3D rendering AP Follow the steps listed in [Getting Started](./getting_started) to configure your Flutter installation and project. +If you're running Windows, delete the `examples/flutter/quickstart/assets` symlink and copy the `assets` folder from `examples/assets` to `examples/flutter/quickstart/assets`. + ## Basic Usage ```dart diff --git a/thermion_dart/hook/build.dart b/thermion_dart/hook/build.dart index 636a1010..030c0d4d 100644 --- a/thermion_dart/hook/build.dart +++ b/thermion_dart/hook/build.dart @@ -131,7 +131,7 @@ void main(List args) async { var frameworks = []; - if (platform != "windows") { + if (targetOS != OS.windows) { flags.addAll(['-std=c++17']); } else { defines["WIN32"] = "1"; @@ -194,7 +194,7 @@ void main(List args) async { name: packageName, language: Language.cpp, assetName: 'thermion_dart.dart', - sources: platform == "windows" ? [] : sources, + sources: targetOS == OS.windows ? [] : sources, includes: platform == "windows" ? [] : ['native/include', 'native/include/filament'], @@ -220,12 +220,12 @@ void main(List args) async { "/I${path.join(pkgRootFilePath, "native", "include", "windows", "vulkan")}", "@${srcs.uri.toFilePath(windows: true)}", // ...sources, - '/link', - "/LIBPATH:$libDir", - '/DLL', + // '/link', + // "/LIBPATH:$libDir", + // '/DLL', ] ], - dartBuildFiles: ['hook/build.dart'], + libraryDirectories: [libDir], ); await cbuilder.run( diff --git a/thermion_dart/native/include/ThermionWin32.h b/thermion_dart/native/include/ThermionWin32.h index 845323b0..794b8ae5 100644 --- a/thermion_dart/native/include/ThermionWin32.h +++ b/thermion_dart/native/include/ThermionWin32.h @@ -25,7 +25,6 @@ #pragma comment(lib, "dracodec.lib") #pragma comment(lib, "ibl.lib") #pragma comment(lib, "ktxreader.lib") -#pragma comment(lib, "png.lib") #pragma comment(lib, "z.lib") #pragma comment(lib, "stb.lib") #pragma comment(lib, "uberzlib.lib") diff --git a/thermion_dart/native/include/c_api/TCamera.h b/thermion_dart/native/include/c_api/TCamera.h index 944952e4..8d59da17 100644 --- a/thermion_dart/native/include/c_api/TCamera.h +++ b/thermion_dart/native/include/c_api/TCamera.h @@ -1,5 +1,9 @@ #pragma once +#ifdef _WIN32 +#include "ThermionWin32.h" +#endif + #ifdef __cplusplus namespace thermion { extern "C"