summaryrefslogtreecommitdiff
path: root/docker-script
blob: b75dde8ca67e2e07d0263c90a3a401c0467e462c (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
set -e

CPUS=${CPUS:-4}
TRAVIS_TAG=${TRAVIS_TAG:-}

rm -fr bin linux osx win32 win64

# GNU/Linux
export CC=gcc-4.8
export CXX=g++-4.8
export AR=ar
export CXXFLAGS=
export CFLAGS=
export LDFLAGS=
make clean
rm -fr bin
mkdir bin
make -j${CPUS} LINUX=true HAVE_CAIRO=false HAVE_JACK=false
mv bin linux

# OSX
mkdir bin
export CC=i686-apple-darwin10-gcc
export CXX=i686-apple-darwin10-g++
export AR=i686-apple-darwin10-ar
export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig
export CXXFLAGS="-I/opt/local/include"
export CFLAGS="-I/opt/local/include"
make clean
touch dpf/utils/lv2_ttl_generator
chmod a+x dpf/utils/lv2_ttl_generator
make MACOS=true MACOS_OLD=true -j${CPUS} HAVE_CAIRO=false HAVE_JACK=false
mv bin osx

# WIN32
mkdir bin
export PATH=$PATH:/opt/mingw64/bin
export CXXFLAGS="-m32 -I/opt/mingw64/x86_64-w64-mingw32/include -I/opt/mingw64/include"
export CFLAGS="-m32 -I/opt/mingw64/x86_64-w64-mingw32/include -I/opt/mingw64/include"
export LDFLAGS=-m32
export PKG_CONFIG_PATH=/opt/mingw64/lib32/pkgconfig
export CC=x86_64-w64-mingw32-gcc
export CXX=x86_64-w64-mingw32-g++
export AR=x86_64-w64-mingw32-ar
make clean
touch dpf/utils/lv2_ttl_generator.exe
chmod a+x dpf/utils/lv2_ttl_generator.exe
make WIN32=true -j${CPUS} HAVE_CAIRO=false HAVE_JACK=false
mv bin win32

# WIN64
mkdir bin
export CXXFLAGS="-I/opt/mingw64/x86_64-w64-mingw32/include -I/opt/mingw64/include"
export CFLAGS="-I/opt/mingw64/x86_64-w64-mingw32/include -I/opt/mingw64/include"
export LDFLAGS=
export PKG_CONFIG_PATH=/opt/mingw64/lib/pkgconfig
make clean
touch dpf/utils/lv2_ttl_generator.exe
chmod a+x dpf/utils/lv2_ttl_generator.exe
make WIN32=true -j${CPUS} HAVE_CAIRO=false HAVE_JACK=false
mv bin win64

# Metadata for LV2
mkdir bin
cd linux
for f in *.lv2; do cd $f; cp *.ttl ../../osx/$f/ ; cd .. ; done
for f in *.lv2; do cd $f; cp *.ttl ../../win32/$f/ ; cd .. ; done
for f in *.lv2; do cd $f; cp *.ttl ../../win64/$f/ ; cd .. ; done
cd ../osx
for f in *.lv2; do cd $f; perl -pi -e 's/\.so/\.dylib/g' manifest.ttl; perl -pi -e 's/X11UI/CocoaUI/g' manifest.ttl; cd .. ; done
cd ../win32
for f in *.lv2; do cd $f; perl -pi -e 's/\.so/\.dll/g' manifest.ttl; perl -pi -e 's/X11UI/WindowsUI/g' manifest.ttl; cd .. ; done
cd ../win64
for f in *.lv2; do cd $f; perl -pi -e 's/\.so/\.dll/g' manifest.ttl; perl -pi -e 's/X11UI/WindowsUI/g' manifest.ttl; cd .. ; done

# Release
cd ../linux
zip -9 -r zam-plugins-${TRAVIS_TAG}-linuxlv2.zip *.lv2
mv *.zip ../bin
cd ../osx
zip -9 -r zam-plugins-${TRAVIS_TAG}-osxlv2.zip *.lv2
zip -9 -r zam-plugins-${TRAVIS_TAG}-osxvst.zip *.vst
mv *.zip ../bin
cd ../win32
zip -9 -r zam-plugins-${TRAVIS_TAG}-win32lv2.zip *.lv2
zip -9 -r zam-plugins-${TRAVIS_TAG}-win32vst.zip *-vst.dll
mv *.zip ../bin
cd ../win64
zip -9 -r zam-plugins-${TRAVIS_TAG}-win64lv2.zip *.lv2
zip -9 -r zam-plugins-${TRAVIS_TAG}-win64vst.zip *-vst.dll
mv *.zip ../bin
cd ../bin
ls -l
echo "ALL DONE!!!"