fix: fix Windows build.dart
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -131,7 +131,7 @@ void main(List<String> 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<String> 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<String> 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(
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "ThermionWin32.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace thermion {
|
||||
extern "C"
|
||||
|
||||
Reference in New Issue
Block a user