aboutsummaryrefslogtreecommitdiffstats
path: root/doc/README.md
blob: 12f3bc07fc67153e5072b5d6d87a8b949c9834bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Qt Extension for VS Code Documentation

The `doc` folder contains the sources for building Qt Extension for VS Code.

## Building the documentation using CMake

The `doc` folder contains a CMake project configuration for the documentation build.

### On Windows, in a separate doc build folder
1. `md vscodeext-docs`
1. `cd vscodeext-docs`
1. `<\path\to\Qt>\bin\qt-cmake -GNinja -DQT_BUILD_ONLINE_DOCS=ON <path\to\vscodeext\doc>`
1. For example: `C:\Qt\6.8.0\msvc2022_64\bin\qt-cmake.bat -GNinja C:\dev\vscodeext\doc`
1. `ninja html_docs`

The output is then generated under `\html` in the build directory.
Omit `-DQT_BUILD_ONLINE_DOCS=ON` if building offline documentation.

### On Linux in a build subfolder
1. `mkdir -p doc/build`
1. `cd doc/build`
1. `</path/to/Qt>/bin/qt-cmake -GNinja -DQT_BUILD_ONLINE_DOCS=ON ..`
1. `ninja html_docs`

The output is then generated under `/html` in the build directory.
Omit `-DQT_BUILD_ONLINE_DOCS=ON` if building offline documentation.

## Running QDoc directly

Alternatively, you can call QDoc directly to build the documentation locally.

### On Windows

On the command-line, enter:

1. Set the path to the directory where you installed Qt documentation:
   `set QT_INSTALL_DOCS=C:\Qt\Docs\Qt-6.8.0`
2. Set the Qt version:
   `set QT_VER=6.8.0`
   `set QT_VERSION=6.8.0`
4. Enter the path to QDoc and the documentation configuration file:
   `C:\Qt\6.8.0\msvc2022_64\bin\qdoc.exe -indexdir %QT_INSTALL_DOCS% doc\online\vscodeext.qdocconf`

For example:

`set QT_INSTALL_DOCS=C:\Qt\Docs\Qt-6.8.0
 set QT_VER=6.8.0
 set QT_VERSION=6.8.0
 C:\Qt\6.8.0\msvc2022_64\bin\qdoc.exe -indexdir %QT_INSTALL_DOCS% doc\online\vscodeext.qdocconf`

The documentation is generated in the `doc\html` folder.

### On Linux

On the command-line, enter:

`QT_INSTALL_DOCS=~/Qt/Docs/Qt-6.8.0 ~/Qt/6.8.0/gcc_64/bin/qdoc -indexdir $QT_INSTALL_DOCS doc/online/vscodeext.qdocconf`