Skip to content

Commit

Permalink
packaging: pack the doxygen things with html package
Browse files Browse the repository at this point in the history
Close #16
  • Loading branch information
myfreeer committed Feb 13, 2021
1 parent 5c52003 commit 8dcd778
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions preprocess-zh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ VERSION="${VERSION:-$(date +%Y%m%d)}"
sed -i "/^VERSION=/cVERSION=${VERSION}" Makefile
make source


# init files and vars
startup_scripts_replace="startup_scripts.js"
startup_scripts_path="$(find | grep -iP 'load\.php.*?modules=startup&only=scripts.*?' | head -1)"
Expand All @@ -59,7 +60,9 @@ _7Z="${_7Z:-$(which 7z)}"
CPUS="$(cat /proc/cpuinfo | grep -c '^processor')"

# package un-processed files
"${_7Z}" a -mx9 -myx9 "../cppreference-unprocessed-${VERSION}.7z" ./reference
"${_7Z}" a -mx9 -myx9 -mqs "../cppreference-unprocessed-${VERSION}.7z" ./reference
#rm -rf ./reference
#"${_7Z}" x ../cppreference-unprocessed-20210212.7z

# https://gist.github.com/cdown/1163649/8a35c36fdd24b373788a7057ed483a5bcd8cd43e
url_encode() {
Expand Down Expand Up @@ -149,18 +152,23 @@ echo Done.

rm -rf 'reference/zh.cppreference.com'

# build doc_devhelp doc_doxygen
mkdir -p output
mv -f reference output/
make doc_doxygen doc_devhelp

# package processed files
"${_7Z}" a -mx9 -myx9 "../html-book-${VERSION}.7z" ./reference
cd output
"${_7Z}" a -mx9 -myx9 -mqs "../../html-book-${VERSION}.7z" ./reference cppreference-doc-zh-c.devhelp2 cppreference-doc-zh-cpp.devhelp2 cppreference-doxygen-web.tag.xml cppreference-doxygen-local.tag.xml
cd ..

# build qch book
mkdir -p output/reference
cp -r -f reference output/reference
make doc_qch
"${_7Z}" a -mx9 -myx9 "../qch-book-${VERSION}.7z" ./output/*.qch
"${_7Z}" a -mx9 -myx9 -mqs "../qch-book-${VERSION}.7z" ./output/*.qch

# move processed files to parent folder
# for make_chm.sh
mv -f reference/* ../
mv -f output/reference/* ../
cd ..

set +e

0 comments on commit 8dcd778

Please sign in to comment.