Skip to content

Commit

Permalink
Update compilers
Browse files Browse the repository at this point in the history
And also python3, meson and gstreamer.
Thanks @rboxeur for an updated MinGW.
  • Loading branch information
Kron4ek committed Jun 19, 2024
1 parent 9794417 commit 3e25c31
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tar.xz filter=lfs diff=lfs merge=lfs -text
Git LFS file not shown
18 changes: 3 additions & 15 deletions build_wine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export BOOTSTRAP_X32=/opt/chroots/bionic32_chroot

export scriptdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"

export CC="gcc-9"
export CXX="g++-9"
export CC="gcc-11"
export CXX="g++-11"

export CROSSCC_X32="i686-w64-mingw32-gcc"
export CROSSCXX_X32="i686-w64-mingw32-g++"
Expand Down Expand Up @@ -143,7 +143,7 @@ build_with_bwrap () {
--tmpfs /mnt --tmpfs /media --bind "${BUILD_DIR}" "${BUILD_DIR}" \
--bind-try "${XDG_CACHE_HOME}"/ccache "${XDG_CACHE_HOME}"/ccache \
--bind-try "${HOME}"/.ccache "${HOME}"/.ccache \
--setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin" \
--setenv PATH "/opt/Red-Rose-MinGW-w64-Posix-Urct-v12.0.0.r0.g819a6ec2e-Gcc-11.4.1/bin:/bin:/sbin:/usr/bin:/usr/sbin" \
"$@"
}

Expand Down Expand Up @@ -222,18 +222,6 @@ elif [ "$WINE_BRANCH" = "proton" ]; then
git clone https://github.com/ValveSoftware/wine -b "${PROTON_BRANCH}"
fi

if [ "${PROTON_BRANCH}" = "experimental_8.0" ]; then
patch -d wine -Np1 < "${scriptdir}"/proton-exp-8.0.patch
fi

if [ "${PROTON_BRANCH}" = "experimental_9.0" ] || [ "${PROTON_BRANCH}" = "bleeding-edge" ]; then
patch -d wine -Np1 < "${scriptdir}"/proton-exp-9.0.patch
fi

if [ "${PROTON_BRANCH}" = "proton_9.0" ]; then
patch -d wine -Np1 < "${scriptdir}"/proton-9.0.patch
fi

