Files
dcr/docs-crowdin-export/ru-RU/docs/commands/gen-commands.mdx.mdx
2026-07-06 02:21:01 +08:00

74 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
sidebar_label: Gen команды (vscode, clion, ...)
---
# Gen команды
## `dcr gen \<target>`
Генерирует файл интеграции с IDE.
### vscode
```bash
dcr gen vscode
```
Создаёт:
* `.vscode/tasks.json` — `build` задача (dcr build)
* `.vscode/launch.json` — конфигурация запуска отладки
* `.vscode/settings.json` — настройки C/C++ (clangd пути, includes)
* `.vscode/extensions.json` — рекомендуемые расширения (vscode-clangd, vscode-lldb)
### clion
```bash
dcr gen clion
```
Создаёт:
* `.idea/externalTools.xml` — внешние инструменты (build, run, clean, test)
* `.idea/customTargets.xml` — пользовательские цели сборки
* `.idea/misc.xml` — настройки C/C++ проекта
* `.idea/runConfigurations/\<name>.xml` — конфигурация запуска
### compile-commands
```bash
dcr gen compile-commands
```
Генерирует `compile_commands.json` — стандартный формат для clangd, cpptools, статических анализаторов.
### project-info
```bash
dcr gen project-info
```
Выводит JSON с метаданными проекта:
```json
[
{
"name": "my-app",
"version": "0.1.0",
"root": "/path/to/project",
"profile": "debug",
"language": "c",
"standard": "c17",
"cxx_standard": null,
"compiler": "/usr/bin/clang",
"kind": "bin",
"sources": ["src/main.c"],
"include_dirs": ["src"],
"lib_dirs": [],
"libs": [],
"cflags": ["-std=c17", "-O0", "-g"],
"ldflags": []
}
]
```