Skip to content

Commit 92989f3

Browse files
committedFeb 8, 2025·
Add tool man pages
Not ideal, but so there is some documentation on it at least. gendef and genidl are taken from the Debian package: https://salsa.debian.org/mingw-w64-team/mingw-w64 genpeimg is written by me (CC0-1.0 if there are any questions) widl is taken from wine: https://github.com/wine-mirror/wine/blob/master/tools/widl/widl.man.in
1 parent c0c69af commit 92989f3

File tree

5 files changed

+241
-0
lines changed

5 files changed

+241
-0
lines changed
 

‎mkdocs.yml

+5
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ nav:
7676
- Build Systems:
7777
- build-systems/meson.md
7878
- build-systems/cmake.md
79+
- Tools:
80+
- gendef: tools/gendef.md
81+
- genidl: tools/genidl.md
82+
- genpeimg: tools/genpeimg.md
83+
- widl: tools/widl.md
7984
- support.md
8085
- Old Pages:
8186
- contribute.md

‎web/tools/gendef.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# gendef(1)
2+
3+
## NAME
4+
gendef - DLL export extractor
5+
6+
## SYNOPSIS
7+
**gendef** [*options*] <*DLL*>
8+
9+
## DESCRIPTION
10+
**gendef** dumps DLL export information from 32- and 64-bit Windows executables (respectively PE32 and PE32+ executables).
11+
12+
## OPTIONS
13+
- **-** - Dump to stdout
14+
- **-h**, **--help** - Briefly describe the syntax and options
15+
- **-a**, **--assume-stdcall** - Assume functions with ambiguous calling conventions use stdcall
16+
- **-I**, **--include-def-path** *path* - Add additional search paths in which to look for hint .def files
17+
- **-f**, **--no-forward-output** - Don't output forwarders
18+
19+
## OUTPUT
20+
By default **gendef** writes the DLL export information to a file named after the DLL, replacing .dll with .def.
21+
22+
## KNOWN ISSUES
23+
For 32-bit DLLs, **gendef** cannot detect if a function with no return value (void) exported by a DLL uses stdcall or cdecl. Two workarounds are available: either use the "*-a*" option to force stdcall calling conventions, or generate .def files for any DLLs the DLL you're interested in depends upon. **gendef** will read other .def files found in the working directory to determine the calling convention in use.
24+
25+
64-bit DLLs are not affected, since they only use a single calling convention.
26+
27+
## SEE ALSO
28+
**genidl**(1)
29+
30+
## AUTHORS
31+
**gendef** was written by Kai Tietz and Jonathan Yong of the MinGW-w64 project.
32+
33+
This manual page was written by Stephen Kitt <steve@sk2.org\>, based on information provided with the program and in the project's wiki, for the Debian GNU/Linux system (but may be used by others).

‎web/tools/genidl.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# genidl(1)
2+
3+
## NAME
4+
genidl - Windows typelib information extractor
5+
6+
## SYNOPSIS
7+
**genidl** [*options*] <*file*>
8+
9+
## DESCRIPTION
10+
**genidl** dumps IDL information found in typelib data present in 32- and 64-bit Windows executables and TLB files.
11+
12+
## OPTIONS
13+
**-h**, **--help**
14+
Briefly describe the syntax and options.
15+
16+
**-b** <*arg*>, **--basedumpname=**<*arg*>
17+
Use *arg* as prefix of generated .idl files.
18+
19+
**-H**, **--header**
20+
Generate a header.
21+
22+
**-d**, **--dump**
23+
Dump additional debugging information.
24+
25+
**-v**, **--verbose**
26+
Show additional status information.
27+
28+
## SEE ALSO
29+
**gendef**(1)
30+
31+
## AUTHORS
32+
**genidl** was written by Kai Tietz and Jonathan Yong of the MinGW-w64 project.
33+
34+
This manual page was written by Stephen Kitt <steve@sk2.org\> for the Debian GNU/Linux system (but may be used by others).

