]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/makedocs
fixed float to short int casting warnings
[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
947697fb 25cp $WXDIR/docs/latex/wx/*.css $DEST/wx
ccc6783c
RD
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
27cp $DEST/wx/wx_contents.html $DEST/wx/index.html
689b5c38 28cp $DEST/wx/* $WXDIR/docs/html/wx
1e4a197e 29
0a358773
RD
30# **** and the contribs
31for 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
ccc6783c
RD
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
0a358773 38done
1e4a197e
RD
39
40
41# **** zip the docs into "books"
42pushd $DEST
43pushd wx
44zip ../wx.zip *
45popd
46rm -r wx
47
0a358773
RD
48for c in $CONTRIBS; do
49 pushd $c
50 zip ../$c.zip *
51 popd
52 rm -r $c
53done
1e4a197e
RD
54
55popd
56cp ../distrib/viewdocs.py $DEST
57cp ../distrib/README.viewdocs.txt $DEST/README.txt
51ba037f 58cp ../docs/xml/wxPython-metadata.xml $DEST
1e4a197e 59
bc59c206
RD
60rm -f ../dist/wxPythonDocs-$VERSION.tar.gz
61tar cvf ../dist/wxPythonDocs-$VERSION.tar $DEST
62gzip -9 ../dist/wxPythonDocs-$VERSION.tar
1e4a197e
RD
63
64
65# **** Cleanup
66cd ..
67rm -r _build_docs
68
69