]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/bin/package-zip32.sh
* Documentation/user/lilypond-book.itely
[lilypond.git] / stepmake / bin / package-zip32.sh
1 #!/bin/sh
2 # package-zip32.sh --- make a windoze formated distribution
3
4 set -x
5
6 if [ $# -lt 1 ]; then
7         echo "Usage: $0 PACKAGE_SOURCEDIR"
8         exit 2
9 fi
10
11 srcdir=$1
12 shift
13
14 . $srcdir/VERSION
15
16 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
17 if [ "x$MY_PATCH_LEVEL" != "x" ]; then
18     VERSION=$VERSION.$MY_PATCH_LEVEL
19 fi
20
21 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
22 name=$package-$VERSION
23 ZIP_CMD="zip -r -9"
24
25 here=`pwd`
26 cd $srcdir/.. 
27 PACKAGE_ROOTDIR=`pwd` 
28 export PACKAGE_ROOTDIR 
29 cd $here
30
31 RELEASE_DIR="$PACKAGE_ROOTDIR/bin.releases/winnt"
32 ZIP_FILE="$RELEASE_DIR/$name.bin.zip"
33
34
35 if [ ! -e $RELEASE_DIR ]; then
36     mkdir -p $RELEASE_DIR
37 fi
38
39 distdir=/tmp/${name}
40
41 #
42 # Maybe we can get away without reconfiguring
43 #
44 # rm -f ${srcdir}/config.cache
45 # PYTHON=${PYTHON:-python} ${srcdir}/configure --prefix=${distdir} \
46 #     --srcdir=${srcdir}
47
48 if ! make ; then
49     echo "make failed"
50     exit 1
51 fi
52
53 # failure allowed
54 #make -C Documentation info
55
56 if ! make install ; then
57     echo "make install failed"
58     exit 1
59 fi
60
61 #if ! make -C Documentation/man WWW ; then
62 #    echo "make -C documentation/man WWW failed"
63 #    exit 1
64 #fi
65
66 if ! make -C Documentation/ntweb WWW ; then
67     echo "make -C documentation/ntweb WWW failed"
68     exit 1
69 fi
70
71 #
72 # Post install clean up
73 #
74 CYGWIN_LIB=$PACKAGE_ROOTDIR/distfiles/winnt/cygwin1.dll
75 if [ ! -e $CYGWIN_LIB ]; then
76     echo "Unable to locate $CYGWIN_LIB"
77     exit 1
78 fi
79
80 #
81 # copy cygwin lib into bin
82 #
83 cp $CYGWIN_LIB $distdir/bin
84
85 ASH_EXE=$PACKAGE_ROOTDIR/distfiles/winnt/ash.exe
86 if [ ! -e $ASH_EXE ]; then
87     echo "Unable to locate $ASH_EXE"
88     exit 1
89 fi
90
91 #
92 # copy ash into bin
93 #
94 cp $ASH_EXE $distdir/bin
95
96 GUILE_SCM=$PACKAGE_ROOTDIR/distfiles/winnt/ice-9
97 if [ ! -e $GUILE_SCM ]; then
98     echo "Unable to locate $GUILE_SCM"
99     exit 1
100 fi
101
102 #
103 # copy guile init files into share/lilypond
104 #
105 echo "copy $GUILE_SCM to $distdir/share/lilypond"
106 cp -r $GUILE_SCM $distdir/share/lilypond
107
108 #
109 # Rename python files to <filename>.py
110 #
111 mv $distdir/bin/lilypond $distdir/bin/lilypond.py
112 mv $distdir/bin/convert-mudela $distdir/bin/convert-mudela.py
113 mv $distdir/bin/mudela-book $distdir/bin/mudela-book.py
114
115 #
116 # copy man documentation to doc directory
117 #
118 #mkdir $distdir/doc
119 #cp Documentation/man/out/*.html $distdir/doc
120
121 #
122 # copy web documentation to web directory
123 #
124 mkdir $distdir/web
125 for i in index.html guile-1.3.4-gnu-windows.patch angels.ly
126 do
127   cp Documentation/ntweb/out/$i $distdir/web || exit 1
128 done
129
130 #
131 # Zip it up
132 #
133 cd $distdir/..
134 $ZIP_CMD $ZIP_FILE $name
135 echo "Wrote $ZIP_FILE"
136 rm -rf $name
137 exit 0
138
139