]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/makedocs
reSWIGged
[wxWidgets.git] / wxPython / distrib / makedocs
CommitLineData
1e4a197e
RD
1#!/bin/bash
2
3#----------------------------------------------------------------------
4
1e4a197e
RD
5if [ ! -d wxPython ]; then # TODO: make this test more robust
6 echo "Please run this script from the root wxPython directory."
7 exit 1
8fi
9
10
bc59c206 11VERSION=`python -c "import setup;print setup.VERSION"`
0a358773 12CONTRIBS="ogl gizmos"
bc59c206 13DEST=wxPython-$VERSION/docs
0a358773 14
1e4a197e 15# **** Make a directory to build up a distribution tree
1e4a197e
RD
16mkdir -p _build_docs/$DEST
17cd _build_docs
18mkdir $DEST/wx
1e4a197e
RD
19
20WXDIR=../..
21
0a358773
RD
22# **** Build the main docs using tex2rtf
23echo "****" main "****"
1e4a197e 24cp $WXDIR/docs/latex/wx/*.gif $DEST/wx
0a358773 25$WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/docs/latex/wx/manual.tex $DEST/wx/wx.htm -twice -html -macros $WXDIR/docs/latex/wx/tex2rtf.ini
1e4a197e 26cp $DEST/wx/wx.htm $DEST/wx/index.htm
689b5c38 27cp $DEST/wx/* $WXDIR/docs/html/wx
1e4a197e 28
0a358773
RD
29# **** and the contribs
30for c in $CONTRIBS; do
31 echo "****" $c "****"
32 mkdir $DEST/$c
33 cp $WXDIR/contrib/docs/latex/$c/*.gif $DEST/$c
34 cp $WXDIR/contrib/docs/latex/$c/*.bmp $DEST/$c
35 $WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/contrib/docs/latex/$c/$c.tex $DEST/$c/$c.htm -twice -html -macros $WXDIR/docs/latex/wx/tex2rtf.ini
36 cp $DEST/$c/$c.htm $DEST/$c/index.htm || cp $DEST/$c/${c}_contents.html $DEST/$c/index.htm
37done
1e4a197e
RD
38
39
40# **** zip the docs into "books"
41pushd $DEST
42pushd wx
43zip ../wx.zip *
44popd
45rm -r wx
46
0a358773
RD
47for c in $CONTRIBS; do
48 pushd $c
49 zip ../$c.zip *
50 popd
51 rm -r $c
52done
1e4a197e
RD
53
54popd
55cp ../distrib/viewdocs.py $DEST
56cp ../distrib/README.viewdocs.txt $DEST/README.txt
57
bc59c206
RD
58rm -f ../dist/wxPythonDocs-$VERSION.tar.gz
59tar cvf ../dist/wxPythonDocs-$VERSION.tar $DEST
60gzip -9 ../dist/wxPythonDocs-$VERSION.tar
1e4a197e
RD
61
62
63# **** Cleanup
64cd ..
65rm -r _build_docs
66
67