[22243] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | package=jAudio0.4
|
---|
| 4 | version=-cvs-06052010
|
---|
| 5 |
|
---|
| 6 | progname=$0
|
---|
| 7 |
|
---|
| 8 | source ../../cascade-make/lib/cascade-lib.bash GEXT_MUSICIR ../.. $*
|
---|
| 9 |
|
---|
| 10 | prefix=$GEXT_MUSICIR_INSTALLED
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | opt_run_untar $force_untar $auto_untar $package $version
|
---|
| 14 | if [ -d "$package" ] ; then
|
---|
| 15 | mv "$package" "$package$version"
|
---|
| 16 | fi
|
---|
| 17 |
|
---|
| 18 | if [ $compile = "1" ] ; then
|
---|
| 19 | cd $package$version
|
---|
| 20 | classpath=".:jAudioFeatureExtractor:tritonus_remaining-0.3.6.jar:tritonus_share-0.3.6.jar:xerces.jar:jhall.jar:mp3plugin.jar"
|
---|
| 21 |
|
---|
[28367] | 22 | auxfiles=`ls jAudioFeatureExtractor/AudioFeatures/*.java`
|
---|
[22243] | 23 |
|
---|
| 24 | which cygpath 2>&1 > /dev/null
|
---|
| 25 | if [ $? = "0" ] ; then
|
---|
| 26 | classpath=`cygpath -pw "$classpath"`
|
---|
| 27 | fi
|
---|
| 28 |
|
---|
[28367] | 29 | for auxfile in $auxfiles ; do
|
---|
| 30 |
|
---|
| 31 | which cygpath 2>&1 > /dev/null
|
---|
| 32 | if [ $? = "0" ] ; then
|
---|
| 33 | auxfile=`cygpath -w "$auxfile"`
|
---|
| 34 | fi
|
---|
| 35 |
|
---|
| 36 | echo " Compiling Java source file '$auxfile'"
|
---|
| 37 | javac -classpath "$classpath" $auxfiles
|
---|
| 38 | done
|
---|
| 39 |
|
---|
[22243] | 40 | javac -classpath "$classpath" jAudioFE.java
|
---|
| 41 |
|
---|
| 42 | cd ..
|
---|
| 43 |
|
---|
| 44 | fi
|
---|
| 45 |
|
---|
| 46 | if [ $install = "1" ] ; then
|
---|
| 47 | cd $package$version
|
---|
| 48 |
|
---|
| 49 | /bin/rm -f jaudio.jar
|
---|
| 50 |
|
---|
| 51 | jarcp=`ls *.jar | tr '\n' ' '`
|
---|
| 52 |
|
---|
| 53 | echo "Manifest-Version: 1.0" > Manifest.txt && \
|
---|
| 54 | echo "Main-Class: jAudioFE" >> Manifest.txt && \
|
---|
| 55 | echo "Class-Path: $jarcp plugin" >> Manifest.txt
|
---|
| 56 |
|
---|
| 57 | class_files=`find . -name "*.class" -print`
|
---|
| 58 |
|
---|
| 59 | which cygpath 2>&1 >/dev/null
|
---|
| 60 | if [ $? = "0" ] ; then
|
---|
| 61 | class_files=`cygpath -w $class_files`
|
---|
| 62 | fi
|
---|
| 63 |
|
---|
| 64 | echo " Bundling Java classes (and related files) into jaudio.jar"
|
---|
| 65 |
|
---|
[30385] | 66 | #$class_files \
|
---|
| 67 |
|
---|
| 68 | jar cfm jaudio.jar Manifest.txt \
|
---|
| 69 | JAudioCommandLine.class \
|
---|
| 70 | jAudioFE.class \
|
---|
[22243] | 71 | jAudioFeatureExtractor org \
|
---|
| 72 | features \
|
---|
| 73 | help JavaHelpSearch \
|
---|
| 74 | Map.jhm Sample.hs SampleIndex.xml SampleTOC.xml \
|
---|
| 75 | && \
|
---|
| 76 | /bin/cp *.jar $GEXT_MUSICIR/lib/java/. \
|
---|
| 77 |
|
---|
| 78 | echo "Configuring features.xml"
|
---|
| 79 |
|
---|
| 80 | plugin_home="$GEXT_MUSICIR/lib/java"
|
---|
| 81 | which cygpath 2>&1 >/dev/null
|
---|
| 82 | if [ $? = "0" ] ; then
|
---|
| 83 | plugin_home=`cygpath -w "$plugin_home"`
|
---|
| 84 | plugin_home=`echo "$plugin_home" | sed 's@\\\\@\\\\\\\\@g'`
|
---|
| 85 | fi
|
---|
| 86 |
|
---|
| 87 |
|
---|
| 88 | cat ../etc/features.xml.in \
|
---|
| 89 | | sed -e "s@\*\*pluginhome\*\*@$plugin_home@g" \
|
---|
| 90 | > $GEXT_MUSICIR/lib/java/features.xml
|
---|
| 91 |
|
---|
| 92 | if [ ! -d "$GEXT_MUSICIR/lib/java/plugin" ] ; then
|
---|
| 93 | echo "Creating $GEXT_MUSICIR/lib/java/plugin"
|
---|
| 94 | mkdir "$GEXT_MUSICIR/lib/java/plugin"
|
---|
| 95 | fi
|
---|
| 96 |
|
---|
| 97 | cd ..
|
---|
| 98 | fi
|
---|
| 99 |
|
---|
| 100 | #opt_run_make $clean $package $version "clean"
|
---|
| 101 | #opt_run_make $distclean $package $version "distclean"
|
---|
| 102 |
|
---|
| 103 | opt_run_tarclean $tarclean $package $version
|
---|