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