| 1 |
# Windows module |
| 2 |
|
| 3 |
This module provides functionality used to build applications for |
| 4 |
Windows. |
| 5 |
|
| 6 |
## Methods |
| 7 |
|
| 8 |
### compile_resources |
| 9 |
|
| 10 |
``` |
| 11 |
windows = import('windows') |
| 12 |
windows.compile_resources(...(string | File | CustomTarget | CustomTargetIndex), |
| 13 |
args: []string, |
| 14 |
depend_files: [](string | File), |
| 15 |
depends: [](BuildTarget | CustomTarget | CustomTargetIndex) |
| 16 |
include_directories: [](IncludeDirectories | string)): []CustomTarget |
| 17 |
``` |
| 18 |
|
| 19 |
Compiles Windows `rc` files specified in the positional arguments. |
| 20 |
Returns a list of `CustomTarget` objects that you put in the list of sources for |
| 21 |
the target you want to have the resources in. |
| 22 |
|
| 23 |
*Since 0.61.0* CustomTargetIndexes and CustomTargets with more than out output |
| 24 |
*may be used as positional arguments. |
| 25 |
|
| 26 |
This method has the following keyword arguments: |
| 27 |
|
| 28 |
- `args` lists extra arguments to pass to the resource compiler |
| 29 |
- `depend_files` lists resource files that the resource script depends on |
| 30 |
(e.g. bitmap, cursor, font, html, icon, message table, binary data or manifest |
| 31 |
files referenced by the resource script) (*since 0.47.0*) |
| 32 |
- `depends` lists target(s) that this target depends on, even though it does not |
| 33 |
take them as an argument (e.g. as above, but generated) (*since 0.47.0*) |
| 34 |
- `include_directories` lists directories to be both searched by the resource |
| 35 |
compiler for referenced resource files, and added to the preprocessor include |
| 36 |
search path. |
| 37 |
|
| 38 |
The resource compiler executable used is the first which exists from the |
| 39 |
following list: |
| 40 |
|
| 41 |
1. The `windres` executable given in the `[binaries]` section of the cross-file |
| 42 |
2. The `WINDRES` environment variable |
| 43 |
3. The resource compiler which is part of the same toolset as the C or C++ compiler in use. |