‎web/tools/genpeimg.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# genpeimg(1)
2+
3+
## NAME
4+
genpeimg - Modify Portable Executable flags and properties
5+
6+
## SYNOPSIS
7+
**genpeimg** [*options*] *files*...
8+
9+
## DESCRIPTION
10+
genpeimg is a tool for modifying characteristics and properties of Portable Executable (PE) files. It can modify PE header characteristics, DLL characteristics, and the subsystem type.
11+
12+
## OPTIONS
13+
14+
**-p [+|-]flags**
15+
Modify PE header characteristics. Flags can be prefixed with + to set or - to clear:
16+
17+
- `l` - Large address aware (32-bit only)
18+
- `r` - Removable run from swap
19+
- `n` - New run from swap
20+
- `s` - System
21+
- `u` - Up system only
22+
23+
**-d [+|-]flags**
24+
Modify DLL characteristics. Flags can be prefixed with + to set or - to clear:
25+
26+
- `e` - High entropy VA
27+
- `d` - Dynamic base
28+
- `f` - Force integrity
29+
- `n` - NX compatible
30+
- `i` - No isolation
31+
- `s` - No SEH
32+
- `b` - No bind
33+
- `a` - App container
34+
- `w` - WDM driver
35+
- `c` - Control flow guard
36+
- `t` - Terminal server aware
37+
38+
**-s subsystem**
39+
Set the PE subsystem. Valid values are:
40+
41+
- BOOT_APPLICATION
42+
- CONSOLE
43+
- EFI_APPLICATION
44+
- EFI_BOOT_SERVICE_DRIVER
45+
- EFI_ROM
46+
- EFI_RUNTIME_DRIVER
47+
- NATIVE
48+
- POSIX
49+
- WINDOWS
50+
- OS2
51+
- NATIVE_WINDOWS9X
52+
- WINDOWS_CE
53+
- XBOX
54+
- UNKNOWN
55+
56+
Or a numeric value.
57+
58+
**-x**
59+
Dump PE image information to stdout
60+
61+
**-h**
62+
Show help information
63+
64+
## AUTHORS
65+
66+
This manual page was written by Christoph Reiter <reiter.christoph@gmail.com\>.

