build_proton.sh: Add support for building selected components

This commit is contained in:
Józef Kucia 2018-03-21 16:43:41 +01:00 committed by Andrew Eikum
parent b46ebbd333
commit b63199deff

View File

@ -199,6 +199,17 @@ else
INSTALL_PROGRAM_FLAGS='' INSTALL_PROGRAM_FLAGS=''
fi fi
BUILD_COMPONENTS='all'
if [ "$#" -ge 2 ]; then
for (( i=1; i <= $# - 1; i++)); do
if [ "${!i}" == "--build" ]; then
j=$((i+1))
BUILD_COMPONENTS="${!j}"
break
fi
done
fi
DST_DIR="$TOP/build/dist" DST_DIR="$TOP/build/dist"
TOOLS_DIR64="$TOP/build/tools.win64" TOOLS_DIR64="$TOP/build/tools.win64"
TOOLS_DIR32="$TOP/build/tools.win32" TOOLS_DIR32="$TOP/build/tools.win32"
@ -244,8 +255,8 @@ if [ "$PLATFORM" == "Darwin" ]; then
build_libSDL build_libSDL
fi fi
function build_wine64
#build wine64 {
cd "$TOP"/build/wine.win64 cd "$TOP"/build/wine.win64
STRIP="$STRIP" CFLAGS="-I$TOOLS_DIR64/include -g -O2" LDFLAGS="-L$TOOLS_DIR64/lib" PKG_CONFIG_PATH="$TOOLS_DIR64/lib/pkgconfig" CC="$CC" \ STRIP="$STRIP" CFLAGS="-I$TOOLS_DIR64/include -g -O2" LDFLAGS="-L$TOOLS_DIR64/lib" PKG_CONFIG_PATH="$TOOLS_DIR64/lib/pkgconfig" CC="$CC" \
PNG_CFLAGS="$PNG64_CFLAGS" PNG_LIBS="$PNG64_LIBS" ac_cv_lib_soname_png="$ac_cv_lib_soname_png64" \ PNG_CFLAGS="$PNG64_CFLAGS" PNG_LIBS="$PNG64_LIBS" ac_cv_lib_soname_png="$ac_cv_lib_soname_png64" \
@ -258,8 +269,10 @@ INSTALL_PROGRAM_FLAGS="$INSTALL_PROGRAM_FLAGS" STRIP="$STRIP" $AMD64_WRAPPER mak
INSTALL_PROGRAM_FLAGS="$INSTALL_PROGRAM_FLAGS" STRIP="$STRIP" $AMD64_WRAPPER make prefix="$TOOLS_DIR64" libdir="$TOOLS_DIR64/lib64" dlldir="$TOOLS_DIR64/lib64/wine" install-dev install-lib INSTALL_PROGRAM_FLAGS="$INSTALL_PROGRAM_FLAGS" STRIP="$STRIP" $AMD64_WRAPPER make prefix="$TOOLS_DIR64" libdir="$TOOLS_DIR64/lib64" dlldir="$TOOLS_DIR64/lib64/wine" install-dev install-lib
rm -f "$DST_DIR"/bin/{msiexec,notepad,regedit,regsvr32,wineboot,winecfg,wineconsole,winedbg,winefile,winemine,winepath} rm -f "$DST_DIR"/bin/{msiexec,notepad,regedit,regsvr32,wineboot,winecfg,wineconsole,winedbg,winefile,winemine,winepath}
rm -rf "$DST_DIR/share/man/" rm -rf "$DST_DIR/share/man/"
}
#build wine32 function build_wine32
{
cd "$TOP"/build/wine.win32 cd "$TOP"/build/wine.win32
STRIP="$STRIP" CFLAGS="-I$TOOLS_DIR32/include -g -O2" LDFLAGS="-L$TOOLS_DIR32/lib" PKG_CONFIG_PATH="$TOOLS_DIR32/lib/pkgconfig" CC="$CC" \ STRIP="$STRIP" CFLAGS="-I$TOOLS_DIR32/include -g -O2" LDFLAGS="-L$TOOLS_DIR32/lib" PKG_CONFIG_PATH="$TOOLS_DIR32/lib/pkgconfig" CC="$CC" \
PNG_CFLAGS="$PNG32_CFLAGS" PNG_LIBS="$PNG32_LIBS" ac_cv_lib_soname_png="$ac_cv_lib_soname_png32" \ PNG_CFLAGS="$PNG32_CFLAGS" PNG_LIBS="$PNG32_LIBS" ac_cv_lib_soname_png="$ac_cv_lib_soname_png32" \
@ -280,8 +293,10 @@ if [ "$PLATFORM" != "Darwin" ]; then
cp -a bin/wine-preloader "$DST_DIR"/bin/ cp -a bin/wine-preloader "$DST_DIR"/bin/
fi fi
cp -a bin/wineserver "$DST_DIR"/bin/wineserver32 cp -a bin/wineserver "$DST_DIR"/bin/wineserver32
}
#build 64-bit lsteamclient function build_lsteamclient64
{
cd "$TOP" cd "$TOP"
rm -rf build/lsteamclient.win64 rm -rf build/lsteamclient.win64
cp -a lsteamclient build/lsteamclient.win64 cp -a lsteamclient build/lsteamclient.win64
@ -300,8 +315,10 @@ if [ x"$STRIP" != x ]; then
$AMD64_WRAPPER $STRIP lsteamclient.dll.so $AMD64_WRAPPER $STRIP lsteamclient.dll.so
fi fi
cp -a lsteamclient.dll.so "$DST_DIR"/lib64/wine/ cp -a lsteamclient.dll.so "$DST_DIR"/lib64/wine/
}
#build 32-bit lsteamclient function build_lsteamclient32
{
cd "$TOP" cd "$TOP"
rm -rf build/lsteamclient.win32 rm -rf build/lsteamclient.win32
cp -a lsteamclient build/lsteamclient.win32 cp -a lsteamclient build/lsteamclient.win32
@ -320,8 +337,10 @@ if [ x"$STRIP" != x ]; then
$I386_WRAPPER $STRIP lsteamclient.dll.so $I386_WRAPPER $STRIP lsteamclient.dll.so
fi fi
cp -a lsteamclient.dll.so "$DST_DIR"/lib/wine/ cp -a lsteamclient.dll.so "$DST_DIR"/lib/wine/
}
#build 64-bit vrclient function build_vrclient64
{
cd "$TOP" cd "$TOP"
rm -rf build/vrclient_x64 rm -rf build/vrclient_x64
cp -a vrclient_x64 build/vrclient_x64 cp -a vrclient_x64 build/vrclient_x64
@ -341,8 +360,10 @@ if [ x"$STRIP" != x ]; then
fi fi
cp -a vrclient_x64.dll.so "$DST_DIR"/lib64/wine/ cp -a vrclient_x64.dll.so "$DST_DIR"/lib64/wine/
cp -a vrclient_x64.dll.fake "$DST_DIR"/lib64/wine/fakedlls/vrclient_x64.dll cp -a vrclient_x64.dll.fake "$DST_DIR"/lib64/wine/fakedlls/vrclient_x64.dll
}
#build 32-bit vrclient function build_vrclient32
{
cd "$TOP" cd "$TOP"
rm -rf build/vrclient rm -rf build/vrclient
cp -a vrclient_x64 build/vrclient cp -a vrclient_x64 build/vrclient
@ -363,6 +384,7 @@ if [ x"$STRIP" != x ]; then
fi fi
cp -a vrclient.dll.so "$DST_DIR"/lib/wine/ cp -a vrclient.dll.so "$DST_DIR"/lib/wine/
cp -a vrclient.dll.fake "$DST_DIR"/lib/wine/fakedlls/vrclient.dll cp -a vrclient.dll.fake "$DST_DIR"/lib/wine/fakedlls/vrclient.dll
}
if [ "$PLATFORM" != "Darwin" ]; then if [ "$PLATFORM" != "Darwin" ]; then
#build dxvk #build dxvk
@ -402,6 +424,24 @@ if [ "$PLATFORM" != "Darwin" ]; then
#cp -a dxvk/dist.win64/bin/d3d11.dll "$DST_DIR"/lib64/wine/dxvk/ #cp -a dxvk/dist.win64/bin/d3d11.dll "$DST_DIR"/lib64/wine/dxvk/
fi fi
case "$BUILD_COMPONENTS" in
"all")
build_wine64
build_wine32
build_lsteamclient64
build_lsteamclient32
build_vrclient64
build_vrclient32
;;
"wine") build_wine64; build_wine32 ;;
"wine32") build_wine64 ;;
"wine64") build_wine64 ;;
"vrclient") build_vrclient32; build_vrclient64 ;;
"vrclient32") build_vrclient32 ;;
"vrclient64") build_vrclient64 ;;
*) echo "Invalid build components: $BUILD_COMPONENTS" ;;
esac
echo "Packaging..." echo "Packaging..."
cd "$TOP" cd "$TOP"