From 858b419aca8478ab0c4e69d063c34350ad3e5491 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Mon, 30 Sep 2024 06:57:59 +0000 Subject: [PATCH] Add 32bit libraries and such to graphical layer and base heroic launcher on it --- .../caskd/archlinux/graphical/Containerfile | 22 +++++++++++++++++- .../caskd/archlinux/heroic/Containerfile | 20 ++++++++++++++++ localhost/caskd/archlinux/heroic/runner.sh | 23 +++++++++++++++++++ localhost/caskd/archlinux/steam/Containerfile | 21 +---------------- localhost/config.mk | 4 ++++ 5 files changed, 69 insertions(+), 21 deletions(-) create mode 100644 localhost/caskd/archlinux/heroic/Containerfile create mode 100755 localhost/caskd/archlinux/heroic/runner.sh diff --git a/localhost/caskd/archlinux/graphical/Containerfile b/localhost/caskd/archlinux/graphical/Containerfile index a9088c4..1d95229 100644 --- a/localhost/caskd/archlinux/graphical/Containerfile +++ b/localhost/caskd/archlinux/graphical/Containerfile @@ -1,8 +1,27 @@ # Main image FROM localhost/caskd/archlinux/yay:latest +# Enable multilib +RUN printf '%s\n%s\n' '[multilib]' 'Include = /etc/pacman.d/mirrorlist' | tee -a /etc/pacman.conf + +USER yaybuild +# Build lib32 gperftools +RUN --network=host yay -Sy --noconfirm \ + lib32-gperftools + +# Build game capture vklayer +RUN --network=host yay -Sy --noconfirm \ + obs-vkcapture-git + +USER root # Install mesa RUN --network=host pacman -Sy --noconfirm \ + gperftools \ + lib32-mesa \ + lib32-pulseaudio \ + lib32-vkd3d \ + lib32-vulkan-icd-loader \ + lib32-vulkan-radeon \ libinput \ libx11 \ libxcb \ @@ -14,4 +33,5 @@ RUN --network=host pacman -Sy --noconfirm \ noto-fonts \ pulseaudio \ vulkan-icd-loader \ - vulkan-radeon + vulkan-radeon \ + vulkan-tools diff --git a/localhost/caskd/archlinux/heroic/Containerfile b/localhost/caskd/archlinux/heroic/Containerfile new file mode 100644 index 0000000..b05085c --- /dev/null +++ b/localhost/caskd/archlinux/heroic/Containerfile @@ -0,0 +1,20 @@ +# Main image +FROM localhost/caskd/archlinux/graphical:latest + +USER yaybuild +# Build heroic-launcher +RUN --network=host yay -Sy --noconfirm \ + heroic-games-launcher + +# Build native engine override compat tool +#RUN --network=host yay -Sy --noconfirm \ +# luxtorpeda-git + +USER root +RUN userdel yaybuild +RUN rm -rfv /home/yaybuild + +WORKDIR /home/user +USER user + +CMD ["heroic"] diff --git a/localhost/caskd/archlinux/heroic/runner.sh b/localhost/caskd/archlinux/heroic/runner.sh new file mode 100755 index 0000000..a3466ec --- /dev/null +++ b/localhost/caskd/archlinux/heroic/runner.sh @@ -0,0 +1,23 @@ +#!/bin/sh +podman create \ + --replace \ + --name heroic \ + --read-only \ + --network=host \ + --userns=keep-id:uid=10000 \ + --shm-size=8g \ + --restart=on-failure:5 \ + -e DISPLAY="$DISPLAY" \ + -v '/sys:/sys' \ + -v '/dev:/dev' \ + -v '/run/pulse:/run/pulse' \ + -v '/tmp/.X11-unix:/tmp/.X11-unix' \ + -v '/etc/resolv.conf:/etc/resolv.conf:ro' \ + -v 'heroic_data:/home/user:U' \ + -v "$(realpath ~/Sources/Configs/Heroic)"':/home/user/.config/heroic/' \ + -v "$(realpath ~/Media/Games/Heroic)"':/home/user/gamelib/' \ + localhost/caskd/archlinux/heroic + #--cap-add=sys_nice \ + #-v '/tmp/monado_comp_ipc:/tmp/monado_comp_ipc' \ + #--mount 'type=tmpfs,tmpfs-size=128M,chown=true,dst=/home/steam/.cache' \ + #--mount 'type=tmpfs,tmpfs-size=16M,chown=true,dst=/home/steam/.steam' \ diff --git a/localhost/caskd/archlinux/steam/Containerfile b/localhost/caskd/archlinux/steam/Containerfile index a251539..936ce4d 100644 --- a/localhost/caskd/archlinux/steam/Containerfile +++ b/localhost/caskd/archlinux/steam/Containerfile @@ -1,41 +1,22 @@ # Main image FROM localhost/caskd/archlinux/graphical:latest -# Enable multilib -RUN printf '%s\n%s\n' '[multilib]' 'Include = /etc/pacman.d/mirrorlist' | tee -a /etc/pacman.conf - USER yaybuild # Build proton-ge-custom RUN --network=host yay -Sy --noconfirm \ -# proton-ge-custom proton-ge-custom-bin +# proton-ge-custom # Build native engine override compat tool #RUN --network=host yay -Sy --noconfirm \ # luxtorpeda-git -# Build lib32 gperftools -RUN --network=host yay -Sy --noconfirm \ - lib32-gperftools - -# Build game capture vklayer -RUN --network=host yay -Sy --noconfirm \ - obs-vkcapture-git - USER root RUN userdel yaybuild RUN rm -rfv /home/yaybuild # Install steam-native-runtime and mesa plus other libs RUN --network=host pacman -Sy --noconfirm \ - gperftools \ - lib32-mesa \ - lib32-pulseaudio \ - lib32-vkd3d \ - lib32-vulkan-icd-loader \ - lib32-vulkan-radeon \ - mesa \ - vulkan-tools \ steam-native-runtime WORKDIR /home/user diff --git a/localhost/config.mk b/localhost/config.mk index ba2e845..291cde8 100644 --- a/localhost/config.mk +++ b/localhost/config.mk @@ -60,6 +60,10 @@ localhost/caskd/archlinux/osu-lazer/${BUILD_ID_OUT}: \ localhost/caskd/archlinux/steam/${BUILD_ID_OUT}: \ $(GRAPHICALDEPS) +localhost/caskd/archlinux/heroic/${BUILD_ID_OUT}: \ + $(GRAPHICALDEPS) + + # Game-data # Others