Also build and ship openal on Linux

The Steam runtime ships a too-old version of OpenAL and it's difficult
for them to upgrade.

Note that this needs a new version of cmake installed in your chroots.
This commit is contained in:
Andrew Eikum 2018-06-11 10:47:25 -05:00
parent a709db555d
commit dbb34551e9
4 changed files with 59 additions and 26 deletions

View file

@ -33,7 +33,7 @@ obtain the various submodules that go into building Proton:
cd proton
#for linux:
git submodule update --init wine dxvk ffmpeg
git submodule update --init wine dxvk ffmpeg openal-soft
#for macos:
git submodule update --init
@ -84,7 +84,11 @@ And then repeat all of the commands to install gcc and Wine dependencies again.
In addition, your host system will need to be able to run Wine in both 64- and
32-bit modes in order to create the default prefix. It is recommended to
install Wine from your package manager, including its optional dependencies.
You will also need the Steam runtime located at $HOME/steam-runtime.
The openal-soft build system requires cmake 3.0.2 or later, which is newer than
the Steam runtime SDK provides. You will need to build and install a newer
cmake into each of the runtimes. For convenience, the build_proton.sh script
will attempt to use cmake from ~/opt32/bin/ and ~/opt64/bin/, if available.
Finally, change your directory back to proton, and run:

View file

@ -128,29 +128,28 @@ build_libjpeg()
build_openal()
{
#openal 32-bit
cd "$TOP"
mkdir -p build/openal.win32
cd build/openal.win32
cmake "$TOP"/openal-soft -DCMAKE_C_FLAGS="-m32" -DCMAKE_INSTALL_PREFIX="$TOOLS_DIR32"
make $JOBS VERBOSE=1
make install VERBOSE=1
cp ./libopenal.dylib "$DST_DIR"/lib/libopenal.1.dylib
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib/libopenal.1.dylib
if [ ! -e "$TOOLS_DIR64"/lib/libopenal.$LIB_SUFFIX ]; then
#openal 32-bit
cd "$TOP"
mkdir -p build/openal.win32
cd build/openal.win32
$I386_WRAPPER $CMAKE32 "$TOP"/openal-soft -DCMAKE_C_FLAGS="-m32" -DCMAKE_INSTALL_PREFIX="$TOOLS_DIR32"
$I386_WRAPPER make $JOBS VERBOSE=1
$I386_WRAPPER make install VERBOSE=1
#openal 64-bit
cd "$TOP"
mkdir -p build/openal.win64
cd build/openal.win64
$AMD64_WRAPPER $CMAKE64 "$TOP"/openal-soft -DCMAKE_INSTALL_PREFIX="$TOOLS_DIR64"
$AMD64_WRAPPER make $JOBS VERBOSE=1
$AMD64_WRAPPER make install VERBOSE=1
fi
#openal 64-bit
cd "$TOP"
mkdir -p build/openal.win64
cd build/openal.win64
cmake "$TOP"/openal-soft -DCMAKE_INSTALL_PREFIX="$TOOLS_DIR64"
make $JOBS VERBOSE=1
make install VERBOSE=1
cp ./libopenal.dylib "$DST_DIR"/lib64/libopenal.1.dylib
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib64/libopenal.1.dylib
fi
cp -L "$TOOLS_DIR32"/lib/libopenal* "$DST_DIR"/lib/
cp -L "$TOOLS_DIR64"/lib/libopenal* "$DST_DIR"/lib64/
$STRIP "$DST_DIR"/lib/libopenal.$LIB_SUFFIX
$STRIP "$DST_DIR"/lib64/libopenal.$LIB_SUFFIX
}
build_libSDL()
@ -198,8 +197,10 @@ build_moltenvk()
}
if [ "$PLATFORM" == "Darwin" ]; then
LIB_SUFFIX="dylib"
STRIP='strip -x'
else
LIB_SUFFIX="so"
STRIP='strip'
fi
@ -240,10 +241,22 @@ if [ "$PLATFORM" == "Darwin" ]; then
CC="$CCACHE clang"
AMD64_WRAPPER=""
I386_WRAPPER=""
CMAKE32="cmake"
CMAKE64="cmake"
else
CC="$CCACHE gcc"
AMD64_WRAPPER="schroot --chroot steamrt_scout_beta_amd64 --"
I386_WRAPPER="schroot --chroot steamrt_scout_beta_i386 --"
if [ -e "$HOME/opt32/bin/cmake" ]; then
CMAKE32="$HOME/opt32/bin/cmake"
else
CMAKE32="cmake"
fi
if [ -e "$HOME/opt64/bin/cmake" ]; then
CMAKE64="$HOME/opt64/bin/cmake"
else
CMAKE64="cmake"
fi
gcc_ver=$($AMD64_WRAPPER gcc -v 2>&1 | grep 'gcc version' | cut -d' ' -f3)
gcc_maj=$(echo $gcc_ver | cut -d'.' -f1)
@ -294,8 +307,6 @@ if [ "$PLATFORM" == "Darwin" ]; then
JPEG64_LIBS="-L$TOOLS_DIR64/lib -lprotonjpeg"
ac_cv_lib_soname_jpeg64=libprotonjpeg.dylib
build_openal
build_libSDL
build_moltenvk
@ -475,7 +486,7 @@ git submodule status -- dxvk > "$DST_DIR"/lib/wine/dxvk/version
#build ffmpeg
function build_ffmpeg
{
if [ ! '(' -e "$TOOLS_DIR64/lib/libavcodec.so" -o -e "$TOOLS_DIR64/lib/libavcodec.dylib" ')' ]; then
if [ ! -e "$TOOLS_DIR64/lib/libavcodec.$LIB_SUFFIX" ]; then
#ffmpeg 32-bit
cd "$TOP"
mkdir -p build/ffmpeg.win32
@ -552,6 +563,8 @@ function build_ffmpeg
build_ffmpeg
build_openal
case "$BUILD_COMPONENTS" in
"all")
build_wine64

View file

@ -67,3 +67,11 @@ This software contains FFmpeg licensed under the LGPL 2.1.
Visit FFmpeg at
https://ffmpeg.org/
---- ---- ---- ----
This software contains openal-soft licensed under the LGPL 2.
Visit openal-soft at
https://github.com/kcat/openal-soft/

View file

@ -96,3 +96,11 @@ This software contains FFmpeg licensed under the LGPL 2.1.
Visit FFmpeg at
https://ffmpeg.org/
---- ---- ---- ----
This software contains openal-soft licensed under the LGPL 2.
Visit openal-soft at
https://github.com/kcat/openal-soft/