diff --git a/tools/README.md b/tools/README.md index 553904d5e..08f4c2b89 100644 --- a/tools/README.md +++ b/tools/README.md @@ -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: +## Code-generation tools -The metadata is extracted and parsed using the separate winmd package: - +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