qpcpp/doxygen/make.bat

95 lines
3.2 KiB
Batchfile
Raw Normal View History

2013-12-30 17:41:15 -05:00
@echo off
:: ==========================================================================
:: Product: QP/C++ script for generating Doxygen documentation
2019-10-27 12:26:31 -04:00
:: Last Updated for Version: 6.6.0
:: Date of the Last Update: 2019-08-30
2014-09-22 11:48:11 -04:00
::
2018-10-25 11:13:01 -04:00
:: Q u a n t u m L e a P s
:: ------------------------
:: Modern Embedded Software
2014-09-22 11:48:11 -04:00
::
2019-10-27 12:26:31 -04:00
:: Copyright (C) Quantum Leaps, LLC. All rights reserved.
2014-09-22 11:48:11 -04:00
::
:: This program is open source software: you can redistribute it and/or
:: modify it under the terms of the GNU General Public License as published
:: by the Free Software Foundation, either version 3 of the License, or
:: (at your option) any later version.
::
:: Alternatively, this program may be distributed and modified under the
:: terms of Quantum Leaps commercial licenses, which expressly supersede
:: the GNU General Public License and are specifically designed for
:: licensees interested in retaining the proprietary status of their code.
::
:: This program is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
:: GNU General Public License for more details.
::
:: You should have received a copy of the GNU General Public License
:: along with this program. If not, see <http://www.gnu.org/licenses/>.
::
:: Contact information:
2018-02-12 18:51:22 -05:00
:: https://www.state-machine.com
2015-09-29 11:34:38 -04:00
:: mailto:info@state-machine.com
2013-12-30 17:41:15 -05:00
:: ==========================================================================
setlocal
2015-05-14 16:05:04 -04:00
echo usage:
echo make
echo make -CHM
2013-12-30 17:41:15 -05:00
2019-10-27 12:26:31 -04:00
set VERSION=6.6.0
2013-12-30 17:41:15 -05:00
2015-05-14 16:05:04 -04:00
:: Generate Resource Standard Metrics for QP/C++ .............................
2014-04-13 21:35:34 -04:00
set DOXHOME="C:\tools\doxygen\bin"
2013-12-30 17:41:15 -05:00
set RCMHOME="C:\tools\MSquared\M2 RSM"
2016-04-01 13:55:34 -04:00
set RSM_OUTPUT=metrics.dox
2017-07-17 17:48:46 -04:00
set RSM_INPUT=..\include\*.h ..\src\*.h ..\src\qf\*.cpp ..\src\qv\*.cpp ..\src\qk\*.cpp ..\src\qxk\*.cpp
2013-12-30 17:41:15 -05:00
2015-05-22 20:38:16 -04:00
echo /** @page metrics Code Metrics > %RSM_OUTPUT%
2013-12-30 17:41:15 -05:00
echo.>> %RSM_OUTPUT%
2019-05-09 10:54:30 -04:00
echo @code{cpp} >> %RSM_OUTPUT%
2015-05-22 20:38:16 -04:00
echo Standard Code Metrics for QP/C++ %VERSION% >> %RSM_OUTPUT%
2013-12-30 17:41:15 -05:00
%RCMHOME%\rsm.exe -fd -xNOCOMMAND -xNOCONFIG -u"File cfg rsm_qpcpp.cfg" %RSM_INPUT% >> %RSM_OUTPUT%
2015-05-22 20:38:16 -04:00
echo @endcode >> %RSM_OUTPUT%
2013-12-30 17:41:15 -05:00
echo */ >> %RSM_OUTPUT%
2015-05-14 16:05:04 -04:00
:: Generate Doxygen Documentation ...........................................
2014-09-22 11:48:11 -04:00
if "%1"=="-CHM" (
2015-05-14 16:05:04 -04:00
echo Generating HTML...
2014-09-22 11:48:11 -04:00
::( type Doxyfile & echo GENERATE_HTMLHELP=YES ) | %DOXHOME%\doxygen.exe -
%DOXHOME%\doxygen.exe Doxyfile-CHM
2015-05-14 16:05:04 -04:00
echo Adding custom images...
xcopy preview.js tmp\
xcopy img tmp\img\
echo img\img.htm >> tmp\index.hhp
2019-10-27 12:26:31 -04:00
echo Generating CHM...
2015-05-14 16:05:04 -04:00
"C:\tools\HTML Help Workshop\hhc.exe" tmp\index.hhp
2019-10-27 12:26:31 -04:00
echo.
2015-05-14 16:05:04 -04:00
echo Cleanup...
rmdir /S /Q tmp
2019-10-27 12:26:31 -04:00
echo CHM file generated in C:\qp\uploads\qpcpp\
2014-09-22 11:48:11 -04:00
) else (
2019-10-27 12:26:31 -04:00
echo.
2015-05-14 16:05:04 -04:00
echo Cleanup...
2019-10-27 12:26:31 -04:00
rmdir /S /Q C:\qp\uploads\qpcpp\qpcpp
2015-05-14 16:05:04 -04:00
echo Adding custom images...
2019-10-27 12:26:31 -04:00
xcopy preview.js C:\qp\uploads\qpcpp\qpcpp\
xcopy img C:\qp\uploads\qpcpp\qpcpp\img\
copy images\favicon.ico C:\qp\uploads\qpcpp\qpcpp
2015-05-14 16:05:04 -04:00
echo Generating HTML...
2014-09-22 11:48:11 -04:00
%DOXHOME%\doxygen.exe Doxyfile
)
2013-12-30 17:41:15 -05:00
endlocal