]> git.saurik.com Git - wxWidgets.git/blobdiff - distrib/scripts/msw/makesetup.sh
fix for build with x11 reported here http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi...
[wxWidgets.git] / distrib / scripts / msw / makesetup.sh
index 49760842853b1ab5d7d74c43da7e75f754624bf1..5a9d4f5e7b0990f3ef4b21223a80c5fead81af1b 100755 (executable)
@@ -36,6 +36,70 @@ if [ "$VERSION" = "" ]; then
   VERSION=2.6.2
 fi
 
+getfilelist(){
+  port=$1
+  outfile=$2
+  
+  filelist="base.rsp"
+  contribfiles="stc.rsp contrib.rsp ogl.rsp"
+  utilsfiles="tex2rtf.rsp utils.rsp utilmake.rsp"
+  commonfiles="generic.rsp jpeg.rsp tiff.rsp xml.rsp deprecated.rsp makefile.rsp $utilsfiles $contribfiles"
+  
+  if [ ! $port = "base" ]; then
+    filelist="$filelist $commonfiles" 
+  fi 
+  
+  if [ $port = "msw" ] || [ $port = "all" ]; then
+    filelist="$filelist msw.rsp univ.rsp vc.rsp mmedia.rsp wince.rsp dmc.rsp"
+  fi
+  
+  if [ $port = "os2" ] || [ $port = "all" ]; then
+    filelist="$filelist os2.rsp"
+  fi
+  
+  if [ $port = "x11" ] || [ $port = "all" ]; then
+    filelist="$filelist x11.rsp"
+  fi
+  
+  if [ $port = "mgl" ] || [ $port = "all" ]; then
+    filelist="$filelist mgl.rsp" 
+  fi
+  
+  if [ $port = "gtk" ] || [ $port = "all" ]; then
+    filelist="$filelist gtk.rsp"
+  fi
+  
+  if [ $port = "cocoa" ] || [ $port = "all" ]; then
+    filelist="$filelist cocoa.rsp"
+  fi
+  
+  if [ $port = "motif" ] || [ $port = "all" ]; then
+    filelist="$filelist motif.rsp"
+  fi
+  
+  if [ $port = "mac" ] || [ $port = "all" ]; then
+    filelist="$filelist mac.rsp"
+  fi
+  
+  if [ $port = "all" ]; then
+    filelist="$filelist palmos.rsp"
+  fi
+  
+  tempfile="/tmp/wx$port.files.in"
+  rm -f $tempfile 
+  rm -f $outfile
+  
+  olddir=$PWD
+  cd $MANIFESTDIR
+  
+  cat $filelist > $tempfile
+  
+  cd $APPDIR
+  expandlines $tempfile $outfile
+  
+  cd $olddir
+}
+
 doreplace()
 {
     thefile=$1
@@ -93,6 +157,26 @@ rearchive()
     popd
 }
 