‎web/tools/widl.md

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# widl(1)
2+
3+
## NAME
4+
widl - Wine Interface Definition Language (IDL) compiler
5+
6+
## SYNOPSIS
7+
8+
**widl** [*options*] *IDL_file*
9+
10+
**widl** [*options*] --dlldata-only *name1* [*name2...*]
11+
12+
## DESCRIPTION
13+
14+
When no options are used the program will generate a header file, and possibly client and server stubs, proxy and dlldata files, a typelib, and a UUID file, depending on the contents of the IDL file. If any of the options `-c`, `-h`, `-p`, `-s`, `-t`, `-u` or `--local-stubs` is given, `widl` will only generate the requested files, and no others. When run with `--dlldata-only`, widl will only generate a dlldata file, and it will contain a list of the names passed as arguments. Usually the way this file is updated is that each time `widl` is run, it reads any existing dlldata file, and if necessary regenerates it with the same list of names, but with the present proxy file included.
15+
16+
When run without any arguments, `widl` will print a help message.
17+
18+
## OPTIONS
19+
20+
### General options:
21+
22+
- `-V` - Print version number and exit.
23+
- `-o, --output=name` - Set the name of the output file. When generating multiple output files, this sets only the base name of the file; the respective output files are then named *name*.h, *name*_p.c, etc.
24+
- `-b cpu-manufacturer[-kernel]-os` - Set the target architecture when cross-compiling. The target specification is in the standard autoconf format as returned by `config.sub`.
25+
26+
### Header options:
27+
28+
- `-h` - Generate header files. The default output filename is *infile*.h.
29+
- `--oldnames` - Use old naming conventions.
30+
31+
### Type library options:
32+
33+
- `-t` - Generate a type library. The default output filename is *infile*.tlb. If the output file name ends in `.res`, a binary resource file containing the type library is generated instead.
34+
- `-m32, -m64` - Generate a Win32 or Win64 type library respectively.
35+
36+
### UUID file options:
37+
38+
- `-u` - Generate a UUID file. The default output filename is *infile*_i.c.
39+
40+
### Proxy/stub generation options:
41+
42+
- `-c` - Generate a client stub file. The default output filename is *infile*_c.c.
43+
- `-Os` - Generate inline stubs.
44+
- `-Oi` - Generate old-style interpreted stubs.
45+
- `-Oif, -Oic, -Oicf` - Generate new-style fully interpreted stubs.
46+
- `-p` - Generate a proxy. The default output filename is *infile*_p.c.
47+
- `--prefix-all=prefix` - Prefix to put on the name of both client and server stubs.
48+
- `--prefix-client=prefix` - Prefix to put on the name of client stubs.
49+
- `--prefix-server=prefix` - Prefix to put on the name of server stubs.
50+
- `-s` - Generate a server stub file. The default output filename is *infile*_s.c.
51+
- `--win32`, `--win64` - Only generate 32-bit or 64-bit code respectively (the default is to generate both 32-bit and 64-bit versions into the same destination file).
52+
- `--rt` - Enable additional language extensions for IDL to support WinRT.
53+
54+
### Registration script options:
55+
56+
- `-r` - Generate a registration script. The default output filename is *infile*_r.rgs. If the output file name ends in `.res`, a binary resource file containing the script is generated instead.
57+
58+
### Dlldata file options:
59+
60+
- `--dlldata-only name1 [name2...]` - Regenerate the dlldata file from scratch using the specified proxy names. The default output filename is `dlldata.c`.
61+
62+
### Preprocessor options:
63+
64+
- `-I path` - Add a header search directory to path. Multiple search directories are allowed.
65+
- `-D id[=val]` - Define preprocessor macro *id* with value *val*.
66+
- `-E` - Preprocess only.
67+
- `-N` - Do not preprocess input.
68+
69+
### Debug options:
70+
71+
- `-W` - Enable pedantic warnings.
72+
- `-d n` - Set debug level to the non negative integer *n*. If prefixed with `0x`, it will be interpreted as a hexadecimal number. For the meaning of values, see the DEBUG section.
73+
74+
### Miscellaneous options:
75+
76+
- `-app_config` - Ignored, present for midl compatibility.
77+
- `--local-stubs=file` - Generate empty stubs for call_as/local methods in an object interface and write them to *file*.
78+
79+
## DEBUG
80+
81+
Debug level *n* is a bitmask with the following meaning:
82+
- 0x01 Tell which resource is parsed (verbose mode)
83+
- 0x02 Dump internal structures
84+
- 0x04 Create a parser trace (yydebug=1)
85+
- 0x08 Preprocessor messages
86+
- 0x10 Preprocessor lex messages
87+
- 0x20 Preprocessor yacc trace
88+
89+
## BUGS
90+
91+
Bugs can be reported on the [Wine bug tracker](http://bugs.winehq.org).
92+
93+
## AUTHORS
94+
95+
`widl` was originally written by Ove Kåven. It has been improved by Rob Shearman, Dan Hipschman, and others. For a complete list, see the git commit logs. This man page was originally written by Hannu Valtonen and then updated by Dan Hipschman.
96+
97+
## AVAILABILITY
98+
99+
`widl` is part of the Wine distribution, which is available through WineHQ, the [Wine development headquarters](http://www.winehq.org/).
100+
101+
## SEE ALSO
102+
103+
[Wine documentation and support](http://www.winehq.org/help)

0 commit comments

Comments
 (0)
Please sign in to comment.