Skip to content

Commit

Permalink
Use docbook XSL instead of doxygen to generate SDK docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Sep 26, 2018
1 parent f30e73e commit f2de5ad
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions create_docs.bat
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
@echo off

IF "%2"=="" (set WPDPACKDESTDIR=.\npcap-sdk\) ELSE (set WPDPACKDESTDIR=%2)
IF "%2"=="" (set WPDPACKDESTDIR=.\npcap-sdk) ELSE (set WPDPACKDESTDIR=%2)

IF ""=="%1" (set WINPCAPSOURCEDIR=.\) ELSE (set WINPCAPSOURCEDIR=%1)

set DOCBOOKXSL=C:\xslt\docbook-xsl-1.79.2
set XSLTPROC=C:\xslt\bin\xsltproc.exe

echo Creating \docs folder
mkdir %WPDPACKDESTDIR% >nul 2>nul
mkdir %WPDPACKDESTDIR%\docs >nul 2>nul
mkdir %WPDPACKDESTDIR%\docs\html >nul 2>nul

pushd %WINPCAPSOURCEDIR%\dox\prj

echo - Deleting existing WinPcap documentation
del /q docs\*.* 2> nul > nul
del /q %WPDPACKDESTDIR%\docs\*.* 2> nul > nul
echo - Creating new documentation
doxygen winpcap_noc.dox >nul
echo - Copying all gif files
xcopy ..\pics\*.gif docs\. /v /y /q >nul
xcopy ..\*.gif docs\. /v /y /q >nul

popd
%XSLTPROC% --path %DOCBOOKXSL% --nonet --stringparam media.type html --stringparam base.dir %WPDPACKDESTDIR%/docs/ --stringparam use.id.as.filename 1 %DOCBOOKXSL%\html\chunk.xsl %WINPCAPSOURCEDIR%\docs\npcap-guide-wrapper.xml

xcopy /v /Y %WINPCAPSOURCEDIR%\dox\WinPcap_docs.html %WPDPACKDESTDIR%\docs\ >nul
xcopy /v /Y %WINPCAPSOURCEDIR%\dox\prj\docs\*.* %WPDPACKDESTDIR%\docs\html\ >nul
xcopy /v /Y %WINPCAPSOURCEDIR%\dox\*.gif %WPDPACKDESTDIR%\docs\html\ >nul
xcopy /v /Y %WINPCAPSOURCEDIR%\dox\pics\*.gif %WPDPACKDESTDIR%\docs\html\ >nul
xcopy /v /Y %WINPCAPSOURCEDIR%\docs\npcap-guide-wrapper.html %WPDPACKDESTDIR%\docs\ >nul
echo Folder \docs created successfully
set WPDPACKDESTDIR=
set WINPCAPSOURCEDIR=

0 comments on commit f2de5ad

Please sign in to comment.