docs: use doxygen-awesome-css (#2758)
This commit is contained in:
parent
cac1ca37aa
commit
7e9a2dd621
10 changed files with 166 additions and 9 deletions
26
.github/workflows/CI.yml
vendored
26
.github/workflows/CI.yml
vendored
|
|
@ -992,7 +992,6 @@ jobs:
|
||||||
pacman -U --noconfirm mingw-w64-ucrt-x86_64-curl-8.8.0-1-any.pkg.tar.zst
|
pacman -U --noconfirm mingw-w64-ucrt-x86_64-curl-8.8.0-1-any.pkg.tar.zst
|
||||||
pacman -Syu --noconfirm \
|
pacman -Syu --noconfirm \
|
||||||
--ignore=mingw-w64-ucrt-x86_64-curl \
|
--ignore=mingw-w64-ucrt-x86_64-curl \
|
||||||
doxygen \
|
|
||||||
git \
|
git \
|
||||||
mingw-w64-ucrt-x86_64-boost \
|
mingw-w64-ucrt-x86_64-boost \
|
||||||
mingw-w64-ucrt-x86_64-cmake \
|
mingw-w64-ucrt-x86_64-cmake \
|
||||||
|
|
@ -1007,6 +1006,31 @@ jobs:
|
||||||
mingw-w64-ucrt-x86_64-opus \
|
mingw-w64-ucrt-x86_64-opus \
|
||||||
mingw-w64-ucrt-x86_64-toolchain
|
mingw-w64-ucrt-x86_64-toolchain
|
||||||
|
|
||||||
|
- name: Install Doxygen
|
||||||
|
# GCC compiled doxygen has issues when running graphviz
|
||||||
|
env:
|
||||||
|
DOXYGEN_VERSION: "1.11.0"
|
||||||
|
run: |
|
||||||
|
# Set version variables
|
||||||
|
$doxy_ver = $env:DOXYGEN_VERSION
|
||||||
|
$_doxy_ver = $doxy_ver.Replace(".", "_")
|
||||||
|
|
||||||
|
# Download the Doxygen installer
|
||||||
|
Invoke-WebRequest -Uri `
|
||||||
|
"https://github.com/doxygen/doxygen/releases/download/Release_${_doxy_ver}/doxygen-${doxy_ver}-setup.exe" `
|
||||||
|
-OutFile "doxygen-setup.exe"
|
||||||
|
|
||||||
|
# Run the installer
|
||||||
|
Start-Process `
|
||||||
|
-FilePath .\doxygen-setup.exe `
|
||||||
|
-ArgumentList `
|
||||||
|
'/VERYSILENT' `
|
||||||
|
-Wait `
|
||||||
|
-NoNewWindow
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
Remove-Item -Path doxygen-setup.exe
|
||||||
|
|
||||||
- name: Setup python
|
- name: Setup python
|
||||||
# use this instead of msys2 python due to known issues using wheels, https://www.msys2.org/docs/python/
|
# use this instead of msys2 python due to known issues using wheels, https://www.msys2.org/docs/python/
|
||||||
id: setup-python
|
id: setup-python
|
||||||
|
|
|
||||||
4
.gitmodules
vendored
4
.gitmodules
vendored
|
|
@ -10,6 +10,10 @@
|
||||||
path = third-party/build-deps
|
path = third-party/build-deps
|
||||||
url = https://github.com/LizardByte/build-deps.git
|
url = https://github.com/LizardByte/build-deps.git
|
||||||
branch = dist
|
branch = dist
|
||||||
|
[submodule "third-party/doxygen-awesome-css"]
|
||||||
|
path = third-party/doxygen-awesome-css
|
||||||
|
url = https://github.com/jothepro/doxygen-awesome-css.git
|
||||||
|
branch = main
|
||||||
[submodule "third-party/googletest"]
|
[submodule "third-party/googletest"]
|
||||||
path = third-party/googletest
|
path = third-party/googletest
|
||||||
url = https://github.com/google/googletest/
|
url = https://github.com/google/googletest/
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,8 @@ version: 2
|
||||||
build:
|
build:
|
||||||
os: ubuntu-24.04
|
os: ubuntu-24.04
|
||||||
tools:
|
tools:
|
||||||
python: "3.11"
|
python: "miniconda-latest"
|
||||||
apt_packages:
|
apt_packages:
|
||||||
- graphviz # required to build diagrams
|
|
||||||
- libboost-locale-dev # required for rstcheck in cpp code block
|
- libboost-locale-dev # required for rstcheck in cpp code block
|
||||||
jobs:
|
jobs:
|
||||||
post_build:
|
post_build:
|
||||||
|
|
@ -20,6 +19,11 @@ build:
|
||||||
- rstcheck -r . # lint rst files
|
- rstcheck -r . # lint rst files
|
||||||
# - rstfmt --check --diff -w 120 . # check rst formatting
|
# - rstfmt --check --diff -w 120 . # check rst formatting
|
||||||
|
|
||||||
|
# using conda, we can get newer doxygen and graphviz than ubuntu provide
|
||||||
|
# https://github.com/readthedocs/readthedocs.org/issues/8151#issuecomment-890359661
|
||||||
|
conda:
|
||||||
|
environment: docs/environment.yml
|
||||||
|
|
||||||
# submodules required for include statements
|
# submodules required for include statements
|
||||||
submodules:
|
submodules:
|
||||||
include: all
|
include: all
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ unset(Python3_EXECUTABLE)
|
||||||
|
|
||||||
set(VENV_PATTERNS
|
set(VENV_PATTERNS
|
||||||
${VENV_DIR}/bin/python
|
${VENV_DIR}/bin/python
|
||||||
|
${VENV_DIR}/bin/python.exe
|
||||||
${VENV_DIR}/Scripts/python.exe
|
${VENV_DIR}/Scripts/python.exe
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -119,7 +120,7 @@ list(APPEND SPHINX_BUILD_EPUB_COMMAND
|
||||||
add_custom_target(docs ALL
|
add_custom_target(docs ALL
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
COMMENT "Building documentation"
|
COMMENT "Building documentation"
|
||||||
COMMAND ${SPHINX_BUILD_HTML_COMMAND}
|
COMMAND ${CMAKE_COMMAND} -E env DOXY_PATH=$<TARGET_FILE:Doxygen::doxygen> ${SPHINX_BUILD_HTML_COMMAND}
|
||||||
COMMAND ${SPHINX_BUILD_EPUB_COMMAND}
|
COMMAND ${CMAKE_COMMAND} -E env DOXY_PATH=$<TARGET_FILE:Doxygen::doxygen> ${SPHINX_BUILD_EPUB_COMMAND}
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ DOXYFILE_ENCODING = UTF-8
|
||||||
ALIASES = "rst=^^\verbatim embed:rst:leading-asterisk^^"
|
ALIASES = "rst=^^\verbatim embed:rst:leading-asterisk^^"
|
||||||
ALIASES += "endrst=\endverbatim"
|
ALIASES += "endrst=\endverbatim"
|
||||||
|
|
||||||
|
DISABLE_INDEX = NO
|
||||||
DOCBOOK_OUTPUT = doxydocbook
|
DOCBOOK_OUTPUT = doxydocbook
|
||||||
DOCSET_BUNDLE_ID = dev.lizardbyte.Sunshine
|
DOCSET_BUNDLE_ID = dev.lizardbyte.Sunshine
|
||||||
DOCSET_PUBLISHER_ID = dev.lizardbyte.Sunshine.documentation
|
DOCSET_PUBLISHER_ID = dev.lizardbyte.Sunshine.documentation
|
||||||
|
|
@ -37,15 +38,23 @@ DOT_IMAGE_FORMAT = svg
|
||||||
# TODO: On Windows, Doxygen hangs when creating dot graphs if this is set to 0
|
# TODO: On Windows, Doxygen hangs when creating dot graphs if this is set to 0
|
||||||
DOT_NUM_THREADS = 1
|
DOT_NUM_THREADS = 1
|
||||||
|
|
||||||
|
FULL_SIDEBAR = NO
|
||||||
GENERATE_HTML = YES
|
GENERATE_HTML = YES
|
||||||
GENERATE_LATEX = NO
|
GENERATE_LATEX = NO
|
||||||
|
GENERATE_TREEVIEW = YES
|
||||||
|
|
||||||
# TODO: Sphinx/Breathe does not support Objective-C right now, so disable XML
|
# TODO: Sphinx/Breathe does not support Objective-C right now, so disable XML
|
||||||
# https://github.com/breathe-doc/breathe/issues/129
|
# https://github.com/breathe-doc/breathe/issues/129
|
||||||
GENERATE_XML = NO
|
GENERATE_XML = NO
|
||||||
|
|
||||||
HAVE_DOT = YES
|
HAVE_DOT = YES
|
||||||
HTML_COLORSTYLE = TOGGLE
|
HTML_COLORSTYLE = LIGHT # required with Doxygen >= 1.9.5
|
||||||
|
HTML_EXTRA_FILES = ../third-party/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js
|
||||||
|
HTML_EXTRA_FILES += ../third-party/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js
|
||||||
|
HTML_EXTRA_FILES += ../third-party/doxygen-awesome-css/doxygen-awesome-paragraph-link.js
|
||||||
|
HTML_EXTRA_FILES += ../third-party/doxygen-awesome-css/doxygen-awesome-interactive-toc.js
|
||||||
|
HTML_EXTRA_STYLESHEET = ../third-party/doxygen-awesome-css/doxygen-awesome.css
|
||||||
|
HTML_HEADER = doxygen/header.html
|
||||||
HTML_OUTPUT = doxyhtml
|
HTML_OUTPUT = doxyhtml
|
||||||
INCLUDE_PATH = ../third-party/build-deps/ffmpeg/Linux-x86_64/include/
|
INCLUDE_PATH = ../third-party/build-deps/ffmpeg/Linux-x86_64/include/
|
||||||
INPUT = ../src
|
INPUT = ../src
|
||||||
|
|
@ -55,7 +64,7 @@ MACRO_EXPANSION = YES
|
||||||
MAN_OUTPUT = doxyman
|
MAN_OUTPUT = doxyman
|
||||||
NUM_PROC_THREADS = 1
|
NUM_PROC_THREADS = 1
|
||||||
PREDEFINED = DOXYGEN
|
PREDEFINED = DOXYGEN
|
||||||
PROJECT_BRIEF = "Sunshine is a Gamestream host for Moonlight."
|
PROJECT_BRIEF = "Self-hosted game stream host for Moonlight."
|
||||||
PROJECT_ICON = ../sunshine.ico
|
PROJECT_ICON = ../sunshine.ico
|
||||||
PROJECT_LOGO = ../sunshine.png
|
PROJECT_LOGO = ../sunshine.png
|
||||||
PROJECT_NAME = Sunshine
|
PROJECT_NAME = Sunshine
|
||||||
|
|
|
||||||
95
docs/doxygen/header.html
Normal file
95
docs/doxygen/header.html
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
<!-- HTML header for doxygen 1.10.0-->
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||||
|
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||||
|
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||||
|
<!--PROJECT_ICON is not available with DOXYGEN < 1.10.0, so use the filename directly-->
|
||||||
|
<link rel="icon" href="$relpath^sunshine.ico" type="image/x-icon" />
|
||||||
|
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<!--BEGIN DISABLE_INDEX-->
|
||||||
|
<!--BEGIN FULL_SIDEBAR-->
|
||||||
|
<script type="text/javascript">var page_layout=1;</script>
|
||||||
|
<!--END FULL_SIDEBAR-->
|
||||||
|
<!--END DISABLE_INDEX-->
|
||||||
|
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||||
|
$treeview
|
||||||
|
$search
|
||||||
|
$mathjax
|
||||||
|
$darkmode
|
||||||
|
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||||
|
$extrastylesheet
|
||||||
|
|
||||||
|
<!--DOXYGEN-AWESOME START-->
|
||||||
|
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
DoxygenAwesomeDarkModeToggle.init()
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="$relpath^doxygen-awesome-fragment-copy-button.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
DoxygenAwesomeFragmentCopyButton.init()
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="$relpath^doxygen-awesome-paragraph-link.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
DoxygenAwesomeParagraphLink.init()
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="$relpath^doxygen-awesome-interactive-toc.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
DoxygenAwesomeInteractiveToc.init()
|
||||||
|
</script>
|
||||||
|
<!--DOXYGEN-AWESOME END-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--BEGIN DISABLE_INDEX-->
|
||||||
|
<!--BEGIN FULL_SIDEBAR-->
|
||||||
|
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<!--END FULL_SIDEBAR-->
|
||||||
|
<!--END DISABLE_INDEX-->
|
||||||
|
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
|
||||||
|
<!--BEGIN TITLEAREA-->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr id="projectrow">
|
||||||
|
<!--BEGIN PROJECT_LOGO-->
|
||||||
|
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"$logosize/></td>
|
||||||
|
<!--END PROJECT_LOGO-->
|
||||||
|
<!--BEGIN PROJECT_NAME-->
|
||||||
|
<td id="projectalign">
|
||||||
|
<div id="projectname">$projectname<!--BEGIN PROJECT_NUMBER--><span id="projectnumber"> $projectnumber</span><!--END PROJECT_NUMBER-->
|
||||||
|
</div>
|
||||||
|
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
|
||||||
|
</td>
|
||||||
|
<!--END PROJECT_NAME-->
|
||||||
|
<!--BEGIN !PROJECT_NAME-->
|
||||||
|
<!--BEGIN PROJECT_BRIEF-->
|
||||||
|
<td>
|
||||||
|
<div id="projectbrief">$projectbrief</div>
|
||||||
|
</td>
|
||||||
|
<!--END PROJECT_BRIEF-->
|
||||||
|
<!--END !PROJECT_NAME-->
|
||||||
|
<!--BEGIN DISABLE_INDEX-->
|
||||||
|
<!--BEGIN SEARCHENGINE-->
|
||||||
|
<!--BEGIN !FULL_SIDEBAR-->
|
||||||
|
<td>$searchbox</td>
|
||||||
|
<!--END !FULL_SIDEBAR-->
|
||||||
|
<!--END SEARCHENGINE-->
|
||||||
|
<!--END DISABLE_INDEX-->
|
||||||
|
</tr>
|
||||||
|
<!--BEGIN SEARCHENGINE-->
|
||||||
|
<!--BEGIN FULL_SIDEBAR-->
|
||||||
|
<tr><td colspan="2">$searchbox</td></tr>
|
||||||
|
<!--END FULL_SIDEBAR-->
|
||||||
|
<!--END SEARCHENGINE-->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!--END TITLEAREA-->
|
||||||
|
<!-- end header part -->
|
||||||
12
docs/environment.yml
Normal file
12
docs/environment.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
name: RTD
|
||||||
|
channels:
|
||||||
|
- conda-forge
|
||||||
|
- defaults
|
||||||
|
dependencies:
|
||||||
|
- doxygen=1.10.0
|
||||||
|
- graphviz=11.0.0
|
||||||
|
- pip
|
||||||
|
- python=3.11
|
||||||
|
- pip:
|
||||||
|
- -r ./requirements.txt
|
||||||
|
|
@ -128,9 +128,12 @@ todo_include_todos = True
|
||||||
# https://github.com/readthedocs/readthedocs.org/blob/eadf6ac6dc6abc760a91e1cb147cc3c5f37d1ea8/docs/conf.py#L235-L236
|
# https://github.com/readthedocs/readthedocs.org/blob/eadf6ac6dc6abc760a91e1cb147cc3c5f37d1ea8/docs/conf.py#L235-L236
|
||||||
suppress_warnings = ["epub.unknown_project_files"]
|
suppress_warnings = ["epub.unknown_project_files"]
|
||||||
|
|
||||||
|
doxygen_cmd = os.getenv('DOXY_PATH', 'doxygen')
|
||||||
|
print(f'doxygen command: {doxygen_cmd}')
|
||||||
|
|
||||||
# get doxygen version
|
# get doxygen version
|
||||||
doxy_version = _run_subprocess(
|
doxy_version = _run_subprocess(
|
||||||
args_list=['doxygen', '--version'],
|
args_list=[doxygen_cmd, '--version'],
|
||||||
cwd=source_dir,
|
cwd=source_dir,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -147,7 +150,7 @@ for d in directories:
|
||||||
|
|
||||||
# run doxygen
|
# run doxygen
|
||||||
doxy_proc = _run_subprocess(
|
doxy_proc = _run_subprocess(
|
||||||
args_list=['doxygen', 'Doxyfile'],
|
args_list=[doxygen_cmd, 'Doxyfile'],
|
||||||
cwd=source_dir
|
cwd=source_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ Test clang-format locally.
|
||||||
|
|
||||||
Sphinx
|
Sphinx
|
||||||
------
|
------
|
||||||
|
.. note:: Documentation is now a cmake target and this is all handled by the cmake build system. When compiling docs
|
||||||
|
as a target, simply install Python, Doxygen, and Graphviz. The installation of python dependencies will be handled
|
||||||
|
automatically inside a virtual environment. The following instructions are for manual building of the docs.
|
||||||
|
|
||||||
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`__ for documentation building. Sphinx, along with other
|
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`__ for documentation building. Sphinx, along with other
|
||||||
required python dependencies are included in the `./docs/requirements.txt` file. Python is required to build
|
required python dependencies are included in the `./docs/requirements.txt` file. Python is required to build
|
||||||
sphinx docs. Installation and setup of python will not be covered here.
|
sphinx docs. Installation and setup of python will not be covered here.
|
||||||
|
|
|
||||||
1
third-party/doxygen-awesome-css
vendored
Submodule
1
third-party/doxygen-awesome-css
vendored
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 40e9b25b6174dd3b472d8868f63323a870dfeeb8
|
||||||
Loading…
Add table
Add a link
Reference in a new issue