+##parameters : subdir_of_tex index.tex dir_under_wxWidgets
+rm ${WORKDIR}/archives/html/$1/*
+/usr/local/bin/tex2rtf ${WORKDIR}/wxWidgets/$3/docs/latex/$1/$2 ${WORKDIR}/archives/html/$1/$1 -twice -html -macros ${WORKDIR}/wxWidgets/docs/latex/wx/tex2rtf_css.ini
+cp ${WORKDIR}/wxWidgets/$3/docs/latex/$1/*.gif ${WORKDIR}/archives/html/$1
+cp ${WORKDIR}/wxWidgets/$3/docs/latex/$1/*.css ${WORKDIR}/archives/html/$1
+cd ${WORKDIR}/archives/html/$1
+zip -l -q -9 ${WORKDIR}/archives/htb/$1.htb *.html *.css wx.hhc wx.hhp wx.hhk
+zip -q -9 ${WORKDIR}/archives/htb/$1.htb *.gif
+}
+
+##this one for tex2rtf as its latex docs aren't in latex...
+do_util_texrtf ()
+{
+##parameters : subdir_of_tex index.tex
+rm ${WORKDIR}/archives/html/$1/*
+/usr/local/bin/tex2rtf ${WORKDIR}/wxWidgets/utils/$1/docs/$2 ${WORKDIR}/archives/html/$1/$1 -twice -html -macros ${WORKDIR}/wxWidgets/docs/latex/wx/tex2rtf_css.ini
+cp ${WORKDIR}/wxWidgets/utils/$1/docs/*.gif ${WORKDIR}/archives/html/$1
+cp ${WORKDIR}/wxWidgets/utils/$1/docs/*.css ${WORKDIR}/archives/html/$1
+cd ${WORKDIR}/archives/html/$1
+zip -l -q -9 ${WORKDIR}/archives/htb/$1.htb *.html *.css wx.hhc wx.hhp wx.hhk
+zip -q -9 ${WORKDIR}/archives/htb/$1.htb *.gif
+}
+
+do_docs ()
+{
+##remove files, then regenerate
+rm ${WORKDIR}/archives/wx-docs*
+rm ${WORKDIR}/archives/htb/*.*
+
+######### dir index.tex rootdir
+do_texrtf wx manual.tex
+do_texrtf book book.tex
+do_texrtf svg dcsvg.tex contrib
+do_texrtf ogl ogl.tex contrib
+do_texrtf mmedia mmedia.tex contrib
+do_texrtf gizmos manual.tex contrib
+do_texrtf fl fl.tex contrib
+do_util_texrtf tex2rtf tex2rtf.tex
+
+cd ${WORKDIR}/archives/
+tar zcvf ${WORKDIR}/archives/wx-docs-html-${CURDATE}.tar.gz html/wx/*.html html/wx/*.gif html/wx/*.css
+tar zcvf ${WORKDIR}/archives/wx-docs-extra-html-${CURDATE}.tar.gz `find . -name 'wx' -prune -o -name '*.html' -print`
+
+tar zcvf ${WORKDIR}/archives/wx-docs-htb-${CURDATE}.tar.gz htb/wx.htb
+tar zcvf ${WORKDIR}/archives/wx-docs-extra-htb-${CURDATE}.tar.gz --exclude wx.htb htb/*.htb
+
+##remove .con files
+rm ${WORKDIR}/*.con
+
+}
+
+
+add_win_files ()
+{
+### starts with wx-docs-xxx.zip
+for f in `find ${WORKDIR}/archives/win/ -name wx\*.ZIP ` ; do
+ mv $f ${WORKDIR}/archives/`basename $f | tr -d ".ZIP"`-${CURDATE}.zip
+ done
+
+rm ${WORKDIR}/archives/*.exe
+for f in `find ${WORKDIR}/archives/win/ -name wx\*.EXE ` ; do
+ mv $f ${WORKDIR}/archives/`basename $f | tr -d ".EXE"`-${CURDATE}.exe
+ done
+
+}