Browse Source

Add cabbage extra generation scripts

tags/2018-04-16
falkTX 8 years ago
parent
commit
28f18f837d
3 changed files with 86 additions and 0 deletions
  1. +1
    -0
      Makefile
  2. +50
    -0
      scripts/generate-cabbage-lv2_extra.sh
  3. +35
    -0
      scripts/generate-ttl_extra.sh

+ 1
- 0
Makefile View File

@@ -73,6 +73,7 @@ clean:
$(MAKE) clean -C plugins
$(MAKE) clean -C ports
rm -rf bin/lv2/*.lv2/
rm -rf bin/lv2-extra/

distclean: clean
$(MAKE) distclean -C libs/dgl


+ 50
- 0
scripts/generate-cabbage-lv2_extra.sh View File

@@ -0,0 +1,50 @@
#!/bin/bash

set -e

if [ -d bin ]; then
cd bin
else
echo "Please run this script from the distrho root folder"
exit
fi

if [ ! -f cabbage/CabbagePluginSynthLv2.lv2/CabbagePluginSynthLv2.so ]; then exit 0; fi
if [ ! -f cabbage/CabbagePluginMidiLv2.lv2/CabbagePluginMidiLv2.so ]; then exit 0; fi
if [ ! -f cabbage/CabbagePluginEffectLv2.lv2/CabbagePluginEffectLv2.so ]; then exit 0; fi

mkdir -p lv2

if [ -f ../libs/lv2_ttl_generator.exe ]; then
GEN=../../../libs/lv2_ttl_generator.exe
EXT=dll
else
GEN=../../../libs/lv2_ttl_generator
EXT=so
fi

FILES=`find ./cabbage-extra -name \*.csd`

for i in $FILES; do
basename=`echo $i | awk 'sub("./cabbage-extra/","")' | awk 'sub("/","\n")' | tail -n 1 | awk 'sub(".csd","")'`
basename=`echo "cabbage-$basename"`
lv2dir=`echo "./lv2-extra/"$basename".lv2/"`

mkdir -p -v $lv2dir

if ( echo $i | grep "./cabbage/Synths/" > /dev/null ); then
cp -v `pwd`/cabbage/CabbagePluginSynthLv2.lv2/CabbagePluginSynthLv2.so $lv2dir/$basename.$EXT
elif ( echo $i | grep "./cabbage/MIDI/" > /dev/null ); then
cp -v `pwd`/cabbage/CabbagePluginMidiLv2.lv2/CabbagePluginMidiLv2.so $lv2dir/$basename.$EXT
else
cp -v `pwd`/cabbage/CabbagePluginEffectLv2.lv2/CabbagePluginEffectLv2.so $lv2dir/$basename.$EXT
fi

cp -v $i $lv2dir/$basename.csd

done

# Special files
# cp -v cabbage/Synths/bassline.snaps lv2/cabbage-bassline.lv2/

cd ..

+ 35
- 0
scripts/generate-ttl_extra.sh View File

@@ -0,0 +1,35 @@
#!/bin/bash

set -e

if [ -d bin ]; then
cd bin
else
echo "Please run this script from the distrho root folder"
exit
fi

PWD=`pwd`

if [ -f $PWD/../libs/lv2_ttl_generator.exe ]; then
GEN=$PWD/../libs/lv2_ttl_generator.exe
EXT=dll
elif [ -d /Developer ]; then
GEN=$PWD/../libs/lv2_ttl_generator
EXT=dylib
else
GEN=$PWD/../libs/lv2_ttl_generator
EXT=so
fi

FOLDERS=`find ./lv2-extra/ -name \*.lv2`

for i in $FOLDERS; do
cd $i
FILE=`ls *.$EXT | sort | head -n 1`
$GEN ./$FILE
cd ../..
done

# Remove cabbage logs
rm -f $PWD/lv2-extra/cabbage*.lv2/CabbageLog.txt

Loading…
Cancel
Save