-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-cmd.sh
executable file
·124 lines (103 loc) · 4.32 KB
/
build-cmd.sh
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/bin/bash
cd "$(dirname "$0")"
# turn on verbose debugging output for parabuild logs.
set -x
# make errors fatal
set -e
if [ -z "$AUTOBUILD" ] ; then
fail
fi
if [ "$OSTYPE" = "cygwin" ] ; then
export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
fi
OGG_VERSION=1.2.2
OGG_SOURCE_DIR="libogg-$OGG_VERSION"
VORBIS_VERSION=1.3.2
VORBIS_SOURCE_DIR=libvorbis-$VORBIS_VERSION
# load autbuild provided shell functions and variables
eval "$("$AUTOBUILD" source_environment)"
top="$(pwd)"
stage="$(pwd)/stage"
case "$AUTOBUILD_PLATFORM" in
windows*)
if [ "$AUTOBUILD_PLATFORM" == "windows64" ]; then
build_target="x64"
else
build_target="Win32"
fi
if [ "$AUTOBUILD_VSVER" -gt "100" ]; then
proj_suffix=".vcxproj"
else
proj_suffix=""
fi
pushd "$OGG_SOURCE_DIR"
packages="$(cygpath -m "$stage/packages")"
build_sln "win32/ogg.sln" "Debug|$build_target" "ogg_static$proj_suffix"
build_sln "win32/ogg.sln" "Release|$build_target" "ogg_static$proj_suffix"
mkdir -p "$stage/lib"/{debug,release}
cp "win32/Static_Debug/ogg_static_d.lib" "$stage/lib/debug/ogg_static_d.lib"
cp "win32/Static_Debug/vc100.pdb" "$stage/lib/debug/ogg_static_d.pdb"
cp "win32/Static_Release/ogg_static.lib" "$stage/lib/release/ogg_static.lib"
cp "win32/Static_Release/vc100.pdb" "$stage/lib/release/ogg_static.pdb"
mkdir -p "$stage/include"
cp -a "include/ogg/" "$stage/include/"
popd
pushd "$VORBIS_SOURCE_DIR"
build_sln "win32/vorbis.sln" "Debug|$build_target" "vorbis_static$proj_suffix"
build_sln "win32/vorbis.sln" "Release|$build_target" "vorbis_static$proj_suffix"
build_sln "win32/vorbis.sln" "Debug|$build_target" "vorbisenc_static$proj_suffix"
build_sln "win32/vorbis.sln" "Release|$build_target" "vorbisenc_static$proj_suffix"
build_sln "win32/vorbis.sln" "Debug|$build_target" "vorbisfile_static$proj_suffix"
build_sln "win32/vorbis.sln" "Release|$build_target" "vorbisfile_static$proj_suffix"
cp "win32/Vorbis_Static_Debug/vorbis_static_d.lib" "$stage/lib/debug/vorbis_static_d.lib"
cp "win32/Vorbis_Static_Debug/vc100.pdb" "$stage/lib/debug/vorbis_static_d.pdb"
cp "win32/Vorbis_Static_Release/vorbis_static.lib" "$stage/lib/release/vorbis_static.lib"
cp "win32/Vorbis_Static_Release/vc100.pdb" "$stage/lib/release/vorbis_static.pdb"
cp "win32/VorbisEnc_Static_Debug/vorbisenc_static_d.lib" "$stage/lib/debug/vorbisenc_static_d.lib"
cp "win32/VorbisEnc_Static_Debug/vc100.pdb" "$stage/lib/debug/vorbisenc_static_d.pdb"
cp "win32/VorbisEnc_Static_Release/vorbisenc_static.lib" "$stage/lib/release/vorbisenc_static.lib"
cp "win32/VorbisEnc_Static_Release/vc100.pdb" "$stage/lib/release/vorbis_static.pdb"
cp "win32/VorbisFile_Static_Debug/vorbisfile_static_d.lib" "$stage/lib/debug/vorbisfile_static_d.lib"
cp "win32/VorbisFile_Static_Debug/vc100.pdb" "$stage/lib/debug/vorbis_static_d.pdb"
cp "win32/VorbisFile_Static_Release/vorbisfile_static.lib" "$stage/lib/release/vorbisfile_static.lib"
cp "win32/VorbisFile_Static_Release/vc100.pdb" "$stage/lib/release/vorbis_static.pdb"
cp -a "include/vorbis/" "$stage/include/"
popd
;;
"darwin")
pushd "$OGG_SOURCE_DIR"
./configure --prefix="$stage"
make
make install
popd
pushd "$VORBIS_SOURCE_DIR"
./configure --prefix="$stage"
make
make install
popd
mv "$stage/lib" "$stage/release"
mkdir -p "$stage/lib"
mv "$stage/release" "$stage/lib"
;;
"linux")
pushd "$OGG_SOURCE_DIR"
CFLAGS="-m32" CXXFLAGS="-m32" ./configure --prefix="$stage"
make
make install
popd
pushd "$VORBIS_SOURCE_DIR"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$stage/lib"
CFLAGS="-m32" CXXFLAGS="-m32" ./configure --prefix="$stage"
make
make install
popd
mv "$stage/lib" "$stage/release"
mkdir -p "$stage/lib"
mv "$stage/release" "$stage/lib"
;;
esac
mkdir -p "$stage/LICENSES"
pushd "$OGG_SOURCE_DIR"
cp COPYING "$stage/LICENSES/ogg-vorbis.txt"
popd
pass