]> git.saurik.com Git - wxWidgets.git/commitdiff
Added scripts to make Tex2RTF distribution on Unix
authorJulian Smart <julian@anthemion.co.uk>
Wed, 7 Aug 2002 15:50:31 +0000 (15:50 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 7 Aug 2002 15:50:31 +0000 (15:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/tex2rtf/distrib/distrib.rsp
utils/tex2rtf/distrib/makedistrib.sh [new file with mode: 0755]
utils/tex2rtf/distrib/maketarball.sh [new file with mode: 0755]
utils/tex2rtf/distrib/src.rsp
utils/tex2rtf/distrib/zipsrc.sh
utils/tex2rtf/docs/Makefile [new file with mode: 0644]

index 2d3c53e81382cc7deeda20b34eeec49b94c64820..3efa5d235017b6c8d8206dbc5e29333c92efc5df 100644 (file)
@@ -11,6 +11,7 @@ docs/*.gif
 docs/*.wmf
 docs/*.shg
 docs/makefile.vc
+docs/Makefile
 
 tex2rtf.exe
 tex2rtf.chm
diff --git a/utils/tex2rtf/distrib/makedistrib.sh b/utils/tex2rtf/distrib/makedistrib.sh
new file mode 100755 (executable)
index 0000000..a1c181e
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Example script to call the maketarball.sh
+# script, for creating the Tex2RTF distribution.
+echo Make the Tex2RTF distribution
+
+WXWIN=/opt/julians/wx2dev/wxWindows
+VERSION=2.01
+TEX2RTFBIN=$WXWIN/utils/tex2rtf/deliver/tex2rtf
+DESTDIR=$WXWIN/utils/tex2rtf/deliver
+
+$WXWIN/utils/tex2rtf/distrib/maketarball.sh $WXWIN $TEX2RTFBIN $DESTDIR $VERSION
diff --git a/utils/tex2rtf/distrib/maketarball.sh b/utils/tex2rtf/distrib/maketarball.sh
new file mode 100755 (executable)
index 0000000..ca3dfe1
--- /dev/null
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+# Make a distribution of Tex2RTF for Unix
+# Julian Smart 2002-08-07
+# Usage: maketarball.sh wx-dir bin-file deliver-dir version-no [ options ]
+# For example: maketarball.sh ~/wx2dev/wxWindows /bin/tex2rtf /tmp/tex2rtf-deliver
+# Where:
+# wx-dir is the wxWindows source tree
+# bin-file is the Tex2RTF binary, already compiled
+# deliver-dir is the directory the distribution will be put in
+# version-no is the version, e.g. 2.01
+
+TEX2RTFDIR=$1/utils/tex2rtf
+SRC=$TEX2RTFDIR/src
+BINARYSRC=$2
+DEST=$3
+BUILD=0
+UPX=0
+PROGNAME=$0
+VERSION=$4
+
+dotar()
+{
+    # Make the documentation first
+    cd $TEX2RTFDIR/docs
+    make htb
+
+    rm -f -r $DEST/tex2rtf-*.*
+
+    mkdir -p $DEST/tex2rtf-$VERSION
+    mkdir -p $DEST/tex2rtf-$VERSION/tools
+    mkdir -p $DEST/tex2rtf-$VERSION/docs
+    mkdir -p $DEST/tex2rtf-$VERSION/html
+
+    # Make the source archive
+    cd $TEX2RTFDIR
+    ls `cat $TEX2RTFDIR/distrib/src.rsp` > /tmp/tex2rtf.txt
+    tar cvf $DEST/tex2rtf-$VERSION/tex2rtf-source-$VERSION.tar -T /tmp/tex2rtf.txt
+    gzip $DEST/tex2rtf-$VERSION/tex2rtf-source-$VERSION.tar
+    rm /tmp/tex2rtf.txt
+
+    cd $DEST/tex2rtf-$VERSION
+
+    # Copy the binary and other files
+    cp $BINARYSRC tex2rtf
+    cp $TEX2RTFDIR/docs/readme.txt readme.txt
+    cp $TEX2RTFDIR/docs/licence.txt .
+    cp $TEX2RTFDIR/docs/gpl.txt .
+    cp $TEX2RTFDIR/docs/lgpl.txt .
+    cp $TEX2RTFDIR/docs/*.html $TEX2RTFDIR/docs/*.gif html
+    cp $TEX2RTFDIR/docs/tex2rtf.htb .
+
+    # Copy all the doc sources, so that the user can experiment
+    # on the Tex2RTF docs 
+    cp $TEX2RTFDIR/docs/*.tex $TEX2RTFDIR/docs/*.ini $TEX2RTFDIR/docs/*.sty $TEX2RTFDIR/docs/*.bib $TEX2RTFDIR/docs/*.gif $TEX2RTFDIR/docs/*.tex docs
+
+    strip tex2rtf
+
+    if [ "$UPX" != "0" ]; then
+        upx tex2rtf
+    fi
+
+    cd ..
+    
+    tar cvf $DEST/tex2rtf-$VERSION-i386.tar tex2rtf-$VERSION/*
+    gzip -c $DEST/tex2rtf-$VERSION-i386.tar > $DEST/tex2rtf-$VERSION-i386.tar.gz
+    bzip2 -c $DEST/tex2rtf-$VERSION-i386.tar > $DEST/tex2rtf-$VERSION-i386.tar.bz2
+}
+
+usage()
+{
+    echo Usage: $PROGNAME "wx-dir bin-file deliver-dir version-no [ options ]"
+    echo Options:
+    echo "    --help         Display this help message"
+    echo "    --upx          Compress executable with UPX"
+    echo For example: $PROGNAME ~/wx2dev/wxWindows /tmp/tex2rtf /tmp/tex2rtf-deliver 2.0
+    exit 1
+}
+
+# Process command line options.
+shift 4
+for i in "$@"; do
+    case "$i" in
+       --upx) UPX=1 ;;
+       *)
+           usage
+           exit
+           ;;
+    esac
+done
+
+if [ ! -d "$DEST" ]; then
+    mkdir -p $DEST
+fi
+
+if [ ! -d "$SRC" ]; then
+    echo Source directory $SRC not found.
+    usage
+    exit 1
+fi
+
+if [ ! -f "$BINARYSRC" ]; then
+    echo tex2rtf binary $BINARYSRC not found.
+    usage
+    exit 1
+fi
+
+if [ "$VERSION" = "" ]; then
+    echo Pass the version number as the fourth argument.
+    usage
+    exit 1
+fi
+
+echo Creating Version $VERSION distribution in $DEST, using source directory $SRC and tex2rtf binary $BINARYSRC.
+
+dotar
+
+echo Tex2RTF archived.
+
index 56eab56a5de79b8f2ab49810376faaeb4b65eb20..cc69eaaa79b25d95b0c670293ee7d2e3ede09b0e 100644 (file)
@@ -45,4 +45,5 @@ docs/*.gif
 docs/*.wmf
 docs/*.shg
 docs/makefile.vc
+docs/Makefile
 
index 742421734ace2e813141e9397a05c6cd0d724a76..a3e49d7da7424ad63a17288aa701b3b0ba876062 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Zip up StoryLines source
+# Zip up Tex2RTF source
 
 expandlines()
 {
@@ -15,13 +15,20 @@ expandlines()
     done
 }
 
-CAFEDIR=$CAFE
-STDIR=$CAFE/storylines
-COMMONDIR=$CAFE/common
+TEX2RTFDIR=`pwd`/..
 
-cd $CAFE
-expandlines $STDIR/distrib/src.rsp temp.txt
-zip -@ $CAFEDIR/deliver/storylines_src.zip < temp.txt
-expandlines $CAFEDIR/distrib/src.rsp temp.txt
-zip -u -@ $CAFEDIR/deliver/storylines_src.zip < temp.txt
+rm -f $TEX2RTFDIR/deliver/tex2rtf-source.zip
+rm -f $TEX2RTFDIR/deliver/tex2rtf-source.tar.gz
+
+# Make a zip archive
+cd $TEX2RTFDIR
+expandlines $TEX2RTFDIR/distrib/src.rsp temp.txt
+zip -@ $TEX2RTFDIR/deliver/tex2rtf-source.zip < temp.txt
 rm temp.txt
+
+# Now make a tar archive
+ls `cat $TEX2RTFDIR/distrib/src.rsp` > /tmp/tex2rtf.txt
+tar cvf $TEX2RTFDIR/deliver/tex2rtf-source.tar -T /tmp/tex2rtf.txt
+gzip $TEX2RTFDIR/deliver/tex2rtf-source.tar
+rm /tmp/tex2rtf.txt
+
diff --git a/utils/tex2rtf/docs/Makefile b/utils/tex2rtf/docs/Makefile
new file mode 100644 (file)
index 0000000..746bb86
--- /dev/null
@@ -0,0 +1,36 @@
+#
+# File:                Makefile
+# Author:      Julian Smart
+# Created:     1999
+#
+# Makefile : Builds Tex2RTF manual
+#
+
+DOCDIR=..
+LOCALDOCDIR=.
+
+DOCSOURCES=tex2rtf.tex
+
+all: tex2rtf.htb
+
+hlp: tex2rtf.hlp
+htb: tex2rtf.htb
+html: tex2rtf.html
+htmlhelp: tex2rtf.chm
+pdfrtf: tex2rtf_rtf.rtf
+
+tex2rtf_rtf.rtf: $(DOCSOURCES) tex2rtf.ini
+       tex2rtf tex2rtf.tex tex2rtf_rtf.rtf -twice -rtf
+
+tex2rtf.rtf: $(DOCSOURCES) tex2rtf.ini
+       tex2rtf tex2rtf.tex tex2rtf.rtf -twice -winhelp
+
+tex2rtf_contents.html:         $(DOCSOURCES) tex2rtf.ini
+       tex2rtf tex2rtf.tex tex2rtf.html -twice -html
+       rm -f *.con
+       rm -f *.ref
+       rm -f *.con
+       rm -f *.ref
+
+tex2rtf.htb:         tex2rtf_contents.html
+       zip tex2rtf.htb tex2rtf*.html *.hhp *.hhk *.hhc *.gif