]> git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/makedocs
Added wx.FileSystem support
[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 # **** Make a directory to build up a distribution tree
16 mkdir -p _build_docs/$DEST
17 cd _build_docs
18 mkdir $DEST/wx
19
20 WXDIR=../..
21
22 # **** Build the main docs using tex2rtf
23 echo "****" main "****"
24 cp $WXDIR/docs/latex/wx/*.gif $DEST/wx
25 cp $WXDIR/docs/latex/wx/*.css $DEST/wx
26 $WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/docs/latex/wx/manual.tex $DEST/wx/wx.html -twice -html -macros $WXDIR/docs/latex/wx/tex2rtf.ini
27 cp $DEST/wx/wx_contents.html $DEST/wx/index.html
28 cp $DEST/wx/* $WXDIR/docs/html/wx
29
30 # **** and the contribs
31 for c in $CONTRIBS; do
32 echo "****" $c "****"
33 mkdir $DEST/$c
34 cp $WXDIR/contrib/docs/latex/$c/*.gif $DEST/$c
35 cp $WXDIR/contrib/docs/latex/$c/*.bmp $DEST/$c
36 $WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/contrib/docs/latex/$c/$c.tex $DEST/$c/$c.html -twice -html -macros $WXDIR/docs/latex/wx/tex2rtf.ini
37 cp $DEST/$c/$c.html $DEST/$c/index.html || cp $DEST/$c/${c}_contents.html $DEST/$c/index.html
38 done
39
40
41 # **** zip the docs into "books"
42 pushd $DEST
43 pushd wx
44 zip ../wx.zip *
45 popd
46 rm -r wx
47
48 for c in $CONTRIBS; do
49 pushd $c
50 zip ../$c.zip *
51 popd
52 rm -r $c
53 done
54
55 popd
56 cp ../distrib/viewdocs.py $DEST
57 cp ../distrib/README.viewdocs.txt $DEST/README.txt
58 cp ../docs/xml/wxPython-metadata.xml $DEST
59
60 rm -f ../dist/wxPythonDocs-$VERSION.tar.gz
61 tar cvf ../dist/wxPythonDocs-$VERSION.tar $DEST
62 gzip -9 ../dist/wxPythonDocs-$VERSION.tar
63
64
65 # **** Cleanup
66 cd ..
67 rm -r _build_docs
68
69