Исправлена генерация документации

This commit is contained in:
Andrey Rodionov 2017-09-03 00:00:44 +03:00
parent b7c378433d
commit e132f5ef57
7 changed files with 111 additions and 8 deletions

View File

@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = ../sdk/
OUTPUT_DIRECTORY = ./
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@ -790,7 +790,8 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = ../../src
INPUT = ../../src \
pages
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@ -982,7 +983,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.
USE_MDFILE_AS_MAINPAGE =
USE_MDFILE_AS_MAINPAGE = main.markdown
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@ -1364,15 +1365,13 @@ GENERATE_QHP = YES
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
QCH_FILE = ../plugin.qch
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
# Project output. For more information please see Qt Help Project / Namespace
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_NAMESPACE = com.rtptechgroup.plugin.001
QHP_NAMESPACE = com.rtptechgroup.extension.001
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
# Help Project output. For more information please see Qt Help Project / Virtual

13
doc/api/api.qbs Normal file
View File

@ -0,0 +1,13 @@
import "../main.qbs" as DocProduct
DocProduct {
name: "plugin-api"
type: "docs"
docName: "plugin-dev"
Group {
fileTagsFilter: ["docs"]
qbs.install: true
qbs.installDir: product.docPath
}
}

View File

@ -0,0 +1,23 @@
# Введение
Данная документация представляет собой описание **API** (программный интерфейс
приложения) проекта **Plugin**.
Требования
------------------------------------------------------------------------------
Для сборки проекта вам необходим С++ компилятор и Qt Framework
Для всех платформ: Qt Framework >= **5.5.1**
+ **Windows:** MSVC++ ([бесплатный](http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express) или коммерческий).
+ **Linux:** Make и GCC.
Автор/Участники проекта
------------------------------------------------------------------------------
* Автор: [rdnvndr](https://github.com/rdnvndr)
* Владелец: [rdnvndr](https://github.com/rdnvndr)
* Участники:
Лицензия
------------------------------------------------------------------------------
GNU General Public License 2

5
doc/doc.qbs Normal file
View File

@ -0,0 +1,5 @@
Project {
references: [
"api/api.qbs"
]
}

62
doc/main.qbs Normal file
View File

@ -0,0 +1,62 @@
import "../main.qbs" as MainProduct
import qbs;
import qbs.Process;
import qbs.TextFile;
MainProduct {
builtByDefault: false
FileTagger {
fileTags: ["docs"]
patterns: ["*.qch"]
}
Group {
name: "markdown"
files: ["pages/*.markdown"]
fileTags: ["markdown"]
}
Group {
name: "doxygen"
files: [product.sourceDirectory + "/Doxyfile"]
fileTags: ["doxyconf"]
}
property string docName: "doc"
Rule {
multiplex: true
inputs: ["doxyconf"]
outputFileTags: ["docs"]
outputArtifacts: [{ filePath: product.docName + ".qch" },
{ filePath: product.docName + "/" }]
prepare: {
var cmd = new JavaScriptCommand ();
cmd.description = "generating api documentation";
cmd.highlight = "doxygen";
cmd.sourceCode = function () {
for (var idx = 0; idx < inputs["doxyconf"].length; idx++) {
var file = inputs["doxyconf"][idx].filePath;
var doxFile = new TextFile(file);
var content = doxFile.readAll();
doxFile.close();
var proc = new Process ();
proc.setWorkingDirectory (product.sourceDirectory);
proc.start ("doxygen",["-"]);
proc.write(content);
proc.writeLine("HTML_OUTPUT = " + product.docName + "/");
proc.writeLine("QCH_FILE = ../" + product.docName + ".qch");
proc.writeLine("OUTPUT_DIRECTORY = " + product.buildDirectory);
proc.closeWriteChannel();
if (!proc.waitForFinished())
proc.kill();
proc.close();
}
}
return cmd;
}
}
}

View File

@ -13,8 +13,8 @@ Product {
property string copyright: ""
property string applicationPath: "bin/"
property string includePath: "include/" + name + "/"
property string docPath: "share/doc/" + name + "/"
property string includePath: "include/plugin/"
property string docPath: "share/doc/plugin/"
Properties {
condition: qbs.targetOS.contains("linux")

View File

@ -1,6 +1,7 @@
Project {
references: [
"src/plugin.qbs",
"doc/doc.qbs",
"tests/tests.qbs"
]
}