WINE_VERSION="$(cat wine/VERSION | tail -c +14)-$(git -C wine rev-parse --short HEAD)"
if [[ "${PROTON_BRANCH}" == "experimental_"* ]] || [ "${PROTON_BRANCH}" = "bleeding-edge" ]; then
BUILD_NAME=proton-exp-"${WINE_VERSION}"
Expand Down
31 changes: 25 additions & 6 deletions create_ubuntu_bootstraps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ create_build_scripts () {
spirv_headers_version="sdk-1.3.239.0"
libpcap_version="1.10.4"
libxkbcommon_version="1.6.0"
python3_version="3.12.4"
meson_version="1.3.2"

cat <<EOF > "${MAINDIR}"/prepare_chroot.sh
#!/bin/bash
Expand All @@ -96,18 +98,17 @@ apt-get -y install software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
add-apt-repository -y ppa:cybermax-dexter/mingw-w64-backport
apt-get update
apt-get -y build-dep wine-development libsdl2 libvulkan1
apt-get -y install ccache gcc-9 g++-9 wget git gcc-mingw-w64 g++-mingw-w64
apt-get -y build-dep wine-development libsdl2 libvulkan1 python3
apt-get -y install ccache gcc-11 g++-11 wget git gcc-mingw-w64 g++-mingw-w64 ninja-build
apt-get -y install libxpresent-dev libjxr-dev libusb-1.0-0-dev libgcrypt20-dev libpulse-dev libudev-dev libsane-dev libv4l-dev libkrb5-dev libgphoto2-dev liblcms2-dev libcapi20-dev
apt-get -y install libjpeg62-dev samba-dev
apt-get -y install libpcsclite-dev libcups2-dev
apt-get -y install python3-pip libxcb-xkb-dev
apt-get -y install python3-pip libxcb-xkb-dev libbz2-dev
apt-get -y purge libvulkan-dev libvulkan1 libsdl2-dev libsdl2-2.0-0 libpcap0.8-dev libpcap0.8 --purge --autoremove
apt-get -y purge *gstreamer* --purge --autoremove
apt-get -y clean
apt-get -y autoclean
pip3 install meson
pip3 install ninja
export PATH="/usr/local/bin:${PATH}"
export PATH="/usr/local/bin:\${PATH}"
mkdir /opt/build_libs
cd /opt/build_libs
wget -O sdl.tar.gz https://www.libsdl.org/release/SDL2-${sdl2_version}.tar.gz
Expand All @@ -117,17 +118,26 @@ wget -O vulkan-headers.tar.gz https://github.com/KhronosGroup/Vulkan-Headers/arc
wget -O spirv-headers.tar.gz https://github.com/KhronosGroup/SPIRV-Headers/archive/${spirv_headers_version}.tar.gz
wget -O libpcap.tar.gz https://www.tcpdump.org/release/libpcap-${libpcap_version}.tar.gz
wget -O libxkbcommon.tar.xz https://xkbcommon.org/download/libxkbcommon-${libxkbcommon_version}.tar.xz
wget -O python3.tar.gz https://www.python.org/ftp/python/${python3_version}/Python-${python3_version}.tgz
wget -O meson.tar.gz https://github.com/mesonbuild/meson/releases/download/${meson_version}/meson-${meson_version}.tar.gz
wget -O mingw.tar.xz https://github.com/Kron4ek/Wine-Builds/raw/master/Red-Rose-MinGW-w64-Posix-Urct-v12.0.0.r0.g819a6ec2e-Gcc-11.4.1.tar.xz
wget -O /usr/include/linux/ntsync.h https://raw.githubusercontent.com/zen-kernel/zen-kernel/f787614c40519eb2c8ebdc116b2cd09d46e5ec85/include/uapi/linux/ntsync.h
wget -O /usr/include/linux/userfaultfd.h https://raw.githubusercontent.com/zen-kernel/zen-kernel/f787614c40519eb2c8ebdc116b2cd09d46e5ec85/include/uapi/linux/userfaultfd.h
if [ -d /usr/lib/i386-linux-gnu ]; then wget -O wine.deb https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-i386/wine-stable_4.0.3~bionic_i386.deb; fi
if [ -d /usr/lib/x86_64-linux-gnu ]; then wget -O wine.deb https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-amd64/wine-stable_4.0.3~bionic_amd64.deb; fi
git clone git://source.winehq.org/git/vkd3d.git
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git -b 1.22
tar xf sdl.tar.gz
tar xf faudio.tar.gz
tar xf vulkan-loader.tar.gz
tar xf vulkan-headers.tar.gz
tar xf spirv-headers.tar.gz
tar xf libpcap.tar.gz
tar xf libxkbcommon.tar.xz
tar xf python3.tar.gz
tar xf mingw.tar.xz -C /
tar xf meson.tar.gz -C /usr/local
ln -s /usr/local/meson-${meson_version}/meson.py /usr/local/bin/meson
export CFLAGS="-O2"
export CXXFLAGS="-O2"
mkdir build && cd build
Expand All @@ -149,10 +159,19 @@ cd ../ && rm -r build && mkdir build && cd build
../vkd3d/configure && make -j$(nproc) && make install
cd ../ && rm -r build && mkdir build && cd build
../libpcap-${libpcap_version}/configure && make -j$(nproc) install
cd ../ && rm -r build && mkdir build && cd build
../Python-${python3_version}/configure --enable-optimizations
make -j$(nproc)
make -j$(nproc) install
pip3 install setuptools
cd ../libxkbcommon-${libxkbcommon_version}
meson setup build -Denable-docs=false
meson compile -C build
meson install -C build
cd ../gstreamer
meson setup build
ninja -C build
ninja -C build install
cd /opt && rm -r /opt/build_libs
EOF

Expand Down

0 comments on commit 3e25c31

Please sign in to comment.