Skip to content

Commit af305ac

Browse files
committed
Now Build and run Sample with 3.2.6
1 parent f010d0c commit af305ac

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed

Diff for: .vscode/launch.json

+11-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@
55
"version": "0.2.0",
66
"configurations": [
77
{
8-
"name": "Dart: Attach to Simple",
9-
"type": "dart",
10-
"request": "attach",
11-
"vmServiceUri": "http://127.0.0.1:5858/"
8+
9+
"name": "(WIN)RealTime Sample",
10+
"type": "cppvsdbg",
11+
"request": "launch",
12+
//"preLaunchTask": "buildSimpelTest",
13+
"program": "${workspaceFolder}/build/Debug/realtime_example.exe",
14+
"args": [],
15+
"stopAtEntry": false,
16+
"cwd": "${fileDirname}",
17+
"environment": [],
18+
"console": "externalTerminal"
1219
}
1320
]
1421
}

Diff for: examples/realtime_example/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ set(CMAKE_CXX_STANDARD 17)
66
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
77

88
set(CUTE_FRAMEWORK_STATIC ON)
9+
set(CF_FRAMEWORK_BUILD_TESTS OFF)
10+
# Samples Build on Windows Falied
11+
set(CF_FRAMEWORK_BUILD_SAMPLES OFF)
912

1013
include(FetchContent)
1114
FetchContent_Declare(

Diff for: examples/realtime_example/dart/drawable.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'dart:ffi';
22

3-
class CF_Color extends Struct {
3+
final class CF_Color extends Struct {
44
@Float()
55
external double r;
66

@@ -14,7 +14,7 @@ class CF_Color extends Struct {
1414
external double a;
1515
}
1616

17-
class Drawable extends Struct {
17+
final class Drawable extends Struct {
1818
@Int32()
1919
external int x;
2020

Diff for: examples/realtime_example/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: worm_example
22
environment:
3-
sdk: ">=2.17.0 <3.0.0"
3+
sdk: ">=3.0.0 <4.0.0"
44

55
dependencies:
66
ffi: ^2.0.1

Diff for: examples/realtime_example/main.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ bool init_dart() {
2020
DartDllConfig config;
2121
DartDll_Initialize(config);
2222

23+
//if package_config.json not exits run pub get
2324
_dart_isolate = DartDll_LoadScript("dart/main.dart",
2425
"dart/.dart_tool/package_config.json");
2526
if (_dart_isolate == nullptr) {

Diff for: src/isolate_setup.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Dart_Isolate CreateIsolate(bool is_main_isolate,
221221
int exit_code = 0;
222222
dfe.CompileAndReadScript(script_uri, &application_kernel_buffer,
223223
&application_kernel_buffer_size, error, &exit_code,
224-
resolved_packages_config, true);
224+
resolved_packages_config, true, false);
225225
if (application_kernel_buffer == nullptr) {
226226
std::cerr << "Error reading Dart script " << script_uri << ": " << *error
227227
<< std::endl;

0 commit comments

Comments
 (0)