Switch to new steam runtime chroots

This commit is contained in:
Andrew Eikum 2018-01-25 13:08:27 -06:00
parent 04174e94e7
commit fd300c22e4

View file

@ -8,6 +8,8 @@ set -e
TOP="$PWD"
RUNTIME_PATH="$TOP/../../runtime/steam-runtime-both/"
AMD64_WRAPPER="schroot --chroot steamrt_scout_beta_amd64 --"
I386_WRAPPER="schroot --chroot steamrt_scout_beta_i386 --"
DST_DIR="$TOP/build/dist"
TOOLS_DIR64="$TOP/build/tools.win64"
TOOLS_DIR32="$TOP/build/tools.win32"
@ -16,17 +18,17 @@ mkdir -p dist "$DST_DIR"/bin build/wine.win32 build/dist.win32 build/wine.win64
#build wine64
cd "$TOP"/build/wine.win64
CC="ccache gcc" "$RUNTIME_PATH/shell-amd64.sh" "$TOP"/wine/configure --enable-win64 --disable-tests --prefix="$DST_DIR"
"$RUNTIME_PATH/shell-amd64.sh" make
"$RUNTIME_PATH/shell-amd64.sh" make install-lib
"$RUNTIME_PATH/shell-amd64.sh" make prefix="$TOOLS_DIR64" libdir="$TOOLS_DIR64/lib64" dlldir="$TOOLS_DIR64/lib64/wine" install-dev install-lib
CC="ccache gcc" $AMD64_WRAPPER "$TOP"/wine/configure --enable-win64 --disable-tests --prefix="$DST_DIR"
$AMD64_WRAPPER make -j5
$AMD64_WRAPPER make install-lib
$AMD64_WRAPPER make prefix="$TOOLS_DIR64" libdir="$TOOLS_DIR64/lib64" dlldir="$TOOLS_DIR64/lib64/wine" install-dev install-lib
#build wine32
cd "$TOP"/build/wine.win32
CC="ccache gcc" "$RUNTIME_PATH/shell-i386.sh" "$TOP"/wine/configure --disable-tests --prefix="$TOP/build/dist.win32/"
"$RUNTIME_PATH/shell-i386.sh" make
"$RUNTIME_PATH/shell-i386.sh" make install-lib
"$RUNTIME_PATH/shell-i386.sh" make prefix="$TOOLS_DIR32" libdir="$TOOLS_DIR32/lib" dlldir="$TOOLS_DIR32/lib/wine" install-dev install-lib
CC="ccache gcc" $I386_WRAPPER "$TOP"/wine/configure --disable-tests --prefix="$TOP/build/dist.win32/"
$I386_WRAPPER make -j5
$I386_WRAPPER make install-lib
$I386_WRAPPER make prefix="$TOOLS_DIR32" libdir="$TOOLS_DIR32/lib" dlldir="$TOOLS_DIR32/lib/wine" install-dev install-lib
#install 32-bit stuff manually, see
# https://wiki.winehq.org/Packaging#WoW64_Workarounds
@ -41,7 +43,7 @@ cd "$TOP"
rm -rf build/lsteamclient.win64
cp -a lsteamclient build/lsteamclient.win64
cd "$TOP"/build/lsteamclient.win64/
"$RUNTIME_PATH/shell-amd64.sh" "$TOP"/wine/tools/winemaker/winemaker \
$AMD64_WRAPPER "$TOP"/wine/tools/winemaker/winemaker \
--nosource-fix --nolower-include --nodlls --nomsvcrt \
-DSTEAM_API_EXPORTS \
-I"$TOOLS_DIR64"/include/ \
@ -50,7 +52,7 @@ cd "$TOP"/build/lsteamclient.win64/
-L"$TOOLS_DIR64"/lib64/ \
-L"$TOOLS_DIR64"/lib64/wine/ \
--dll .
CXXFLAGS=-Wno-attributes PATH="$TOOLS_DIR64/bin:$PATH" "$RUNTIME_PATH/shell-amd64.sh" make
CXXFLAGS=-Wno-attributes PATH="$TOOLS_DIR64/bin:$PATH" $AMD64_WRAPPER make
cp -a lsteamclient.dll.so "$DST_DIR"/lib64/wine/
#build 32-bit lsteamclient
@ -58,7 +60,7 @@ cd "$TOP"
rm -rf build/lsteamclient.win32
cp -a lsteamclient build/lsteamclient.win32
cd "$TOP"/build/lsteamclient.win32/
"$RUNTIME_PATH/shell-i386.sh" "$TOP"/wine/tools/winemaker/winemaker \
$I386_WRAPPER "$TOP"/wine/tools/winemaker/winemaker \
--nosource-fix --nolower-include --nodlls --nomsvcrt --wine32 \
-DSTEAM_API_EXPORTS \
-I"$TOOLS_DIR32"/include/ \
@ -67,7 +69,7 @@ cd "$TOP"/build/lsteamclient.win32/
-L"$TOOLS_DIR32"/lib/ \
-L"$TOOLS_DIR32"/lib/wine/ \
--dll .
CXXFLAGS=-Wno-attributes PATH="$TOOLS_DIR32/bin:$PATH" "$RUNTIME_PATH/shell-i386.sh" make -j1
CXXFLAGS=-Wno-attributes PATH="$TOOLS_DIR32/bin:$PATH" $I386_WRAPPER make -j1
cp -a lsteamclient.dll.so "$DST_DIR"/lib/wine/
#build 64-bit vrclient
@ -75,7 +77,7 @@ cd "$TOP"
rm -rf build/vrclient_x64
cp -a vrclient_x64 build/vrclient_x64
cd "$TOP"/build/vrclient_x64/
"$RUNTIME_PATH/shell-amd64.sh" "$TOP"/wine/tools/winemaker/winemaker \
$AMD64_WRAPPER "$TOP"/wine/tools/winemaker/winemaker \
--nosource-fix --nolower-include --nodlls --nomsvcrt \
-I"$TOOLS_DIR64"/include/ \
-I"$TOOLS_DIR64"/include/wine/ \
@ -83,8 +85,8 @@ cd "$TOP"/build/vrclient_x64/
-L"$TOOLS_DIR64"/lib64/ \
-L"$TOOLS_DIR64"/lib64/wine/ \
--dll .
CXXFLAGS="-Wno-attributes -std=c++0x" PATH="$TOOLS_DIR64/bin:$PATH" "$RUNTIME_PATH/shell-amd64.sh" make
PATH="$TOOLS_DIR64/bin:$PATH" "$RUNTIME_PATH/shell-amd64.sh" winebuild --dll --fake-module -E vrclient_x64.spec -o vrclient_x64.dll.fake
CXXFLAGS="-Wno-attributes -std=c++0x" PATH="$TOOLS_DIR64/bin:$PATH" $AMD64_WRAPPER make
PATH="$TOOLS_DIR64/bin:$PATH" $AMD64_WRAPPER winebuild --dll --fake-module -E vrclient_x64.spec -o vrclient_x64.dll.fake
cp -a vrclient_x64.dll.so "$DST_DIR"/lib64/wine/
cp -a vrclient_x64.dll.fake "$DST_DIR"/lib64/wine/fakedlls/vrclient_x64.dll
@ -94,7 +96,7 @@ rm -rf build/vrclient
cp -a vrclient_x64 build/vrclient
cd "$TOP"/build/vrclient/
mv vrclient_x64.spec vrclient.spec
"$RUNTIME_PATH/shell-i386.sh" "$TOP"/wine/tools/winemaker/winemaker \
$I386_WRAPPER "$TOP"/wine/tools/winemaker/winemaker \
--nosource-fix --nolower-include --nodlls --nomsvcrt --wine32 \
-I"$TOOLS_DIR32"/include/ \
-I"$TOOLS_DIR32"/include/wine/ \
@ -102,16 +104,16 @@ mv vrclient_x64.spec vrclient.spec
-L"$TOOLS_DIR32"/lib/ \
-L"$TOOLS_DIR32"/lib/wine/ \
--dll .
CXXFLAGS="-Wno-attributes -std=c++0x" PATH="$TOOLS_DIR32/bin:$PATH" "$RUNTIME_PATH/shell-i386.sh" make
PATH="$TOOLS_DIR32/bin:$PATH" "$RUNTIME_PATH/shell-i386.sh" winebuild --dll --fake-module -E vrclient.spec -o vrclient.dll.fake
CXXFLAGS="-Wno-attributes -std=c++0x" PATH="$TOOLS_DIR32/bin:$PATH" $I386_WRAPPER make
PATH="$TOOLS_DIR32/bin:$PATH" $I386_WRAPPER winebuild --dll --fake-module -E vrclient.spec -o vrclient.dll.fake
cp -a vrclient.dll.so "$DST_DIR"/lib/wine/
cp -a vrclient.dll.fake "$DST_DIR"/lib/wine/fakedlls/vrclient.dll
echo "Creating default wine prefix..."
cd "$TOP"
rm -rf "$DST_DIR"/share/default_pfx
WINEPREFIX="$DST_DIR"/share/default_pfx "$RUNTIME_PATH/shell-amd64.sh" "$DST_DIR/bin/wine64" wineboot
WINEPREFIX="$DST_DIR"/share/default_pfx "$RUNTIME_PATH/shell-amd64.sh" "$DST_DIR/bin/wineserver" -w
WINEPREFIX="$DST_DIR"/share/default_pfx $AMD64_WRAPPER "$DST_DIR/bin/wine64" wineboot
WINEPREFIX="$DST_DIR"/share/default_pfx $AMD64_WRAPPER "$DST_DIR/bin/wineserver" -w
echo "Packaging..."
cd "$TOP"