-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d41a00b
commit e6f2ea1
Showing
1 changed file
with
22 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,42 @@ | ||
This folder contains utilities to help with developing the win32 package. | ||
# Tools | ||
|
||
# Code-generation tools | ||
This directory contains utilities to help with developing the `package:win32`. | ||
|
||
The Win32 and COM APIs available in this package are generated from metadata | ||
supplied by Microsoft. The metadata is in the form of an ECMA-335 specification | ||
file, generated from this repo: <https://github.com/microsoft/win32metadata> | ||
## Code-generation tools | ||
|
||
The metadata is extracted and parsed using the separate winmd package: | ||
<https://pub.dev/packages/winmd> | ||
The Win32 and COM APIs available in this package are generated from | ||
[win32metadata]. The metadata is in the form of an ECMA-335 specification | ||
file, and extracted and parsed using the separate [winmd] package. | ||
|
||
Not every API is projected. | ||
|
||
- For Win32 APIs, the JSON files prefixed with `win32_` in the `generator\data` | ||
directory are used to determine which APIs to project. | ||
- For COM APIs, the `com_types.json` file in the `generator\data` directory | ||
explicitly names the types that should be projected. | ||
- For Win32 APIs, the JSON files prefixed with `win32_` in the | ||
[packages\generator\data] directory are used to determine which APIs to | ||
project. | ||
- For COM APIs, the [com_types.json] file in the [packages\generator\data] | ||
directory explicitly names the types that should be projected. | ||
|
||
During the build process, you should call `generate.cmd` from the project root | ||
to instantiate these types and generate the classes from them, for example: | ||
|
||
```terminal | ||
C:\src\win32> tools\generate.cmd | ||
tools\generate.cmd | ||
``` | ||
|
||
This tool will also test both the generation library and the generated output | ||
with unit tests. | ||
|
||
# Other utilities | ||
## Other utilities | ||
|
||
This folder also includes a few other small utilities of limited usefulness. | ||
|
||
- `build.cmd`. Generates EXE files for some of the Dart samples. | ||
- `struct_sizes\struct_sizes.cpp`. Measures the size of structs in | ||
structs.g.dart on 64-bit architectures so the appropriate unit tests can be | ||
generated. | ||
[packages\win32\lib\src\structs.g.dart] on 64-bit architectures so the | ||
appropriate unit tests can be generated. | ||
- `build.cmd`. Generates EXE files for some of the Dart examples. | ||
|
||
[com_types.json]: ../packages/generator/data/com_types.json | ||
[packages\generator\data]: ../packages/generator/data | ||
[packages\win32\lib\src\structs.g.dart]: ../packages/win32/lib/src/structs.g.dart | ||
[win32metadata]: https://github.com/microsoft/win32metadata | ||
[winmd]: https://pub.dev/packages/winmd |