Skip to content

Commit 8dcd778

Browse files
committed
packaging: pack the doxygen things with html package
Close #16
1 parent 5c52003 commit 8dcd778

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

preprocess-zh.sh

+14-6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ VERSION="${VERSION:-$(date +%Y%m%d)}"
3636
sed -i "/^VERSION=/cVERSION=${VERSION}" Makefile
3737
make source
3838

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

6162
# package un-processed files
62-
"${_7Z}" a -mx9 -myx9 "../cppreference-unprocessed-${VERSION}.7z" ./reference
63+
"${_7Z}" a -mx9 -myx9 -mqs "../cppreference-unprocessed-${VERSION}.7z" ./reference
64+
#rm -rf ./reference
65+
#"${_7Z}" x ../cppreference-unprocessed-20210212.7z
6366

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

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

155+
# build doc_devhelp doc_doxygen
156+
mkdir -p output
157+
mv -f reference output/
158+
make doc_doxygen doc_devhelp
159+
152160
# package processed files
153-
"${_7Z}" a -mx9 -myx9 "../html-book-${VERSION}.7z" ./reference
161+
cd output
162+
"${_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
163+
cd ..
154164

155165
# build qch book
156-
mkdir -p output/reference
157-
cp -r -f reference output/reference
158166
make doc_qch
159-
"${_7Z}" a -mx9 -myx9 "../qch-book-${VERSION}.7z" ./output/*.qch
167+
"${_7Z}" a -mx9 -myx9 -mqs "../qch-book-${VERSION}.7z" ./output/*.qch
160168

161169
# move processed files to parent folder
162170
# for make_chm.sh
163-
mv -f reference/* ../
171+
mv -f output/reference/* ../
164172
cd ..
165173

166174
set +e

0 commit comments

Comments
 (0)