You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-31Lines changed: 27 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,50 +15,46 @@ Additionally we may have a static target that uses the same interface as the dyn
15
15
16
16
I also hope to support all platforms that Dart currently supports, plus a few extra.
17
17
18
-
## Current Progress
19
-
20
-
A very, very simple Dart script works.
21
-
22
18
## Using
23
19
24
-
`TODO:`
20
+
Lastest builds of the libraries are now available for certain targets as artifacts from [Github Actions](https://github.com/fuzzybinary/dart_shared_libray/actions) as well as all the headers necessary.
21
+
22
+
Github Actions currently builds a Windows x64 `.dll`, A Linux x64 `.so`, and a macOS x64 `.dylib`. You can build a M-series dylib for macOS, but Github Actions does not currently support it.
25
23
26
24
## Building
27
25
28
26
### Prerequisets
29
-
You need
27
+
You need:
30
28
* git
31
-
*All the things to get Dart source - https://github.com/dart-lang/sdk/wiki/Building#source
29
+
* Dart 3+
32
30
* C++ build tools for your platform (Visual Studio, XCode, gcc, etc)
33
31
* CMake
34
32
35
-
## Contributing
33
+
Optionally, I recommend installing [`depot_tools`](https://www.chromium.org/developers/how-tos/depottools/) and making sure it is on your path before running setup scripts. Without depot_tools, the scripts will download them anyway, but having them already set up will save you some time with subsequent builds.
36
34
37
-
`TODO:`
35
+
### Patching and Building Dart
38
36
39
-
# What I Did
37
+
> NOTE: If you are building on Windows, I recommend running `.\setup_env.ps1` before executing any other scripts.
38
+
> This will set up some environment variables that will be needed to build Dart properly.
40
39
41
-
This section is as much for my benefit as for yours. Eventually, I hope to make a script that will do most of this.
40
+
The first step is to build a statically linkable verison of Dart. This requires that we download Dart, patch some of the Dart build files, and then run the actual build. Thankfully there is a Dart script to do this.
42
41
43
-
* Modify the BUILD.gn files to add a `libdart` target. This is done by applying the patch in `./dart_sdk.patch`
44
-
* Make sure all correct environment variables are set
45
-
* On Windows, these are set with the `setup_env.ps1` script. Specifically, you need to set `GYP_MSVS_OVERRIDE_PATH`, `GYP_MSVS_VERSION`, and `DEPOT_TOOLS_WIN_TOOLCHAIN=0`
46
-
* Builds libdart with:
47
-
```bash
48
-
# On windows, you will need to add `python` in front
49
-
./tools/build.py --no-goma -m release libdart
50
-
```
51
-
* Revert the changes made to build files to leave a clean copy of the dart-sdk (this makes updating easier)
52
-
* Build with CMake:
53
-
```
54
-
cmake -B ./.build .
55
-
cmake --build ./.build
42
+
```bash
43
+
dart ./scripts/build_helpers/bin/build_dart.dart
56
44
```
57
45
58
-
Updating the dart-sdk
59
-
* Make sure environment variables are set (`setup_env.ps1`)
0 commit comments