File: linux_buildAll.sh

package info (click to toggle)
iem-plugin-suite 1.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,756 kB
  • sloc: cpp: 124,611; makefile: 170; sh: 111
file content (47 lines) | stat: -rwxr-xr-x 1,617 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

error() {
  echo "$@" 1>&2
}
scriptpath="${0%/*}"

# search for projucer (should be configured with global pathes before)
# try to find Projucer in one of:
# - ./JUCE/
# - ${scriptpath}/JUCE/
# - ~/JUCE/ (where Roli suggests to install it
# - your system path (e.g. installed by Debian)
which=$(which which)
_projucer=Projucer
projucer=${PROJUCER:=$(PATH=$(pwd)/JUCE:${HOME}/JUCE:${0%/*}/JUCE:${PATH} ${which} ${_projucer})}
if [ ! -x "${projucer}" ]; then
    if [ "x${projucer}" = "x" ]; then projucer=${_projucer}; fi
    error "no executable '$projucer' found!"
    error "  - either set the PROJUCER environment variable to the full path of the binary"
    error "  - or install ${_projucer} in $(pwd)/JUCE, ${scriptpath}/JUCE or ~/JUCE"
fi
echo "using '$projucer' as ${_projucer}"


cd ${0%/*}
mkdir -p _compiledPlugins/linux/IEM
mkdir -p _compiledPlugins/linux/Standalone

for f in */*.jucer; do
    d=${f%/*}

    if [ -x "${projucer}" ]; then ${projucer} --resave ${f}; fi  

    echo "Compiling $d for Linux..."
    if [ -d "${d}/Builds/LinuxMakefile" ]; then
        make CONFIG=Release AR=gcc-ar -j$(nproc) -k -C "${d}/Builds/LinuxMakefile"
        echo "done..."
        cp -R -H "${d}/Builds/LinuxMakefile/build/${d}.so" "_compiledPlugins/linux/IEM/"
        cp -R -H "${d}/Builds/LinuxMakefile/build/${d}" "_compiledPlugins/linux/Standalone/"
    else
        echo "no makefile found, moving on..."
    fi
done
find "_compiledPlugins/linux/IEM/" -type f -exec strip --strip-unneeded {} \;
find "_compiledPlugins/linux/Standalone/" -type f -exec strip --strip-unneeded {} \;
echo "all done!"