+ziptotar()
+{
+    archive=$1
+    dirname=$2
+    changeto=$3
+
+    pushd $changeto
+
+    unzip $ZIPFLAGS $archive
+    
+    tar cfz $archive.tar.gz $dirname
+
+    tar -cvf $dirname | bzip2 -9 > $archive.tar.bz2
+    
+    rm -rf $dirname
+
+    popd
+}
+
+
 rearchivetar()
 {
     archive=$1
@@ -132,11 +216,8 @@ dospinos2()
 {
     echo Zipping OS/2...
 
-    cd $MANIFESTDIR
-    cat generic.rsp os2.rsp jpeg.rsp tiff.rsp jpeg.rsp utils.rsp tex2rtf.rsp ogl.rsp xml.rsp contrib.rsp deprecated.rsp makefile.rsp > /tmp/os2files.in
-
     cd $APPDIR
-    expandlines /tmp/os2files.in /tmp/os2files
+    getfilelist "os2" /tmp/os2files
     
     # Zip up the complete wxOS2-xxx.zip file
     zip $ZIPFLAGS -@ $DESTDIR/wxOS2-$VERSION.zip < /tmp/os2files
@@ -149,17 +230,6 @@ dospinos2()
     mkdir $DESTDIR/wxWidgets-$VERSION
     cd $DESTDIR/wxWidgets-$VERSION
     unzip $ZIPFLAGS ../wxOS2-$VERSION.zip
-    # No longer do this, configure should be OK
-    # echo Overwriting with OS2-specific versions of configure files...
-    # unzip $ZIPFLAGS -o $APPDIR/distrib/os2/os2-specific.zip
-    rm -f src/gtk/descrip.mms src/motif/descrip.mms docs/pdf/*.pdf
-    rm -f src/tiff/*.mcp src/jpeg/*.mcp src/png/*.mcp src/zlib/*.mcp
-    rm -f -r docs/html/tex2rtf
-
-    # echo Making OS/2 files lower case...
-    # no longer necessary
-    # $SCRIPTDIR/namedown include/wx/os2/*.H
-    # $SCRIPTDIR/namedown src/os2/*.CPP src/os2/*.I
 
     echo Copying readme files...
     cp $APPDIR/docs/os2/install.txt INSTALL-OS2.txt
@@ -174,14 +244,10 @@ dospinmsw()
 {
     echo Zipping wxMSW...
     
-    cd $MANIFESTDIR
-    # add all the files into a megafile
-    cat generic.rsp makefile.rsp msw.rsp ogl.rsp mmedia.rsp stc.rsp tex2rtf.rsp jpeg.rsp tiff.rsp xml.rsp contrib.rsp deprecated.rsp utils.rsp utilmake.rsp univ.rsp wince.rsp palmos.rsp > /tmp/mswfiles.in
-    
     cd $APPDIR
 
     # now expand the wildcards to actual file names
-    expandlines /tmp/mswfiles.in /tmp/mswfiles
+    getfilelist "msw" /tmp/mswfiles
 
     # Create wxWidgets-$VERSION-win.zip which is used to create wxMSW
     echo Zipping individual components
@@ -301,68 +367,47 @@ dospindocs()
     rearchive wxWidgets-$VERSION-ExtraDoc.zip wxWidgets-$VERSION $DESTDIR
 }
 
-dospinmisc()
-{
+
+dospinport(){
+    port=$1
+    
+    if [ $port != "all" ]; then
+        portname="`echo $port|tr '[a-z]' '[A-Z]'`"    
+    else
+        portname="wxWidgets"
+    fi
+    
+    echo "Zipping wx$portname..."
+
     cd $APPDIR
+    portfiles="/tmp/wx$port.files"
+    getfilelist "$port" "$portfiles"
 
-    # zip up Univ-specific files
-    echo Creating $DESTDIR/wxWidgets-$VERSION-Univ.zip
-    expandlines $MANIFESTDIR/univ.rsp /tmp/univfiles
-    zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-Univ.zip < /tmp/univfiles
-    rearchive wxWidgets-$VERSION-Univ.zip wxWidgets-$VERSION $DESTDIR
-
-    # VC++ project files
-    echo Creating $DESTDIR/wxWidgets-$VERSION-VC.zip
-    expandlines $MANIFESTDIR/vc.rsp /tmp/vcfiles
-    zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-VC.zip < /tmp/vcfiles
-    rearchive wxWidgets-$VERSION-VC.zip wxWidgets-$VERSION $DESTDIR
-
-    # eVC++ project files
-    echo Creating $DESTDIR/wxWidgets-$VERSION-eVC.zip
-    expandlines $MANIFESTDIR/wince.rsp /tmp/wincefiles
-    zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-eVC.zip < /tmp/wincefiles
-    rearchive wxWidgets-$VERSION-eVC.zip wxWidgets-$VERSION $DESTDIR
-
-    # DMC project files
-    echo Creating $DESTDIR/wxWidgets-$VERSION-DMC.zip
-    expandlines $MANIFESTDIR/dmc.rsp /tmp/dmcfiles
-    zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-DMC.zip < /tmp/dmcfiles
-    rearchive wxWidgets-$VERSION-DMC.zip wxWidgets-$VERSION $DESTDIR
-
-    # BC++ project files
-    echo Creating $DESTDIR/wxWidgets-$VERSION-BC.zip
-    expandlines $MANIFESTDIR/bc.rsp /tmp/bcfiles
-    zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-BC.zip < /tmp/bcfiles
-    rearchive wxWidgets-$VERSION-BC.zip wxWidgets-$VERSION $DESTDIR
-
-    # CodeWarrior project files
-    echo Creating $DESTDIR/wxWidgets-$VERSION-CW.zip
-    expandlines $MANIFESTDIR/cw.rsp /tmp/cwfiles
-    zip $ZIPFLAGS -@ $DESTDIR/wxWidgets-$VERSION-CW.zip < /tmp/cwfiles
-    rearchive wxWidgets-$VERSION-CW.zip wxWidgets-$VERSION $DESTDIR
+    zip $ZIPFLAGS -@ $DESTDIR/wx$portname-$VERSION.zip < $portfiles 
+    zip $ZIPFLAGS -g $DESTDIR/wx$portname-$VERSION.zip LICENSE.txt COPYING.LIB CHANGES.txt README.txt
+    
+    if [ $port = "msw" ] || [ $port = "all" ]; then
+        zip $ZIPFLAGS -g $DESTDIR/wx$portname-$VERSION.zip README-MSW.txt INSTALL-MSW.txt        
+    fi
+    
+    if [ $port = "os2" ] || [ $port = "all" ]; then
+        zip $ZIPFLAGS -g $DESTDIR/wx$portname-$VERSION.zip INSTALL-OS2.txt          
+    fi
+    
+    # put all files in a wxWidgets-$VERSION subdir in the zip archive
+    rearchive wx$portname-$VERSION.zip wxWidgets-$VERSION $DESTDIR
 }
 
 dospininstaller()
 {
     cd $DESTDIR
 
-    # Put all archives for transit to Linux in a zip file
-    echo Creating $DESTDIR/wxWidgets-$VERSION-LinuxTransit.zip
-    rm -f $DESTDIR/wxWidgets-$VERSION-LinuxTransit.zip
-    zip $ZIPFLAGS $DESTDIR/wxWidgets-$VERSION-LinuxTransit.zip wxWidgets-$VERSION-LinuxDocs.zip wxWidgets-$VERSION-VC.zip wxWidgets-$VERSION-DMC.zip wxWidgets-$VERSION-eVC.zip wxWidgets-$VERSION-CW-Mac.zip
-
     rm -f -r wxWidgets-$VERSION
 
     echo Unzipping the Windows files into wxWidgets-$VERSION
 
     mkdir -p wxWidgets-$VERSION
 
-    unzip $ZIPFLAGS -o wxWidgets-$VERSION-win.zip -d wxWidgets-$VERSION
-    unzip $ZIPFLAGS -o wxWidgets-$VERSION-VC.zip -d wxWidgets-$VERSION
-    unzip $ZIPFLAGS -o wxWidgets-$VERSION-DMC.zip -d wxWidgets-$VERSION
-    unzip $ZIPFLAGS -o wxWidgets-$VERSION-BC.zip -d wxWidgets-$VERSION
-    unzip $ZIPFLAGS -o wxWidgets-$VERSION-CW.zip -d wxWidgets-$VERSION
-
     unzip $ZIPFLAGS -o wxWidgets-$VERSION-HTMLHelp.zip
     unzip $ZIPFLAGS -o wxWidgets-$VERSION-ExtraDoc.zip
 
@@ -382,25 +427,18 @@ dospininstaller()
     rm -f *.spec
     rm -f src/gtk/descrip.mms src/motif/descrip.mms
 
-    echo Copying readme files...
-    cp $APPDIR/docs/msw/readme.txt README-MSW.txt
-    cp $APPDIR/docs/msw/install.txt INSTALL-MSW.txt
-    cp $APPDIR/docs/licence.txt LICENCE.txt
-    cp $APPDIR/docs/lgpl.txt COPYING.LIB
-    cp $APPDIR/docs/changes.txt CHANGES.txt
-    cp $APPDIR/docs/readme.txt README.txt
 
     # Disabled for now - Now cp some binary files to 'bin'
     if [ ! -d bin ]; then
         mkdir bin
     fi
     
-    cp $APPDIR/bin/tex2rtf.exe bin
-    cp $APPDIR/bin/tex2rtf.chm bin
-    cp $APPDIR/bin/widgets.exe bin
-    cp $APPDIR/bin/life.exe bin
-    cp $APPDIR/demos/life/breeder.lif bin
-    cp $APPDIR/docs/htmlhelp/tex2rtf.chm bin
+    #cp $APPDIR/bin/tex2rtf.exe bin
+    #cp $APPDIR/bin/tex2rtf.chm bin
+    #cp $APPDIR/bin/widgets.exe bin
+    #cp $APPDIR/bin/life.exe bin
+    #cp $APPDIR/demos/life/breeder.lif bin
+    #cp $APPDIR/docs/htmlhelp/tex2rtf.chm bin
 
     if [ ! -d docs/pdf ]; then
         mkdir docs/pdf
@@ -412,88 +450,85 @@ dospininstaller()
     zip $ZIPFLAGS -r wxMSW-$VERSION.zip wxWidgets-$VERSION/*
     cd wxWidgets-$VERSION
 
-    echo Generating $SETUPSCRIPTNAME
-    rm -f $SETUPSCRIPTNAME
-
-    sh $SCRIPTDIR/msw/makeinno.sh $SETUPIMAGEDIR $INNOTOP $INNOBOTTOM $SETUPSCRIPTNAME
-
-    if [ ! -f $SETUPSCRIPTNAME ]; then
-        echo "*** Error - something went wrong with the script file generation."
-        exit 1
-    fi
-
-    # Now replace %VERSION% with the real application version, and other
-    # variables
-    echo Replacing variables in the setup script
-    doreplace $SETUPSCRIPTNAME "s/%VERSION%/$VERSION/g"
-    doreplace $SETUPSCRIPTNAME "s/%COPYRIGHTHOLDER%/$AUTHOR/g"
-    doreplace $SETUPSCRIPTNAME "s/%VENDOR%/$VENDOR/g"
-
-    unix2dosname $READMEFILE
-    doreplace $SETUPSCRIPTNAME "s;%READMEFILE%;$RETVALUE;g"
-
-    unix2dosname $READMEAFTERFILE
-    doreplace $SETUPSCRIPTNAME "s;%READMEAFTERFILE%;$RETVALUE;g"
-
-    unix2dosname $LICENSEFILE
-    doreplace $SETUPSCRIPTNAME "s;%LICENSEFILE%;$RETVALUE;g"
-
-    doreplace $SETUPSCRIPTNAME "s/%APPNAME%/$APPNAME/g"
-    doreplace $SETUPSCRIPTNAME "s/%APPTITLE%/$APPTITLE/g"
-
-    unix2dosname $SETUPIMAGEDIR
-    doreplace $SETUPSCRIPTNAME "s;%SOURCEDIR%;$RETVALUE;g"
-
-    unix2dosname $DESTDIR
-    doreplace $SETUPSCRIPTNAME "s;%OUTPUTDIR%;$RETVALUE;g"
-
-    doreplace $SETUPSCRIPTNAME "s/%APPEXTENSION%/$APPEXTENSION/g"
-
-    # FIXME: how do we get the first name in the list?
-       if [ "$MANUALFILES" != "" ]; then
-           HELPFILE=`basename $MANUALFILES`
-               unix2dosname $HELPFILE
-               doreplace $SETUPSCRIPTNAME "s;%HELPFILE%;$RETVALUE;g"
-    fi
-
-    rm -f $DESTDIR/setup*.* $DESTDIR/wxMSW-$VERSION-Setup.exe
-
-    # Inno Setup complains if this step is not done
-    unix2dos --unix2dos $SETUPSCRIPTNAME
+    if [ "$INNO" != "0" ]; then
+        echo Generating $SETUPSCRIPTNAME
+        rm -f $SETUPSCRIPTNAME
     
-    # Now invoke INNO compiler on the new ISS file
-    # First, make a DOS filename or Inno Setup will get confused.
-
-    unix2dosname2 $SETUPSCRIPTNAME
-    DOSFILENAME=$RETVALUE
-
-    # Note: the double slash is Mingw32/MSYS convention for
-    # denoting a switch, that must not be converted into
-    # a path (otherwise /c = c:/)
-
-    cd `dirname $SETUPSCRIPTNAME`
-    BASESCRIPTNAME=`basename $SETUPSCRIPTNAME`
-    echo Invoking Inno Setup compiler on $BASESCRIPTNAME
-
-    "$SETUPCOMPILER" //cc $BASESCRIPTNAME
+        sh $SCRIPTDIR/msw/makeinno.sh $SETUPIMAGEDIR $INNOTOP $INNOBOTTOM $SETUPSCRIPTNAME
+    
+        if [ ! -f $SETUPSCRIPTNAME ]; then
+            echo "*** Error - something went wrong with the script file generation."
+            exit 1
+        fi
+    
+        # Now replace %VERSION% with the real application version, and other
+        # variables
+        echo Replacing variables in the setup script
+        doreplace $SETUPSCRIPTNAME "s/%VERSION%/$VERSION/g"
+        doreplace $SETUPSCRIPTNAME "s/%COPYRIGHTHOLDER%/$AUTHOR/g"
+        doreplace $SETUPSCRIPTNAME "s/%VENDOR%/$VENDOR/g"
+    
+        unix2dosname $READMEFILE
+        doreplace $SETUPSCRIPTNAME "s;%READMEFILE%;$RETVALUE;g"
+    
+        unix2dosname $READMEAFTERFILE
+        doreplace $SETUPSCRIPTNAME "s;%READMEAFTERFILE%;$RETVALUE;g"
+    
+        unix2dosname $LICENSEFILE
+        doreplace $SETUPSCRIPTNAME "s;%LICENSEFILE%;$RETVALUE;g"
+    
+        doreplace $SETUPSCRIPTNAME "s/%APPNAME%/$APPNAME/g"
+        doreplace $SETUPSCRIPTNAME "s/%APPTITLE%/$APPTITLE/g"
+    
+        unix2dosname $SETUPIMAGEDIR
+        doreplace $SETUPSCRIPTNAME "s;%SOURCEDIR%;$RETVALUE;g"
+    
+        unix2dosname $DESTDIR
+        doreplace $SETUPSCRIPTNAME "s;%OUTPUTDIR%;$RETVALUE;g"
+    
+        doreplace $SETUPSCRIPTNAME "s/%APPEXTENSION%/$APPEXTENSION/g"
+    
+        # FIXME: how do we get the first name in the list?
+        if [ "$MANUALFILES" != "" ]; then
+            HELPFILE=`basename $MANUALFILES`
+            unix2dosname $HELPFILE
+            doreplace $SETUPSCRIPTNAME "s;%HELPFILE%;$RETVALUE;g"
+        fi
+    
+        rm -f $DESTDIR/setup*.* $DESTDIR/wxMSW-$VERSION-Setup.exe
+    
+        # Inno Setup complains if this step is not done
+        unix2dos --unix2dos $SETUPSCRIPTNAME
+        
+        # Now invoke INNO compiler on the new ISS file
+        # First, make a DOS filename or Inno Setup will get confused.
+    
+        unix2dosname2 $SETUPSCRIPTNAME
+        DOSFILENAME=$RETVALUE
+    
+        # Note: the double slash is Mingw32/MSYS convention for
+        # denoting a switch, that must not be converted into
+        # a path (otherwise /c = c:/)
+    
+        cd `dirname $SETUPSCRIPTNAME`
+        BASESCRIPTNAME=`basename $SETUPSCRIPTNAME`
+        echo Invoking Inno Setup compiler on $BASESCRIPTNAME
+    
+        "$SETUPCOMPILER" //cc $BASESCRIPTNAME
+    
+        if [ ! -f $DESTDIR/setup.exe ]; then
+            echo "*** Error - the setup.exe was not generated."
+            exit
+        fi
+    
+        cd $DESTDIR
+        mv setup.exe wxMSW-$VERSION-Setup.exe
 
-    if [ ! -f $DESTDIR/setup.exe ]; then
-        echo "*** Error - the setup.exe was not generated."
-        exit
     fi
-
-    cd $DESTDIR
-    mv setup.exe wxMSW-$VERSION-Setup.exe
-
     # echo Putting all the setup files into a single zip archive
     # zip wxMSW-$VERSION-setup.zip readme-$VERSION.txt setup*.*
 
-    rm -f wxWidgets-$VERSION-win.zip
     rm -f wxWidgets-$VERSION-ExtraDoc.zip
-    rm -f wxWidgets-$VERSION-DMC.zip
-    rm -f wxWidgets-$VERSION-eVC.zip
-    rm -f wxWidgets-$VERSION-Univ.zip
-    rm -f wxWidgets-$VERSION-VC.zip
     rm -f wxWidgets-$VERSION-DocSource.zip
     rm -f wxWidgets-$VERSION-LinuxDocs.zip
 
@@ -503,10 +538,6 @@ dospininstaller()
 
 makesetup()
 {
-#    if [ -d $SETUPIMAGEDIR ]; then
-#        echo Removing contents of existing $SETUPIMAGEDIR
-#        rm -f -r $SETUPIMAGEDIR/*
-#    fi
 
     if [ ! -d $SETUPIMAGEDIR ]; then
         echo Making the $SETUPIMAGEDIR for preparing the setup
@@ -574,7 +605,16 @@ makesetup()
     cp $WEBFILES/site/faq*.htm $APPDIR/docs/html
     cp $WEBFILES/site/platform.htm $APPDIR/docs/html
     cp $WEBFILES/site/i18n.htm $APPDIR/docs/html
-
+    
+    echo Copying readme files...
+    cp $APPDIR/docs/msw/readme.txt README-MSW.txt
+    cp $APPDIR/docs/msw/install.txt INSTALL-MSW.txt
+    cp $APPDIR/docs/os2/install.txt INSTALL-OS2.txt
+    cp $APPDIR/docs/licence.txt LICENCE.txt
+    cp $APPDIR/docs/lgpl.txt COPYING.LIB
+    cp $APPDIR/docs/changes.txt CHANGES.txt
+    cp $APPDIR/docs/readme.txt README.txt
+    
     # Copy setup0.h files to setup.h
     # OS/2 always built with configure now
     # cp $APPDIR/include/wx/os2/setup0.h $APPDIR/include/wx/os2/setup.h
@@ -583,77 +623,44 @@ makesetup()
 
     # Do OS/2 spin
     if [ "$SPINOS2" = "1" ] || [ "$SPINALL" = "1" ]; then
-        dospinos2
-    fi
-
-    # Do Mac spin
-    if [ "$SPINMAC" = "1" ] || [ "$SPINALL" = "1" ]; then
-        dospinmac
+        dospinport "os2" #dospinos2
     fi
 
     # Do MSW spin
     if [ "$SPINMSW" = "1" ] || [ "$SPINALL" = "1" ]; then
-        dospinmsw
+        dospinport "msw" #dospinmsw
     fi
 
     # Do wxBase spin
     if [ "$SPINBASE" = "1" ] || [ "$SPINALL" = "1" ]; then
-        dospinbase
+        dospinport "base" #dospinbase
     fi
 
     # Do wxAll spin
     if [ "$SPINWXALL" = "1" ] || [ "$SPINALL" = "1" ]; then
-        dospinwxall
+        dospinport "all" #dospinwxall
+    fi
+
+    if [ "$SPINALL" = "1" ]; then
+        dospinport "mgl"
+        dospinport "gtk"
+        dospinport "x11"
+        dospinport "motif"
+        dospinport "mac"
+        dospinport "cocoa"
+        #dospinwxall
     fi
 
+
     # Do docs spin
     if [ "$SPINDOCS" = "1" ] || [ "$SPINALL" = "1" ]; then
         dospindocs
     fi
 
-    # Do misc files spin
-    dospinmisc
-
-    cp $APPDIR/docs/changes.txt $DESTDIR/changes-$VERSION.txt
-    cp $APPDIR/docs/readme.txt $DESTDIR/readme-$VERSION.txt
-
-    cp $APPDIR/docs/msw/readme.txt $DESTDIR/readme-msw-$VERSION.txt
-    cp $APPDIR/docs/msw/install.txt $DESTDIR/install-msw-$VERSION.txt
-
-    cp $APPDIR/docs/mac/readme.txt $DESTDIR/readme-mac-$VERSION.txt
-    cp $APPDIR/docs/mac/install.txt $DESTDIR/install-mac-$VERSION.txt
-
-    cp $APPDIR/docs/motif/readme.txt $DESTDIR/readme-motif-$VERSION.txt
-    cp $APPDIR/docs/motif/install.txt $DESTDIR/install-motif-$VERSION.txt
-
-    cp $APPDIR/docs/gtk/readme.txt $DESTDIR/readme-gtk-$VERSION.txt
-    cp $APPDIR/docs/gtk/install.txt $DESTDIR/install-gtk-$VERSION.txt
-
-    cp $APPDIR/docs/x11/readme.txt $DESTDIR/readme-x11-$VERSION.txt
-#    cp $APPDIR/docs/x11/readme-nanox.txt $DESTDIR/readme-nanox-$VERSION.txt
-    cp $APPDIR/docs/x11/install.txt $DESTDIR/install-x11-$VERSION.txt
-
-    cp $APPDIR/docs/mgl/readme.txt $DESTDIR/readme-mgl-$VERSION.txt
-    cp $APPDIR/docs/mgl/install.txt $DESTDIR/install-mgl-$VERSION.txt
-
-    cp $APPDIR/docs/cocoa/readme.txt $DESTDIR/readme-cocoa-$VERSION.txt
-    cp $APPDIR/docs/cocoa/install.txt $DESTDIR/install-cocoa-$VERSION.txt
-
-    cp $APPDIR/docs/base/readme.txt $DESTDIR/readme-base-$VERSION.txt
-
-    cp $APPDIR/docs/os2/install.txt $DESTDIR/install-os2-$VERSION.txt
-
-    cp $APPDIR/docs/univ/readme.txt $DESTDIR/readme-univ-$VERSION.txt
-
-    cp $APPDIR/docs/readme_vms.txt $DESTDIR/readme-vms-$VERSION.txt
-
-    # cp $APPDIR/docs/motif/makewxmotif $DESTDIR/makewxmotif-$VERSION
-    # cp $APPDIR/docs/gtk/makewxgtk $DESTDIR/makewxgtk-$VERSION
+    docopydocs $APPDIR $DESTDIR
     
     # Time to regenerate the Inno Install script
-    if [ "$INNO" != "0" ]; then
-        dospininstaller
-    fi
+    dospininstaller
 }
 
 # Get the makefiles that aren't in CVS and unarchive them
@@ -700,6 +707,7 @@ usage()
 # Process command line options.
 
 for i in "$@"; do
+
     case "$i" in
        --inno) INNO=1 ;;
        --no-inno) INNO=0 ;;