]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/makedocs
some tweaks
[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"`
02b800ce 12CONTRIBS="gizmos"
bc59c206 13DEST=wxPython-$VERSION/docs
0a358773 14
77d4f443 15
1e4a197e 16# **** Make a directory to build up a distribution tree
1e4a197e
RD
17mkdir -p _build_docs/$DEST
18cd _build_docs
19mkdir $DEST/wx
dd70f7a2 20DEST=`abspath.py $DEST`
1e4a197e 21
dd70f7a2
RD
22WXDIR=`abspath.py ../..`
23INI=$WXDIR/docs/latex/wx/tex2rtf_css.ini
1e4a197e 24
0a358773
RD
25# **** Build the main docs using tex2rtf
26echo "****" main "****"
1e4a197e 27cp $WXDIR/docs/latex/wx/*.gif $DEST/wx
947697fb 28cp $WXDIR/docs/latex/wx/*.css $DEST/wx
dd70f7a2 29echo tex2rtf $WXDIR/docs/latex/wx/manual.tex $DEST/wx/wx.html -twice -html -macros $INI
77d4f443 30tex2rtf $WXDIR/docs/latex/wx/manual.tex $DEST/wx/wx.html -twice -html -macros $INI
ccc6783c 31cp $DEST/wx/wx_contents.html $DEST/wx/index.html
689b5c38 32cp $DEST/wx/* $WXDIR/docs/html/wx
1e4a197e 33
0a358773
RD
34# **** and the contribs
35for c in $CONTRIBS; do
36 echo "****" $c "****"
37 mkdir $DEST/$c
38 cp $WXDIR/contrib/docs/latex/$c/*.gif $DEST/$c
39 cp $WXDIR/contrib/docs/latex/$c/*.bmp $DEST/$c
dd70f7a2
RD
40 tex2rtf $WXDIR/contrib/docs/latex/$c/$c.tex $DEST/$c/$c.html -twice -html -macros $INI
41 #tex2rtf $WXDIR/contrib/docs/latex/$c/manual.tex $DEST/$c/$c.html -twice -html -macros $INI
ccc6783c 42 cp $DEST/$c/$c.html $DEST/$c/index.html || cp $DEST/$c/${c}_contents.html $DEST/$c/index.html
0a358773 43done
1e4a197e
RD
44
45
46# **** zip the docs into "books"
47pushd $DEST
48pushd wx
49zip ../wx.zip *
50popd
51rm -r wx
52
0a358773
RD
53for c in $CONTRIBS; do
54 pushd $c
55 zip ../$c.zip *
56 popd
57 rm -r $c
58done
1e4a197e
RD
59
60popd
61cp ../distrib/viewdocs.py $DEST
62cp ../distrib/README.viewdocs.txt $DEST/README.txt
02b800ce 63##cp ../docs/xml/wxPython-metadata.xml $DEST
1e4a197e 64
cb56afc4 65rm -f ../dist/wxPython-docs-$VERSION.tar.gz
dd70f7a2 66tar cvf ../dist/wxPython-docs-$VERSION.tar wxPython-$VERSION
cb56afc4 67gzip -9 ../dist/wxPython-docs-$VERSION.tar
1e4a197e
RD
68
69
70# **** Cleanup
71cd ..
72rm -r _build_docs
73
74