Files
templates/doc/build-doxygen.ps1

33 lines
1.1 KiB
PowerShell
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.
# Генерация справочника API из Doxygen-комментариев исходников. Скрипт связывает конфигурацию
# Doxyfile с каталогом результата; HTML является производным артефактом и не заменяет
# комментарии в коде.
[CmdletBinding()]
param()
$ErrorActionPreference = 'Stop'
$repositoryRoot = Split-Path -Parent $PSScriptRoot
$doxygen = Get-Command doxygen -ErrorAction SilentlyContinue
if (-not $doxygen) {
throw 'Doxygen не найден в PATH. Установите Doxygen и повторите запуск.'
}
Push-Location $repositoryRoot
try {
& $doxygen.Source Doxyfile
if ($LASTEXITCODE -ne 0) {
throw "Doxygen завершился с кодом $LASTEXITCODE."
}
}
finally {
Pop-Location
}
$indexPath = Join-Path $repositoryRoot '.codex-build\doxygen\html\index.html'
if (-not (Test-Path -LiteralPath $indexPath)) {
throw "Doxygen не создал ожидаемый файл: $indexPath"
}
Write-Host "[DONE] Doxygen HTML: $indexPath"