From 8d1c7edcf629db551889d3cd73bb08708d067e7c Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Mon, 13 Feb 2017 10:29:20 +0100 Subject: [PATCH] fix warnings, replace fonts with font, make breath/doxygen/cmake imports optional --- docs/source/_static/.keep | 0 docs/source/conf.py | 37 +++++++++++++------- docs/source/openmw-mods/index.rst | 2 +- docs/source/openmw-mods/settings/camera.rst | 2 +- docs/source/openmw-mods/settings/water.rst | 2 +- docs/source/openmw-mods/settings/windows.rst | 2 +- docs/source/openmw/index.rst | 2 +- 7 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 docs/source/_static/.keep diff --git a/docs/source/_static/.keep b/docs/source/_static/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/source/conf.py b/docs/source/conf.py index 12c6f91a7..20eb12786 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -35,17 +35,23 @@ extensions = [ 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', - 'breathe', ] -# Where breathe can find the source files -breathe_projects_source = { - "openmw": (project_root+"/apps/openmw", ["engine.hpp", - "mwbase/dialoguemanager.hpp", "mwbase/environment.hpp", - "mwbase/inputmanager.hpp", "mwbase/journal.hpp", "mwbase/mechanicsmanager.hpp", - "mwbase/scriptmanager.hpp", "mwbase/soundmanager.hpp", "mwbase/statemanager.hpp", - "mwbase/windowmanager.hpp", "mwbase/world.hpp"]) - } +try: + import breath + + extensions.append('breathe') + + # Where breathe can find the source files + breathe_projects_source = { + "openmw": (project_root+"/apps/openmw", ["engine.hpp", + "mwbase/dialoguemanager.hpp", "mwbase/environment.hpp", + "mwbase/inputmanager.hpp", "mwbase/journal.hpp", "mwbase/mechanicsmanager.hpp", + "mwbase/scriptmanager.hpp", "mwbase/soundmanager.hpp", "mwbase/statemanager.hpp", + "mwbase/windowmanager.hpp", "mwbase/world.hpp"]) + } +except ImportError: + pass # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -71,10 +77,15 @@ copyright = u'2016, OpenMW Team' # The short X.Y version. # The full version, including alpha/beta/rc tags. -from parse_cmake import parsing -cmake_raw = open(project_root+'/CMakeLists.txt', 'r').read() -cmake_data = parsing.parse(cmake_raw) -release = version = int(cmake_data[24][1][1].contents), int(cmake_data[25][1][1].contents), int(cmake_data[26][1][1].contents) +try: + from parse_cmake import parsing + cmake_raw = open(project_root+'/CMakeLists.txt', 'r').read() + cmake_data = parsing.parse(cmake_raw) + release = version = '.'.join(int(cmake_data[24][1][1].contents), + int(cmake_data[25][1][1].contents), + int(cmake_data[26][1][1].contents)) +except ImportError: + release = "UNRELEASED" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/openmw-mods/index.rst b/docs/source/openmw-mods/index.rst index 0219c037e..84e8b3335 100644 --- a/docs/source/openmw-mods/index.rst +++ b/docs/source/openmw-mods/index.rst @@ -15,6 +15,6 @@ The following document is the complete reference guide to modifying, or modding, differences mod-install settings/index - fonts + font convert_bump_mapped_mods paths \ No newline at end of file diff --git a/docs/source/openmw-mods/settings/camera.rst b/docs/source/openmw-mods/settings/camera.rst index 4fe3aa977..c9b69add6 100644 --- a/docs/source/openmw-mods/settings/camera.rst +++ b/docs/source/openmw-mods/settings/camera.rst @@ -24,7 +24,7 @@ This setting determines whether objects that render to a few pixels or smaller w The default value is true. This setting can only be configured by editing the settings configuration file. small feature culling pixel size ---------------------- +-------------------------------- :Type: floating point :Range: > 0 diff --git a/docs/source/openmw-mods/settings/water.rst b/docs/source/openmw-mods/settings/water.rst index a5fa27972..b2d04a416 100644 --- a/docs/source/openmw-mods/settings/water.rst +++ b/docs/source/openmw-mods/settings/water.rst @@ -1,5 +1,5 @@ Water Settings -############ +############## .. note:: The settings for the water shader are difficult to describe, but can be seen immediately in the Water tab of the Video panel in the Options menu. Changes there will be saved to these settings. It is suggested to stand on the shore of a moderately broad body of water with trees or other objects on the far shore to test reflection textures, underwater plants in shallow water near by to test refraction textures, and some deep water visible from your location to test deep water visibility. diff --git a/docs/source/openmw-mods/settings/windows.rst b/docs/source/openmw-mods/settings/windows.rst index 9472b9a81..8860de983 100644 --- a/docs/source/openmw-mods/settings/windows.rst +++ b/docs/source/openmw-mods/settings/windows.rst @@ -1,5 +1,5 @@ Windows Settings -############ +################ :Type: floating point :Range: 0.0 to 1.0 diff --git a/docs/source/openmw/index.rst b/docs/source/openmw/index.rst index ce4e42f1f..f942a37ca 100644 --- a/docs/source/openmw/index.rst +++ b/docs/source/openmw/index.rst @@ -14,4 +14,4 @@ Indices and tables ================== * :ref:`genindex` - * :ref:`search` \ No newline at end of file +* :ref:`search`