diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml index 86fa44cd..388c83b3 100644 --- a/.github/workflows/auto-build.yml +++ b/.github/workflows/auto-build.yml @@ -78,6 +78,9 @@ jobs: - { name: prismlauncher, docker_path: apps, platforms: "linux/amd64" } - { name: kodi, docker_path: apps, platforms: "linux/amd64" } - { name: xfce, docker_path: apps, platforms: "linux/amd64" } + - { name: plex, docker_path: apps, platforms: "linux/amd64" } + - { name: emby, docker_path: apps, platforms: "linux/amd64" } + - { name: youtube, docker_path: apps, platforms: "linux/amd64" } fail-fast: false uses: ./.github/workflows/docker-build-and-publish.yml with: @@ -88,3 +91,82 @@ jobs: platforms: "${{ matrix.image.platforms }}" secrets: inherit + # ========== Fedora variant ========== + base-fedora: + uses: ./.github/workflows/docker-build-and-publish.yml + with: + docker_path: "images" + image_name: "base" + variant: "fedora" + platforms: "linux/amd64" + secrets: inherit + + base-app-fedora: + needs: [ base-fedora ] + uses: ./.github/workflows/docker-build-and-publish.yml + with: + docker_path: "images" + image_name: "base-app" + variant: "fedora" + base_image: "${{ needs.base-fedora.outputs.image_tag }}" + platforms: "linux/amd64" + secrets: inherit + + base-emu-fedora: + needs: [ base-fedora, base-app-fedora ] + uses: ./.github/workflows/docker-build-and-publish.yml + with: + docker_path: "images" + image_name: "base-emu" + variant: "fedora" + base_image: "${{ needs.base-fedora.outputs.image_tag }}" + base_app_image: "${{ needs.base-app-fedora.outputs.image_tag }}" + platforms: "linux/amd64" + secrets: inherit + + emus-fedora: + needs: [ base-fedora, base-app-fedora, base-emu-fedora ] + strategy: + matrix: + image: + - { name: pegasus, platforms: "linux/amd64" } + - { name: es-de, platforms: "linux/amd64" } + fail-fast: false + uses: ./.github/workflows/docker-build-and-publish.yml + with: + docker_path: "apps" + image_name: "${{ matrix.image.name }}" + variant: "fedora" + base_image: "${{ needs.base-fedora.outputs.image_tag }}" + base_app_image: "${{ needs.base-emu-fedora.outputs.image_tag }}" + platforms: "${{ matrix.image.platforms }}" + secrets: inherit + + apps-fedora: + needs: [ base-fedora, base-app-fedora ] + strategy: + matrix: + image: + - { name: pulseaudio, docker_path: images, platforms: "linux/amd64" } + - { name: retroarch, docker_path: apps, platforms: "linux/amd64" } + - { name: firefox, docker_path: apps, platforms: "linux/amd64" } + - { name: steam, docker_path: apps, platforms: "linux/amd64" } + - { name: lutris, docker_path: apps, platforms: "linux/amd64" } + - { name: heroic-games-launcher, docker_path: apps, platforms: "linux/amd64" } + - { name: prismlauncher, docker_path: apps, platforms: "linux/amd64" } + - { name: kodi, docker_path: apps, platforms: "linux/amd64" } + - { name: xfce, docker_path: apps, platforms: "linux/amd64" } + - { name: plex, docker_path: apps, platforms: "linux/amd64" } + - { name: emby, docker_path: apps, platforms: "linux/amd64" } + - { name: youtube, docker_path: apps, platforms: "linux/amd64" } + fail-fast: false + uses: ./.github/workflows/docker-build-and-publish.yml + with: + docker_path: "${{ matrix.image.docker_path }}" + image_name: "${{ matrix.image.name }}" + variant: "fedora" + base_image: "${{ needs.base-fedora.outputs.image_tag }}" + base_app_image: "${{ needs.base-app-fedora.outputs.image_tag }}" + platforms: "${{ matrix.image.platforms }}" + secrets: inherit + diff --git a/.github/workflows/docker-build-and-publish.yml b/.github/workflows/docker-build-and-publish.yml index dacdd31f..43e04065 100644 --- a/.github/workflows/docker-build-and-publish.yml +++ b/.github/workflows/docker-build-and-publish.yml @@ -24,6 +24,11 @@ on: default: "linux/amd64" type: string required: false + variant: + description: "Image variant (e.g. 'fedora'). Affects build dir and tag suffix." + type: string + required: false + default: "" outputs: image_tag: description: "The highest-priority tag assigned to the built image" @@ -137,16 +142,16 @@ jobs: echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Cache buildx layers locally - if: github.event_name == 'pull_request' - uses: actions/cache@v4 + if: ${{ needs.prepare.outputs.is_fork == 'true' }} + uses: actions/cache@v5 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ inputs.image_name }}-${{ env.PLATFORM_PAIR }}-pr-${{ github.event.number }} + key: ${{ runner.os }}-buildx-${{ inputs.image_name }}${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }}-${{ env.PLATFORM_PAIR }}-pr-${{ github.event.number }} restore-keys: | - ${{ runner.os }}-buildx-${{ inputs.image_name }}-${{ env.PLATFORM_PAIR }}- + ${{ runner.os }}-buildx-${{ inputs.image_name }}${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }}-${{ env.PLATFORM_PAIR }}- # Set derived configuration variables: # - images: images to build (docker and/or github) @@ -164,9 +169,10 @@ jobs: IMAGES="" CURRENT_PLATFORM="${{ contains(matrix.platform, 'arm64') && 'arm64' || 'x86' }}" - upstream_build_from_cache_image="ghcr.io/games-on-whales/${{ inputs.image_name }}:buildcache-${CURRENT_PLATFORM}" - build_from_cache_image="ghcr.io/${{ needs.prepare.outputs.ghcr_namespace }}/${{ inputs.image_name }}:buildcache-${CURRENT_PLATFORM}" - build_to_cache_image="ghcr.io/${{ needs.prepare.outputs.ghcr_namespace }}/${{ inputs.image_name }}:buildcache-${CURRENT_PLATFORM}" + VARIANT_SUFFIX="${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }}" + upstream_build_from_cache_image="ghcr.io/games-on-whales/${{ inputs.image_name }}:buildcache${VARIANT_SUFFIX}-${CURRENT_PLATFORM}" + build_from_cache_image="ghcr.io/${{ needs.prepare.outputs.ghcr_namespace }}/${{ inputs.image_name }}:buildcache${VARIANT_SUFFIX}-${CURRENT_PLATFORM}" + build_to_cache_image="ghcr.io/${{ needs.prepare.outputs.ghcr_namespace }}/${{ inputs.image_name }}:buildcache${VARIANT_SUFFIX}-${CURRENT_PLATFORM}" echo "==> Testing if build cache ${build_from_cache_image} exists" docker buildx imagetools inspect "${build_from_cache_image}" 2>/dev/null || build_cache_missing=1 @@ -177,7 +183,7 @@ jobs: echo "==> Found existing buildx cache for branch build, using image ${build_from_cache_image}" fi - if [[ "${{ github.event_name }}" != "pull_request" ]]; then + if [[ "${{ needs.prepare.outputs.is_fork }}" == "false" ]]; then echo "==> Setting variables for branch build" if [ -n "${{ secrets.GITHUB_TOKEN }}" ]; then @@ -248,7 +254,7 @@ jobs: - name: Download base image artifact id: download-base-image-artifact - if: ${{ github.event_name == 'pull_request' && steps.prep.outputs.base_image_name != '' }} + if: ${{ needs.prepare.outputs.is_fork == 'true' && steps.prep.outputs.base_image_name != '' }} uses: dawidd6/action-download-artifact@v10 with: name: docker-${{ steps.prep.outputs.base_image_name }}-${{ env.PLATFORM_PAIR }}.tar @@ -261,7 +267,7 @@ jobs: - name: Download base-app image artifact id: download-base-app-image-artifact - if: ${{ github.event_name == 'pull_request' && steps.prep.outputs.base_app_image_name != '' }} + if: ${{ needs.prepare.outputs.is_fork == 'true' && steps.prep.outputs.base_app_image_name != '' }} uses: dawidd6/action-download-artifact@v10 with: name: docker-${{ steps.prep.outputs.base_app_image_name }}-${{ env.PLATFORM_PAIR }}.tar @@ -274,50 +280,52 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: # list of Docker images to use as base name for tags images: ${{ steps.prep.outputs.images }} # generate Docker tags based on the following events/attributes tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}} - type=edge,branch=master - type=ref,event=branch - type=sha - flavor: latest=auto #latest will point to last semver version (stable) + type=semver,pattern={{version}},suffix=${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + type=semver,pattern={{major}},suffix=${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + type=edge,branch=master,suffix=${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + type=ref,event=branch,suffix=${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + type=sha,suffix=${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + ${{ inputs.variant == 'fedora' && 'type=raw,value=fedora' || '' }} + ${{ inputs.variant == 'fedora' && 'type=raw,value=fedora-43' || '' }} + flavor: | + latest=auto # Prepare for multi-arch - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 with: platforms: all - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 with: - install: true version: latest driver-opts: image=moby/buildkit:master${{ github.event_name == 'pull_request' && ',network=host' || '' }} - name: Login to DockerHub if: steps.prep.outputs.has_docker_token != '' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ env.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry if: steps.prep.outputs.has_github_token != '' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Load base image - if: github.event_name == 'pull_request' && steps.prep.outputs.base_image_name != '' + if: needs.prepare.outputs.is_fork == 'true' && steps.prep.outputs.base_image_name != '' run: | set -e echo "==> Loading base image from artifact" @@ -327,7 +335,7 @@ jobs: docker push "${{ inputs.base_image }}" - name: Load base-app image - if: github.event_name == 'pull_request' && steps.prep.outputs.base_app_image_name != '' + if: needs.prepare.outputs.is_fork == 'true' && steps.prep.outputs.base_app_image_name != '' run: | set -e echo "==> Loading base-app image from artifact" @@ -338,11 +346,11 @@ jobs: - name: Build and Push id: docker_build - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: builder: ${{ steps.buildx.outputs.name }} - context: ./${{ inputs.docker_path }}/${{ inputs.image_name }}/build - file: ./${{ inputs.docker_path }}/${{ inputs.image_name }}/build/Dockerfile + context: ./${{ inputs.docker_path }}/${{ inputs.image_name }}/build${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + file: ./${{ inputs.docker_path }}/${{ inputs.image_name }}/build${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }}/Dockerfile platforms: ${{ matrix.platform }} outputs: ${{ steps.prep.outputs.buildx_outputs }} tags: ${{ steps.meta.outputs.tags }} @@ -354,10 +362,10 @@ jobs: cache-to: ${{ steps.prep.outputs.cache_to }} - name: Upload docker image as artifact - if: github.event_name == 'pull_request' - uses: actions/upload-artifact@v4 + if: ${{ needs.prepare.outputs.is_fork == 'true' }} + uses: actions/upload-artifact@v7 with: - name: docker-${{ inputs.image_name }}-${{ env.PLATFORM_PAIR }}.tar + name: docker-${{ inputs.image_name }}${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }}-${{ env.PLATFORM_PAIR }}.tar path: /tmp/${{ inputs.image_name }}-*.tar if-no-files-found: error retention-days: 1 @@ -366,7 +374,7 @@ jobs: # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 - name: Cleanup buildx cache - if: github.event_name == 'pull_request' + if: ${{ needs.prepare.outputs.is_fork == 'true' }} run: | rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache @@ -375,7 +383,7 @@ jobs: run: echo "${{ inputs.image_name }} > ${{ steps.docker_build.outputs.digest }}" - name: Export digest - if: github.event_name != 'pull_request' + if: ${{ needs.prepare.outputs.is_fork == 'false' }} id: export-digest run: | mkdir -p /tmp/digests @@ -384,10 +392,10 @@ jobs: echo "hash=${digest#sha256:}" >> $GITHUB_OUTPUT - name: Upload digest - if: github.event_name != 'pull_request' - uses: actions/upload-artifact@v4 + if: ${{ needs.prepare.outputs.is_fork == 'false' }} + uses: actions/upload-artifact@v7 with: - name: digests-${{ inputs.image_name }}-${{ env.PLATFORM_PAIR }} + name: digests-${{ inputs.variant != '' && format('{0}-', inputs.variant) || '' }}${{ inputs.image_name }}-${{ env.PLATFORM_PAIR }} path: /tmp/digests/* if-no-files-found: error overwrite: true @@ -399,44 +407,48 @@ jobs: merge: runs-on: ubuntu-latest needs: [ prepare, docker ] - if: github.event_name != 'pull_request' + if: ${{ needs.prepare.outputs.is_fork == 'false' }} steps: - name: Download digests - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: /tmp/digests - pattern: digests-${{ inputs.image_name }}-* + pattern: digests-${{ inputs.variant != '' && format('{0}-', inputs.variant) || '' }}${{ inputs.image_name }}-* merge-multiple: true - name: Login to Docker Hub if: needs.docker.outputs.has_docker_token != '' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ env.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GHCR if: needs.docker.outputs.has_github_token != '' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: ${{ needs.docker.outputs.images }} tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}} - type=edge,branch=master - type=ref,event=branch - type=sha + type=semver,pattern={{version}},suffix=${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + type=semver,pattern={{major}},suffix=${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + type=edge,branch=master,suffix=${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + type=ref,event=branch,suffix=${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + type=sha,suffix=${{ inputs.variant != '' && format('-{0}', inputs.variant) || '' }} + ${{ inputs.variant == 'fedora' && 'type=raw,value=fedora' || '' }} + ${{ inputs.variant == 'fedora' && 'type=raw,value=fedora-43' || '' }} + flavor: | + latest=auto - name: Create ghcr manifest list and push if: needs.docker.outputs.has_github_token != '' diff --git a/apps/emby/_index.md b/apps/emby/_index.md new file mode 100644 index 00000000..4e757e70 --- /dev/null +++ b/apps/emby/_index.md @@ -0,0 +1,7 @@ +# Emby + +Emby Theater — the official living-room client for Emby Server. Streams your +personal media library with a gamepad-friendly 10-foot UI. + +This image installs the upstream Emby Theater Electron build from its GitHub +releases and launches it full-screen on top of Sway. diff --git a/apps/emby/assets/wolf.config.toml b/apps/emby/assets/wolf.config.toml new file mode 100644 index 00000000..a1e46fdb --- /dev/null +++ b/apps/emby/assets/wolf.config.toml @@ -0,0 +1,23 @@ +[[apps]] +title = "Emby" +icon_png_path = "https://games-on-whales.github.io/wildlife/apps/emby/assets/icon.png" + +[apps.runner] +type = "docker" +name = "WolfEmby" +image = "ghcr.io/games-on-whales/emby:edge" +mounts = [] +env = ["RUN_SWAY=1", "GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*"] +devices = [] +ports = [] +base_create_json = """ +{ + "HostConfig": { + "IpcMode": "host", + "Privileged": false, + "CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN"], + "DeviceCgroupRules": ["c 13:* rmw", "c 244:* rmw"] + } +} +\ +""" diff --git a/apps/emby/build-fedora/Dockerfile b/apps/emby/build-fedora/Dockerfile new file mode 100644 index 00000000..b6b8aa90 --- /dev/null +++ b/apps/emby/build-fedora/Dockerfile @@ -0,0 +1,51 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +RUN <<_INSTALL_EMBY +set -e + +dnf install -y \ + nss \ + libXScrnSaver \ + alsa-lib \ + mesa-libgbm \ + gtk3 \ + libsecret \ + libnotify \ + at-spi2-core \ + libdrm \ + libxkbcommon \ + libXcomposite \ + libXdamage \ + libXrandr \ + libxshmfence \ + cups-libs \ + xdg-utils \ + curl \ + jq + +URL=$(curl -fsSL https://api.github.com/repos/MediaBrowser/emby-theater-electron/releases/latest \ + | jq -r '.assets[] | select(.name | test("^emby-theater-rpm_.*_x86_64\\.rpm$")) | .browser_download_url' \ + | head -n1) + +if [ -z "$URL" ] || [ "$URL" = "null" ]; then + echo "Failed to resolve Emby Theater .rpm download URL" >&2 + exit 1 +fi + +curl -fsSL -o /tmp/emby-theater.rpm "$URL" +dnf install -y /tmp/emby-theater.rpm +rm -f /tmp/emby-theater.rpm + +dnf clean all +_INSTALL_EMBY + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/emby/build-fedora/scripts/startup.sh b/apps/emby/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..36e19259 --- /dev/null +++ b/apps/emby/build-fedora/scripts/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source /opt/gow/launch-comp.sh +launcher /usr/bin/emby-theater diff --git a/apps/emby/build/Dockerfile b/apps/emby/build/Dockerfile new file mode 100644 index 00000000..a690bf80 --- /dev/null +++ b/apps/emby/build/Dockerfile @@ -0,0 +1,55 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +ARG DEBIAN_FRONTEND=noninteractive +ARG REQUIRED_PACKAGES=" \ + libnss3 \ + libxss1 \ + libasound2t64 \ + libgbm1 \ + libgtk-3-0 \ + libsecret-1-0 \ + libnotify4 \ + libatspi2.0-0 \ + libdrm2 \ + libxkbcommon0 \ + libxcomposite1 \ + libxdamage1 \ + libxrandr2 \ + libx11-xcb1 \ + libxshmfence1 \ + libcups2 \ + xdg-utils \ + " + +RUN <<_INSTALL_EMBY +set -e +apt-get update +apt-get install -y --no-install-recommends $REQUIRED_PACKAGES ca-certificates curl jq + +URL=$(curl -fsSL https://api.github.com/repos/MediaBrowser/emby-theater-electron/releases/latest \ + | jq -r '.assets[] | select(.name | test("^emby-theater-deb_.*_amd64\\.deb$")) | .browser_download_url' \ + | head -n1) + +if [ -z "$URL" ] || [ "$URL" = "null" ]; then + echo "Failed to resolve Emby Theater .deb download URL" >&2 + exit 1 +fi + +curl -fsSL -o /tmp/emby-theater.deb "$URL" +apt-get install -y /tmp/emby-theater.deb +rm -f /tmp/emby-theater.deb + +apt-get autoremove -y +rm -rf /var/lib/apt/lists/* +_INSTALL_EMBY + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/emby/build/scripts/startup.sh b/apps/emby/build/scripts/startup.sh new file mode 100644 index 00000000..36e19259 --- /dev/null +++ b/apps/emby/build/scripts/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source /opt/gow/launch-comp.sh +launcher /usr/bin/emby-theater diff --git a/apps/es-de/build-fedora/Dockerfile b/apps/es-de/build-fedora/Dockerfile new file mode 100644 index 00000000..878d7dfc --- /dev/null +++ b/apps/es-de/build-fedora/Dockerfile @@ -0,0 +1,40 @@ +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +# see: https://github.com/AppImage/AppImageKit/wiki/FUSE#docker +ENV APPIMAGE_EXTRACT_AND_RUN=1 + +#GitHub REST query versioning +ARG GITHUB_REST_VERSION=2022-11-28 + +# Downloading ES-DE AppImage +RUN \ + echo "**** Downloading ESDE AppImage ****" && \ + mkdir -p /tmp && \ + cd /tmp && \ + curl https://gitlab.com/api/v4/projects/18817634/releases | \ + jq '.[0].assets.links[]|select(.name|endswith(".AppImage"))|select(.name|contains("SteamDeck")|not).direct_asset_url' | \ + xargs wget -O /Applications/esde.AppImage && \ + chmod -v -R 777 /Applications/esde.AppImage && \ + chmod -v -R a+x /Applications/esde.AppImage + +RUN \ + echo "**** Preparing /media for EmulationStation ****" && \ + mkdir -pm777 /media + +RUN \ + echo "**** Preparing /bioses for symlinking ****" && \ + mkdir -pm755 /bioses + +RUN \ + echo "**** Preparing /ROMs for symlinking ****" && \ + mkdir -pm755 /ROMs + +COPY configs/ /cfg/ +COPY --chmod=777 scripts/startup.sh /etc/cont-init.d/setup-de.sh +COPY --chmod=777 scripts/startup-es.sh /opt/gow/startup-app.sh + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/es-de/build-fedora/configs/es/es_settings.xml b/apps/es-de/build-fedora/configs/es/es_settings.xml new file mode 100644 index 00000000..728613c3 --- /dev/null +++ b/apps/es-de/build-fedora/configs/es/es_settings.xml @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/es-de/build-fedora/configs/es/es_systems.xml b/apps/es-de/build-fedora/configs/es/es_systems.xml new file mode 100644 index 00000000..dccde22e --- /dev/null +++ b/apps/es-de/build-fedora/configs/es/es_systems.xml @@ -0,0 +1,13 @@ + + + + + Custom Scripts + Custom Scripts + /Applications/launchers + .desktop .sh + %ENABLESHORTCUTS% %EMULATOR_OS-SHELL% %ROM% + pc, pcwindows + Custom Scripts + + \ No newline at end of file diff --git a/apps/es-de/build-fedora/configs/es/gamelist.xml b/apps/es-de/build-fedora/configs/es/gamelist.xml new file mode 100644 index 00000000..09042fc0 --- /dev/null +++ b/apps/es-de/build-fedora/configs/es/gamelist.xml @@ -0,0 +1,69 @@ + + + + /Applications/launchers/cemu.sh + cemu + Launch cemu + 20230429T000000 + Cemu Team + QuaiGoner + Launcher + 1 + 20230429T164623 + + + /Applications/launchers/dolphin.sh + dolphin + Launch dolphin + 20230429T000000 + Dolphin Team + QuaiGoner + Launcher + 1 + 20230429T164623 + + + /Applications/launchers/pcsx2.sh + pcsx2 + Launch pcsx2 + 20230429T000000 + PCSX2 Team + QuaiGoner + Launcher + 1 + 20230429T164623 + + + /Applications/launchers/retroarch.sh + retroarch + Launch RetroArch + 20230429T000000 + libretro + QuaiGoner + Launcher + 1 + 20230429T164623 + + + /Applications/launchers/rpcs3.sh + rpcs3 + Launch RPCS3 + 20230429T000000 + RPCS3 Team + QuaiGoner + Launcher + 1 + 20230429T164623 + + + /Applications/launchers/xemu.sh + xemu + Launch XEMU + 20230429T000000 + XEMU Team + QuaiGoner + Launcher + 1 + 20230429T164623 + + diff --git a/apps/es-de/build-fedora/configs/pcsx2/PCSX2.ini b/apps/es-de/build-fedora/configs/pcsx2/PCSX2.ini new file mode 100644 index 00000000..195a7587 --- /dev/null +++ b/apps/es-de/build-fedora/configs/pcsx2/PCSX2.ini @@ -0,0 +1,537 @@ +[UI] +SettingsVersion = 1 +InhibitScreensaver = true +ConfirmShutdown = true +StartPaused = false +PauseOnFocusLoss = false +StartFullscreen = true +DoubleClickTogglesFullscreen = true +HideMouseCursor = true +RenderToSeparateWindow = false +HideMainWindowWhenRunning = false +DisableWindowResize = false +Theme = darkfusion +MainWindowGeometry = AdnQywADAAAAAAAAAAAAAAAABBkAAAKZAAAAAAAAAAAAAAQZAAACmQAAAAAAAAAAB4AAAAAAAAAAAAAABBkAAAKZ +MainWindowState = AAAA/wAAAAD9AAAAAAAABBoAAAJxAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAHQAbwBvAGwAQgBhAHIAAAAAAP////8AAAAAAAAAAA== + + +[Folders] +Bios = ../../bioses +Snapshots = snaps +Savestates = sstates +MemoryCards = memcards +Logs = logs +Cheats = cheats +CheatsWS = cheats_ws +CheatsNI = cheats_ni +Cache = cache +Textures = textures +InputProfiles = inputprofiles +Videos = videos + + +[EmuCore] +CdvdVerboseReads = false +CdvdDumpBlocks = false +CdvdShareWrite = false +EnablePatches = true +EnableCheats = false +EnablePINE = false +EnableWideScreenPatches = true +EnableNoInterlacingPatches = true +EnableRecordingTools = true +EnableGameFixes = true +SaveStateOnShutdown = false +EnableDiscordPresence = false +InhibitScreensaver = true +ConsoleToStdio = false +HostFs = false +BackupSavestate = true +SavestateZstdCompression = true +McdEnableEjection = true +McdFolderAutoManage = true +WarnAboutUnsafeSettings = true +GzipIsoIndexTemplate = $(f).pindex.tmp +BlockDumpSaveDirectory = +EnableFastBoot = true + + +[EmuCore/Speedhacks] +EECycleRate = 0 +EECycleSkip = 0 +fastCDVD = false +IntcStat = true +WaitLoop = true +vuFlagHack = true +vuThread = false +vu1Instant = true + + +[EmuCore/CPU] +FPU.DenormalsAreZero = true +FPU.FlushToZero = true +FPU.Roundmode = 3 +AffinityControlMode = 0 +VU0.DenormalsAreZero = true +VU0.FlushToZero = true +VU0.Roundmode = 3 +VU1.DenormalsAreZero = true +VU1.FlushToZero = true +VU1.Roundmode = 3 + + +[EmuCore/CPU/Recompiler] +EnableEE = true +EnableIOP = true +EnableEECache = false +EnableVU0 = true +EnableVU1 = true +EnableFastmem = true +PauseOnTLBMiss = false +vu0Overflow = true +vu0ExtraOverflow = false +vu0SignOverflow = false +vu0Underflow = false +vu1Overflow = true +vu1ExtraOverflow = false +vu1SignOverflow = false +vu1Underflow = false +fpuOverflow = true +fpuExtraOverflow = false +fpuFullMode = false + + +[EmuCore/GS] +VsyncQueueSize = 2 +FrameLimitEnable = true +VsyncEnable = 0 +FramerateNTSC = 59.94 +FrameratePAL = 50 +SyncToHostRefreshRate = false +AspectRatio = Auto 4:3/3:2 +FMVAspectRatioSwitch = Off +ScreenshotSize = 0 +ScreenshotFormat = 0 +ScreenshotQuality = 50 +StretchY = 100 +CropLeft = 0 +CropTop = 0 +CropRight = 0 +CropBottom = 0 +pcrtc_antiblur = true +disable_interlace_offset = false +pcrtc_offsets = false +pcrtc_overscan = false +IntegerScaling = false +UseDebugDevice = false +UseBlitSwapChain = false +disable_shader_cache = false +DisableDualSourceBlend = false +DisableFramebufferFetch = false +DisableThreadedPresentation = false +SkipDuplicateFrames = false +OsdShowMessages = true +OsdShowSpeed = false +OsdShowFPS = false +OsdShowCPU = false +OsdShowGPU = false +OsdShowResolution = false +OsdShowGSStats = false +OsdShowIndicators = true +OsdShowSettings = false +OsdShowInputs = false +OsdShowFrameTimes = false +HWSpinGPUForReadbacks = false +HWSpinCPUForReadbacks = false +paltex = false +autoflush_sw = true +preload_frame_with_gs_data = false +mipmap = true +UserHacks = false +UserHacks_align_sprite_X = false +UserHacks_AutoFlush = false +UserHacks_CPU_FB_Conversion = false +UserHacks_ReadTCOnClose = false +UserHacks_DisableDepthSupport = false +UserHacks_DisablePartialInvalidation = false +UserHacks_Disable_Safe_Features = false +UserHacks_merge_pp_sprite = false +UserHacks_WildHack = false +UserHacks_BilinearHack = false +UserHacks_NativePaletteDraw = false +UserHacks_TextureInsideRt = 0 +UserHacks_TargetPartialInvalidation = false +UserHacks_EstimateTextureRegion = false +fxaa = false +ShadeBoost = false +dump = false +save = false +savef = false +savet = false +savez = false +DumpReplaceableTextures = false +DumpReplaceableMipmaps = false +DumpTexturesWithFMVActive = false +DumpDirectTextures = true +DumpPaletteTextures = true +LoadTextureReplacements = false +LoadTextureReplacementsAsync = true +PrecacheTextureReplacements = false +EnableVideoCapture = true +EnableVideoCaptureParameters = false +VideoCaptureAutoResolution = false +EnableAudioCapture = true +EnableAudioCaptureParameters = false +linear_present_mode = 1 +deinterlace_mode = 0 +OsdScale = 100 +Renderer = -1 +upscale_multiplier = 2 +mipmap_hw = -1 +accurate_blending_unit = 1 +crc_hack_level = -1 +filter = 2 +texture_preloading = 2 +GSDumpCompression = 2 +HWDownloadMode = 0 +CASMode = 0 +CASSharpness = 50 +dithering_ps2 = 2 +MaxAnisotropy = 0 +extrathreads = 2 +extrathreads_height = 4 +TVShader = 0 +UserHacks_SkipDraw_Start = 0 +UserHacks_SkipDraw_End = 0 +UserHacks_Half_Bottom_Override = -1 +UserHacks_HalfPixelOffset = 0 +UserHacks_round_sprite_offset = 0 +UserHacks_TCOffsetX = 0 +UserHacks_TCOffsetY = 0 +UserHacks_CPUSpriteRenderBW = 0 +UserHacks_CPUSpriteRenderLevel = 0 +UserHacks_CPUCLUTRender = 0 +UserHacks_GPUTargetCLUTMode = 0 +TriFilter = -1 +OverrideTextureBarriers = -1 +ShadeBoost_Brightness = 50 +ShadeBoost_Contrast = 50 +ShadeBoost_Saturation = 50 +png_compression_level = 1 +saven = 0 +savel = 5000 +CaptureContainer = mp4 +VideoCaptureCodec = +VideoCaptureParameters = +AudioCaptureCodec = +AudioCaptureParameters = +VideoCaptureBitrate = 6000 +VideoCaptureWidth = 640 +VideoCaptureHeight = 480 +AudioCaptureBitrate = 160 +Adapter = +HWDumpDirectory = +SWDumpDirectory = + + +[SPU2/Debug] +Global_Enable = false +Show_Messages = false +Show_Messages_Key_On_Off = false +Show_Messages_Voice_Off = false +Show_Messages_DMA_Transfer = false +Show_Messages_AutoDMA = false +Show_Messages_Overruns = false +Show_Messages_CacheStats = false +Log_Register_Access = false +Log_DMA_Transfers = false +Log_WAVE_Output = false +Dump_Info = false +Dump_Memory = false +Dump_Regs = false + + +[SPU2/Mixing] +FinalVolume = 100 + + +[SPU2/Output] +OutputModule = cubeb +BackendName = +DeviceName = +Latency = 60 +OutputLatency = 20 +OutputLatencyMinimal = false +SynchMode = 0 +SpeakerConfiguration = 0 +DplDecodingLevel = 0 + + +[DEV9/Eth] +EthEnable = false +EthApi = Unset +EthDevice = +EthLogDNS = false +InterceptDHCP = false +PS2IP = 0.0.0.0 +Mask = 0.0.0.0 +Gateway = 0.0.0.0 +DNS1 = 0.0.0.0 +DNS2 = 0.0.0.0 +AutoMask = true +AutoGateway = true +ModeDNS1 = Auto +ModeDNS2 = Auto + + +[DEV9/Eth/Hosts] +Count = 0 + + +[DEV9/Hdd] +HddEnable = false +HddFile = DEV9hdd.raw +HddSizeSectors = 83886080 + + +[EmuCore/Gamefixes] +VuAddSubHack = false +FpuMulHack = false +FpuNegDivHack = false +XgKickHack = false +EETimingHack = false +InstantDMAHack = false +SoftwareRendererFMVHack = false +SkipMPEGHack = false +OPHFlagHack = false +DMABusyHack = false +VIFFIFOHack = false +VIF1StallHack = false +GIFFIFOHack = false +GoemonTlbHack = false +IbitHack = false +VUSyncHack = false +VUOverflowHack = false +BlitInternalFPSHack = false +FullVU0SyncHack = false + + +[EmuCore/Profiler] +Enabled = false +RecBlocks_EE = true +RecBlocks_IOP = true +RecBlocks_VU0 = true +RecBlocks_VU1 = true + + +[EmuCore/Debugger] +ShowDebuggerOnStart = false +AlignMemoryWindowStart = true +FontWidth = 8 +FontHeight = 12 +WindowWidth = 0 +WindowHeight = 0 +MemoryViewBytesPerRow = 16 + + +[EmuCore/TraceLog] +Enabled = false +EE.bitset = 0 +IOP.bitset = 0 + + +[USB1] +Type = None + + +[USB2] +Type = None + + +[Achievements] +Enabled = false +TestMode = false +UnofficialTestMode = false +RichPresence = true +ChallengeMode = false +Leaderboards = true +Notifications = true +SoundEffects = true +PrimedIndicators = true + + +[Filenames] +BIOS = + + +[Framerate] +NominalScalar = 1 +TurboScalar = 2 +SlomoScalar = 0.5 + + +[MemoryCards] +Slot1_Enable = true +Slot1_Filename = Mcd001.ps2 +Slot2_Enable = true +Slot2_Filename = Mcd002.ps2 +Multitap1_Slot2_Enable = false +Multitap1_Slot2_Filename = Mcd-Multitap1-Slot02.ps2 +Multitap1_Slot3_Enable = false +Multitap1_Slot3_Filename = Mcd-Multitap1-Slot03.ps2 +Multitap1_Slot4_Enable = false +Multitap1_Slot4_Filename = Mcd-Multitap1-Slot04.ps2 +Multitap2_Slot2_Enable = false +Multitap2_Slot2_Filename = Mcd-Multitap2-Slot02.ps2 +Multitap2_Slot3_Enable = false +Multitap2_Slot3_Filename = Mcd-Multitap2-Slot03.ps2 +Multitap2_Slot4_Enable = false +Multitap2_Slot4_Filename = Mcd-Multitap2-Slot04.ps2 + + +[Logging] +EnableSystemConsole = false +EnableFileLogging = false +EnableTimestamps = true +EnableVerbose = false +EnableEEConsole = false +EnableIOPConsole = false +EnableInputRecordingLogs = true +EnableControllerLogs = false + + +[InputSources] +Keyboard = true +Mouse = true +SDL = true +SDLControllerEnhancedMode = false + + +[Hotkeys] +ToggleFullscreen = Keyboard/Alt & Keyboard/Return +CycleAspectRatio = Keyboard/F6 +CycleInterlaceMode = Keyboard/F5 +CycleMipmapMode = Keyboard/Insert +GSDumpMultiFrame = Keyboard/Control & Keyboard/Shift & Keyboard/F8 +Screenshot = Keyboard/F8 +GSDumpSingleFrame = Keyboard/Shift & Keyboard/F8 +ToggleSoftwareRendering = Keyboard/F9 +ZoomIn = Keyboard/Control & Keyboard/Plus +ZoomOut = Keyboard/Control & Keyboard/Minus +InputRecToggleMode = Keyboard/Shift & Keyboard/R +LoadStateFromSlot = Keyboard/F3 +SaveStateToSlot = Keyboard/F1 +NextSaveStateSlot = Keyboard/F2 +PreviousSaveStateSlot = Keyboard/Shift & Keyboard/F2 +OpenPauseMenu = SDL-0/Guide +ToggleFrameLimit = Keyboard/F4 +TogglePause = Keyboard/Space +ToggleSlowMotion = Keyboard/Shift & Keyboard/Backtab +ToggleTurbo = Keyboard/Tab +HoldTurbo = Keyboard/Period + + +[Pad] +MultitapPort1 = false +MultitapPort2 = false +PointerXSpeed = 40 +PointerYSpeed = 40 +PointerXDeadZone = 20 +PointerYDeadZone = 20 +PointerInertia = 10 + + +[Pad1] +Type = DualShock2 +InvertL = 0 +InvertR = 0 +Deadzone = 0 +AxisScale = 1.33 +TriggerDeadzone = 0 +TriggerScale = 1 +LargeMotorScale = 1 +SmallMotorScale = 1 +ButtonDeadzone = 0 +PressureModifier = 0.5 +Up = SDL-0/DPadUp +Right = SDL-0/DPadRight +Down = SDL-0/DPadDown +Left = SDL-0/DPadLeft +Triangle = SDL-0/Y +Circle = SDL-0/B +Cross = SDL-0/A +Square = SDL-0/X +Select = SDL-0/Back +Start = SDL-0/Start +L1 = SDL-0/LeftShoulder +L2 = SDL-0/+LeftTrigger +R1 = SDL-0/RightShoulder +R2 = SDL-0/+RightTrigger +L3 = SDL-0/LeftStick +R3 = SDL-0/RightStick +LUp = SDL-0/-LeftY +LRight = SDL-0/+LeftX +LDown = SDL-0/+LeftY +LLeft = SDL-0/-LeftX +RUp = SDL-0/-RightY +RRight = SDL-0/+RightX +RDown = SDL-0/+RightY +RLeft = SDL-0/-RightX +Analog = SDL-0/Guide +LargeMotor = SDL-0/LargeMotor +SmallMotor = SDL-0/SmallMotor + + +[Pad2] +Type = None +Up = SDL-1/DPadUp +Right = SDL-1/DPadRight +Down = SDL-1/DPadDown +Left = SDL-1/DPadLeft +Triangle = SDL-1/Y +Circle = SDL-1/B +Cross = SDL-1/A +Square = SDL-1/X +Select = SDL-1/Back +Start = SDL-1/Start +L1 = SDL-1/LeftShoulder +L2 = SDL-1/+LeftTrigger +R1 = SDL-1/RightShoulder +R2 = SDL-1/+RightTrigger +L3 = SDL-1/LeftStick +R3 = SDL-1/RightStick +Analog = SDL-1/Guide +LUp = SDL-1/-LeftY +LRight = SDL-1/+LeftX +LDown = SDL-1/+LeftY +LLeft = SDL-1/-LeftX +RUp = SDL-1/-RightY +RRight = SDL-1/+RightX +RDown = SDL-1/+RightY +RLeft = SDL-1/-RightX +LargeMotor = SDL-1/LargeMotor +SmallMotor = SDL-1/SmallMotor + + +[Pad3] +Type = None + + +[Pad4] +Type = None + + +[Pad5] +Type = None + + +[Pad6] +Type = None + + +[Pad7] +Type = None + + +[Pad8] +Type = None diff --git a/apps/es-de/build-fedora/configs/retroarch/retroarch.cfg b/apps/es-de/build-fedora/configs/retroarch/retroarch.cfg new file mode 100644 index 00000000..44285880 --- /dev/null +++ b/apps/es-de/build-fedora/configs/retroarch/retroarch.cfg @@ -0,0 +1,15 @@ +# This is just the minimal changes we want from the default. Retroarch will +# fill in the rest the first time it runs. + +# start in fullscreen +video_fullscreen = "true" + +menu_show_quit_retroarch = "true" +# Sort saves by cores +sort_savefiles_enable = "true" +sort_savestates_enable = "true" +system_directory = "~/bioses" +# Consistent to ES +menu_swap_ok_cancel_buttons = "true" +# Hotkey Start/Select for showing Quick Menu +input_menu_toggle_gamepad_combo = "4" \ No newline at end of file diff --git a/apps/es-de/build-fedora/configs/rpcs3/CurrentSettings.ini b/apps/es-de/build-fedora/configs/rpcs3/CurrentSettings.ini new file mode 100644 index 00000000..db30ab4c --- /dev/null +++ b/apps/es-de/build-fedora/configs/rpcs3/CurrentSettings.ini @@ -0,0 +1,69 @@ +[Config] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3W\0\0\x2\xaf\0\0\0\0\0\0\0\0\0\0\x3W\0\0\x2\xaf\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x3W\0\0\x2\xaf) + +[Debugger] +splitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\xff\xff\xff\xff\xff\xff\xff\xff\x1\xff\xff\xff\xff\x1\0\0\0\x1\0) + +[FileSystem] +dev_bdvd_list=$(EmulatorDir)dev_bdvd/ +dev_flash2_list=$(EmulatorDir)dev_flash2/ +dev_flash3_list=$(EmulatorDir)dev_flash3/ +dev_flash_list=$(EmulatorDir)dev_flash/ +dev_hdd0_list=$(EmulatorDir)dev_hdd0/ +dev_hdd1_list=$(EmulatorDir)dev_hdd1/ +emulator_dir_list= +games_list=$(EmulatorDir)games/ + +[GSFrame] +screen=0 + +[GameList] +hidden_list=@Invalid() +iconColor=@Variant(\0\0\0\x43\x1\xff\xff\xf0\xf0\xf0\xf0\xf0\xf0\0\0) +marginFactor=0.09 +sortAsc=true +sortCol=1 +state=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x1\x1\0\0\0\0\0\0\0\0\0\0\0\xfH\x6\0\0\0\x4\0\0\0\x3\0\0\0\0\0\0\0\x6\0\0\0\0\0\0\0\n\0\0\0\0\0\0\0\t\0\0\0\0\0\0\x6\x1b\0\0\0\xf\0\x1\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x96\xff\xff\xff\xff\0\0\0\x1\0\0\0\0\0\0\0\xf\0\0\0U\0\0\0\x1\0\0\0\x2\0\0\0\x96\0\0\0\x1\0\0\0\0\0\0\0\x96\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x96\0\0\0\x1\0\0\0\0\0\0\0\x96\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x96\0\0\0\x1\0\0\0\0\0\0\0\x96\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x96\0\0\0\x1\0\0\0\0\0\0\0\x96\0\0\0\x1\0\0\0\0\0\0\0\x96\0\0\0\x1\0\0\0\0\0\0\0\x80\0\0\0\x1\0\0\0\0\0\0\x3\xe8\x1\0\0\0\x80) +textFactor=2 +visibility_column_category=true +visibility_column_compat=true +visibility_column_dir_size=true +visibility_column_firmware=false +visibility_column_icon=true +visibility_column_last_play=true +visibility_column_move=true +visibility_column_name=true +visibility_column_parental=false +visibility_column_path=false +visibility_column_playtime=true +visibility_column_resolution=true +visibility_column_serial=true +visibility_column_sound=false +visibility_column_version=true + +[Localization] +language=en + +[Logger] +ANSI_code=true +ERR_stack=true +level=4 +stack=true + +[Meta] +checkUpdateStart=false +currentStylesheet=Skyline (Nightfall) +discordState= +showDebugTab=false +useRichPresence=true + +[PadSettings] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\xea\0\0\x3\t\0\0\0\0\0\0\0\0\0\0\x3\xea\0\0\x3\t\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x3\xea\0\0\x3\t) + +[main_window] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x5?\0\0\x2\xf3\0\0\0\0\0\0\0\0\0\0\x5?\0\0\x2\xf3\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x5?\0\0\x2\xf3) +infoBoxEnabledInstallPUP=false +infoBoxEnabledWelcome=false +lastExplorePathPUP=/home/retro/bioses +mwState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x2\0\0\0\0\0\0\x5@\0\0\x2\x9d\xfc\x2\0\0\0\x2\xfb\0\0\0\x10\0g\0\x61\0m\0\x65\0l\0i\0s\0t\x1\0\0\0\0\0\0\x2\x2\0\0\0\x19\0\xff\xff\xff\xfb\0\0\0\f\0l\0o\0g\0g\0\x65\0r\x1\0\0\x2\b\0\0\0\x95\0\0\0\x85\0\xff\xff\xff\0\0\0\x1\0\0\0\0\0\0\0\0\xfc\x2\0\0\0\x1\xfb\0\0\0\x10\0\x64\0\x65\0\x62\0u\0g\0g\0\x65\0r\0\0\0\0\0\xff\xff\xff\xff\0\0\0\xca\0\xff\xff\xff\0\0\0\0\0\0\x2\x9d\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0) +windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x5@\0\0\x2\x9d\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\0\0\0\x14\0m\0w\0_\0t\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0) diff --git a/apps/es-de/build-fedora/configs/rpcs3/Default.yml b/apps/es-de/build-fedora/configs/rpcs3/Default.yml new file mode 100644 index 00000000..0f2c89f0 --- /dev/null +++ b/apps/es-de/build-fedora/configs/rpcs3/Default.yml @@ -0,0 +1,546 @@ +Player 1 Input: + Handler: Evdev + Device: 4. Wolf X-Box One (virtual) pad + Config: + Left Stick Left: LX- + Left Stick Down: LY+ + Left Stick Right: LX+ + Left Stick Up: LY- + Right Stick Left: RX- + Right Stick Down: RY+ + Right Stick Right: RX+ + Right Stick Up: RY- + Start: Start + Select: Select + PS Button: Mode + Square: X + Cross: A + Circle: B + Triangle: Y + Left: Hat0 X- + Down: Hat0 Y+ + Right: Hat0 X+ + Up: Hat0 Y- + R1: TR + R2: RZ+ + R3: Thumb R + L1: TL + L2: LZ+ + L3: Thumb L + Motion Sensor X: + Axis: X + Mirrored: false + Shift: 0 + Motion Sensor Y: + Axis: Y + Mirrored: false + Shift: 0 + Motion Sensor Z: + Axis: Z + Mirrored: false + Shift: 0 + Motion Sensor G: + Axis: RY + Mirrored: false + Shift: 0 + Pressure Intensity Button: "" + Pressure Intensity Percent: 50 + Left Stick Multiplier: 100 + Right Stick Multiplier: 100 + Left Stick Deadzone: 30 + Right Stick Deadzone: 30 + Left Trigger Threshold: 0 + Right Trigger Threshold: 0 + Left Pad Squircling Factor: 5000 + Right Pad Squircling Factor: 5000 + Color Value R: 0 + Color Value G: 0 + Color Value B: 0 + Blink LED when battery is below 20%: true + Use LED as a battery indicator: false + LED battery indicator brightness: 50 + Player LED enabled: true + Enable Large Vibration Motor: true + Enable Small Vibration Motor: true + Switch Vibration Motors: false + Mouse Movement Mode: Relative + Mouse Deadzone X Axis: 60 + Mouse Deadzone Y Axis: 60 + Mouse Acceleration X Axis: 200 + Mouse Acceleration Y Axis: 250 + Left Stick Lerp Factor: 100 + Right Stick Lerp Factor: 100 + Analog Button Lerp Factor: 100 + Trigger Lerp Factor: 100 + Device Class Type: 0 + Vendor ID: 1356 + Product ID: 616 + Buddy Device: "" +Player 2 Input: + Handler: Evdev + Device: Wolf X-Box One (virtual) pad + Config: + Left Stick Left: LX- + Left Stick Down: LY+ + Left Stick Right: LX+ + Left Stick Up: LY- + Right Stick Left: RX- + Right Stick Down: RY+ + Right Stick Right: RX+ + Right Stick Up: RY- + Start: Start + Select: Select + PS Button: Mode + Square: X + Cross: A + Circle: B + Triangle: Y + Left: Hat0 X- + Down: Hat0 Y+ + Right: Hat0 X+ + Up: Hat0 Y- + R1: TR + R2: RZ+ + R3: Thumb R + L1: TL + L2: LZ+ + L3: Thumb L + Motion Sensor X: + Axis: X + Mirrored: false + Shift: 0 + Motion Sensor Y: + Axis: Y + Mirrored: false + Shift: 0 + Motion Sensor Z: + Axis: Z + Mirrored: false + Shift: 0 + Motion Sensor G: + Axis: RY + Mirrored: false + Shift: 0 + Pressure Intensity Button: "" + Pressure Intensity Percent: 50 + Left Stick Multiplier: 100 + Right Stick Multiplier: 100 + Left Stick Deadzone: 30 + Right Stick Deadzone: 30 + Left Trigger Threshold: 0 + Right Trigger Threshold: 0 + Left Pad Squircling Factor: 5000 + Right Pad Squircling Factor: 5000 + Color Value R: 0 + Color Value G: 0 + Color Value B: 0 + Blink LED when battery is below 20%: true + Use LED as a battery indicator: false + LED battery indicator brightness: 50 + Player LED enabled: true + Enable Large Vibration Motor: true + Enable Small Vibration Motor: true + Switch Vibration Motors: false + Mouse Movement Mode: Relative + Mouse Deadzone X Axis: 60 + Mouse Deadzone Y Axis: 60 + Mouse Acceleration X Axis: 200 + Mouse Acceleration Y Axis: 250 + Left Stick Lerp Factor: 100 + Right Stick Lerp Factor: 100 + Analog Button Lerp Factor: 100 + Trigger Lerp Factor: 100 + Device Class Type: 0 + Vendor ID: 1356 + Product ID: 616 + Buddy Device: "Null" +Player 3 Input: + Handler: Evdev + Device: 2. Wolf X-Box One (virtual) pad + Config: + Left Stick Left: LX- + Left Stick Down: LY+ + Left Stick Right: LX+ + Left Stick Up: LY- + Right Stick Left: RX- + Right Stick Down: RY+ + Right Stick Right: RX+ + Right Stick Up: RY- + Start: Start + Select: Select + PS Button: Mode + Square: X + Cross: A + Circle: B + Triangle: Y + Left: Hat0 X- + Down: Hat0 Y+ + Right: Hat0 X+ + Up: Hat0 Y- + R1: TR + R2: RZ+ + R3: Thumb R + L1: TL + L2: LZ+ + L3: Thumb L + Motion Sensor X: + Axis: X + Mirrored: false + Shift: 0 + Motion Sensor Y: + Axis: Y + Mirrored: false + Shift: 0 + Motion Sensor Z: + Axis: Z + Mirrored: false + Shift: 0 + Motion Sensor G: + Axis: RY + Mirrored: false + Shift: 0 + Pressure Intensity Button: "" + Pressure Intensity Percent: 50 + Left Stick Multiplier: 100 + Right Stick Multiplier: 100 + Left Stick Deadzone: 30 + Right Stick Deadzone: 30 + Left Trigger Threshold: 0 + Right Trigger Threshold: 0 + Left Pad Squircling Factor: 5000 + Right Pad Squircling Factor: 5000 + Color Value R: 0 + Color Value G: 0 + Color Value B: 0 + Blink LED when battery is below 20%: true + Use LED as a battery indicator: false + LED battery indicator brightness: 50 + Player LED enabled: true + Enable Large Vibration Motor: true + Enable Small Vibration Motor: true + Switch Vibration Motors: false + Mouse Movement Mode: Relative + Mouse Deadzone X Axis: 60 + Mouse Deadzone Y Axis: 60 + Mouse Acceleration X Axis: 200 + Mouse Acceleration Y Axis: 250 + Left Stick Lerp Factor: 100 + Right Stick Lerp Factor: 100 + Analog Button Lerp Factor: 100 + Trigger Lerp Factor: 100 + Device Class Type: 0 + Vendor ID: 1356 + Product ID: 616 + Buddy Device: "Null" +Player 4 Input: + Handler: Evdev + Device: 3. Wolf X-Box One (virtual) pad + Config: + Left Stick Left: LX- + Left Stick Down: LY+ + Left Stick Right: LX+ + Left Stick Up: LY- + Right Stick Left: RX- + Right Stick Down: RY+ + Right Stick Right: RX+ + Right Stick Up: RY- + Start: Start + Select: Select + PS Button: Mode + Square: X + Cross: A + Circle: B + Triangle: Y + Left: Hat0 X- + Down: Hat0 Y+ + Right: Hat0 X+ + Up: Hat0 Y- + R1: TR + R2: RZ+ + R3: Thumb R + L1: TL + L2: LZ+ + L3: Thumb L + Motion Sensor X: + Axis: X + Mirrored: false + Shift: 0 + Motion Sensor Y: + Axis: Y + Mirrored: false + Shift: 0 + Motion Sensor Z: + Axis: Z + Mirrored: false + Shift: 0 + Motion Sensor G: + Axis: RY + Mirrored: false + Shift: 0 + Pressure Intensity Button: "" + Pressure Intensity Percent: 50 + Left Stick Multiplier: 100 + Right Stick Multiplier: 100 + Left Stick Deadzone: 30 + Right Stick Deadzone: 30 + Left Trigger Threshold: 0 + Right Trigger Threshold: 0 + Left Pad Squircling Factor: 5000 + Right Pad Squircling Factor: 5000 + Color Value R: 0 + Color Value G: 0 + Color Value B: 0 + Blink LED when battery is below 20%: true + Use LED as a battery indicator: false + LED battery indicator brightness: 50 + Player LED enabled: true + Enable Large Vibration Motor: true + Enable Small Vibration Motor: true + Switch Vibration Motors: false + Mouse Movement Mode: Relative + Mouse Deadzone X Axis: 60 + Mouse Deadzone Y Axis: 60 + Mouse Acceleration X Axis: 200 + Mouse Acceleration Y Axis: 250 + Left Stick Lerp Factor: 100 + Right Stick Lerp Factor: 100 + Analog Button Lerp Factor: 100 + Trigger Lerp Factor: 100 + Device Class Type: 0 + Vendor ID: 1356 + Product ID: 616 + Buddy Device: "Null" +Player 5 Input: + Handler: "Null" + Device: "Null" + Config: + Left Stick Left: "" + Left Stick Down: "" + Left Stick Right: "" + Left Stick Up: "" + Right Stick Left: "" + Right Stick Down: "" + Right Stick Right: "" + Right Stick Up: "" + Start: "" + Select: "" + PS Button: "" + Square: "" + Cross: "" + Circle: "" + Triangle: "" + Left: "" + Down: "" + Right: "" + Up: "" + R1: "" + R2: "" + R3: "" + L1: "" + L2: "" + L3: "" + Motion Sensor X: + Axis: "" + Mirrored: false + Shift: 0 + Motion Sensor Y: + Axis: "" + Mirrored: false + Shift: 0 + Motion Sensor Z: + Axis: "" + Mirrored: false + Shift: 0 + Motion Sensor G: + Axis: "" + Mirrored: false + Shift: 0 + Pressure Intensity Button: "" + Pressure Intensity Percent: 50 + Left Stick Multiplier: 100 + Right Stick Multiplier: 100 + Left Stick Deadzone: 0 + Right Stick Deadzone: 0 + Left Trigger Threshold: 0 + Right Trigger Threshold: 0 + Left Pad Squircling Factor: 0 + Right Pad Squircling Factor: 0 + Color Value R: 0 + Color Value G: 0 + Color Value B: 0 + Blink LED when battery is below 20%: true + Use LED as a battery indicator: false + LED battery indicator brightness: 50 + Player LED enabled: true + Enable Large Vibration Motor: true + Enable Small Vibration Motor: true + Switch Vibration Motors: false + Mouse Movement Mode: Relative + Mouse Deadzone X Axis: 60 + Mouse Deadzone Y Axis: 60 + Mouse Acceleration X Axis: 200 + Mouse Acceleration Y Axis: 250 + Left Stick Lerp Factor: 100 + Right Stick Lerp Factor: 100 + Analog Button Lerp Factor: 100 + Trigger Lerp Factor: 100 + Device Class Type: 0 + Vendor ID: 0 + Product ID: 0 + Buddy Device: "Null" +Player 6 Input: + Handler: "Null" + Device: "Null" + Config: + Left Stick Left: "" + Left Stick Down: "" + Left Stick Right: "" + Left Stick Up: "" + Right Stick Left: "" + Right Stick Down: "" + Right Stick Right: "" + Right Stick Up: "" + Start: "" + Select: "" + PS Button: "" + Square: "" + Cross: "" + Circle: "" + Triangle: "" + Left: "" + Down: "" + Right: "" + Up: "" + R1: "" + R2: "" + R3: "" + L1: "" + L2: "" + L3: "" + Motion Sensor X: + Axis: "" + Mirrored: false + Shift: 0 + Motion Sensor Y: + Axis: "" + Mirrored: false + Shift: 0 + Motion Sensor Z: + Axis: "" + Mirrored: false + Shift: 0 + Motion Sensor G: + Axis: "" + Mirrored: false + Shift: 0 + Pressure Intensity Button: "" + Pressure Intensity Percent: 50 + Left Stick Multiplier: 100 + Right Stick Multiplier: 100 + Left Stick Deadzone: 0 + Right Stick Deadzone: 0 + Left Trigger Threshold: 0 + Right Trigger Threshold: 0 + Left Pad Squircling Factor: 0 + Right Pad Squircling Factor: 0 + Color Value R: 0 + Color Value G: 0 + Color Value B: 0 + Blink LED when battery is below 20%: true + Use LED as a battery indicator: false + LED battery indicator brightness: 50 + Player LED enabled: true + Enable Large Vibration Motor: true + Enable Small Vibration Motor: true + Switch Vibration Motors: false + Mouse Movement Mode: Relative + Mouse Deadzone X Axis: 60 + Mouse Deadzone Y Axis: 60 + Mouse Acceleration X Axis: 200 + Mouse Acceleration Y Axis: 250 + Left Stick Lerp Factor: 100 + Right Stick Lerp Factor: 100 + Analog Button Lerp Factor: 100 + Trigger Lerp Factor: 100 + Device Class Type: 0 + Vendor ID: 0 + Product ID: 0 + Buddy Device: "Null" +Player 7 Input: + Handler: "Null" + Device: "Null" + Config: + Left Stick Left: "" + Left Stick Down: "" + Left Stick Right: "" + Left Stick Up: "" + Right Stick Left: "" + Right Stick Down: "" + Right Stick Right: "" + Right Stick Up: "" + Start: "" + Select: "" + PS Button: "" + Square: "" + Cross: "" + Circle: "" + Triangle: "" + Left: "" + Down: "" + Right: "" + Up: "" + R1: "" + R2: "" + R3: "" + L1: "" + L2: "" + L3: "" + Motion Sensor X: + Axis: "" + Mirrored: false + Shift: 0 + Motion Sensor Y: + Axis: "" + Mirrored: false + Shift: 0 + Motion Sensor Z: + Axis: "" + Mirrored: false + Shift: 0 + Motion Sensor G: + Axis: "" + Mirrored: false + Shift: 0 + Pressure Intensity Button: "" + Pressure Intensity Percent: 50 + Left Stick Multiplier: 100 + Right Stick Multiplier: 100 + Left Stick Deadzone: 0 + Right Stick Deadzone: 0 + Left Trigger Threshold: 0 + Right Trigger Threshold: 0 + Left Pad Squircling Factor: 0 + Right Pad Squircling Factor: 0 + Color Value R: 0 + Color Value G: 0 + Color Value B: 0 + Blink LED when battery is below 20%: true + Use LED as a battery indicator: false + LED battery indicator brightness: 50 + Player LED enabled: true + Enable Large Vibration Motor: true + Enable Small Vibration Motor: true + Switch Vibration Motors: false + Mouse Movement Mode: Relative + Mouse Deadzone X Axis: 60 + Mouse Deadzone Y Axis: 60 + Mouse Acceleration X Axis: 200 + Mouse Acceleration Y Axis: 250 + Left Stick Lerp Factor: 100 + Right Stick Lerp Factor: 100 + Analog Button Lerp Factor: 100 + Trigger Lerp Factor: 100 + Device Class Type: 0 + Vendor ID: 0 + Product ID: 0 + Buddy Device: "Null" \ No newline at end of file diff --git a/apps/es-de/build-fedora/configs/xemu/xemu.toml b/apps/es-de/build-fedora/configs/xemu/xemu.toml new file mode 100644 index 00000000..aeaac58c --- /dev/null +++ b/apps/es-de/build-fedora/configs/xemu/xemu.toml @@ -0,0 +1,15 @@ +[general] +show_welcome = false + +[input.bindings] +port1 = '030000005e040000d102000000ab0000' +port2 = '030000005e040000d102000000ab0000' +port3 = '030000005e040000d102000000ab0000' +port4 = '030000005e040000d102000000ab0000' + +[sys.files] +bootrom_path = 'bioses/mcpx_1.0.bin' +flashrom_path = 'bioses/Complex_4627.bin' +eeprom_path = '.local/share/xemu/xemu/eeprom.bin' +hdd_path = '.local/share/xemu/xemu/xbox_hdd.qcow2' + diff --git a/apps/es-de/build-fedora/scripts/startup-es.sh b/apps/es-de/build-fedora/scripts/startup-es.sh new file mode 100644 index 00000000..e18cc7a3 --- /dev/null +++ b/apps/es-de/build-fedora/scripts/startup-es.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh +source /opt/gow/launch-comp.sh + +gow_log "Launching EmulationStation-Desktop Edition" +launcher "/Applications/esde.AppImage --appimage-extract-and-run --no-update-check" diff --git a/apps/es-de/build-fedora/scripts/startup.sh b/apps/es-de/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..994e352a --- /dev/null +++ b/apps/es-de/build-fedora/scripts/startup.sh @@ -0,0 +1,67 @@ +#!/bin/bash +set -e + +source /opt/gow/bash-lib/utils.sh + +gow_log "Starting Application preparation" + +RA_CFG_DIR=$HOME/.config/retroarch +RPCS3_CFG_DIR=$HOME/.config/rpcs3 +XEMU_CFG_DIR=$HOME/.local/share/xemu +PCSX2_CFG_DIR=$HOME/.config/PCSX2 +ES_CFG_DIR=$HOME/ES-DE +ROMS_DIR=/ROMs + + +gow_log "Copying custom config - retroarch.cfg, if not edited" +mkdir -p "$RA_CFG_DIR/cores/" +cp -u /cfg/retroarch/retroarch.cfg "$RA_CFG_DIR/retroarch.cfg" + +gow_log "Copying custom config - ES-DE Custom Scripts Platform, if not edited" +mkdir -p $ES_CFG_DIR/custom_systems +cp -u /cfg/es/es_systems.xml $ES_CFG_DIR/custom_systems + +gow_log "Copying custom gamelist - ES-DE Custom Scripts Platform, if not edited" +mkdir -p $ES_CFG_DIR/gamelists/Custom\ Scripts +cp -u /cfg/es/gamelist.xml $ES_CFG_DIR/gamelists/Custom\ Scripts + +gow_log "Copying custom config - RPCS3 Controller Bindings for Wolf and disable Auto-Update pop-up, if not edited" +mkdir -p $RPCS3_CFG_DIR/input_configs/global/ +cp -u /cfg/rpcs3/Default.yml $RPCS3_CFG_DIR/input_configs/global/Default.yml +mkdir -p $RPCS3_CFG_DIR/GuiConfigs +cp -u /cfg/rpcs3/CurrentSettings.ini $RPCS3_CFG_DIR/GuiConfigs/CurrentSettings.ini + +gow_log "Copying custom config - PCSX2 settings, if not edited" +mkdir -p $PCSX2_CFG_DIR/inis/ +cp -u /cfg/pcsx2/PCSX2.ini $PCSX2_CFG_DIR/inis/PCSX2.ini + +gow_log "Copying custom config - XEMU settings, if not edited" +mkdir -p $XEMU_CFG_DIR/xemu/ +cp -u /cfg/xemu/xemu.toml $XEMU_CFG_DIR/xemu/xemu.toml + +gow_log "Copying hdd for XEMU if it is present in bioses or newer" +if test -f $HOME/bioses/xbox_hdd.qcow2; then + gow_log "XEMU hdd is present, copy it to XEMU folder" + mkdir -p $XEMU_CFG_DIR/xemu/ + cp -u $HOME/bioses/xbox_hdd.qcow2 $XEMU_CFG_DIR/xemu/xbox_hdd.qcow2 +fi + +if test -f $ES_CFG_DIR/settings/es_settings.xml; then + gow_log "EmulationStation settings already exist, skipping" +else + mkdir -p $ES_CFG_DIR/settings/ + cp -u /cfg/es/es_settings.xml $ES_CFG_DIR/settings/es_settings.xml +fi + +gow_log "Checking RA Assets presence, if none - install them" +if [ ! -d "$RA_CFG_DIR/assets" ]; then + gow_log "No assets found, starting install" + wget -q -P /tmp https://buildbot.libretro.com/assets/frontend/assets.zip + 7z x /tmp/assets.zip -bso0 -bse0 -bsp1 -o"$RA_CFG_DIR/assets" + rm /tmp/assets.zip +fi + +gow_log "Giving permissions to user" +chown -R ${UNAME}:${UNAME} $ES_CFG_DIR +mkdir -p ${HOME}/.config +chown -R ${UNAME}:${UNAME} ${HOME}/.config diff --git a/apps/firefox/build-fedora/Dockerfile b/apps/firefox/build-fedora/Dockerfile new file mode 100644 index 00000000..c65aa910 --- /dev/null +++ b/apps/firefox/build-fedora/Dockerfile @@ -0,0 +1,54 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +ARG REQUIRED_PACKAGES=" \ + firefox \ +" + +RUN dnf install -y $REQUIRED_PACKAGES && \ + dnf clean all + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +# See the full list of supported options at: https://mozilla.github.io/policy-templates/ +COPY <<_PREFS /etc/firefox/policies/policies.json +{ + "policies": { + "AppAutoUpdate": false, + "OverrideFirstRunPage": "", + "OverridePostUpdatePage": "", + "FirefoxHome": { + "Search": true, + "TopSites": true, + "SponsoredTopSites": false, + "Highlights": true, + "Pocket": false, + "SponsoredPocket": false, + "Snippets": false, + "Locked": false + }, + "Preferences": { + "browser.policies.loglevel": { + "Value": "debug", + "Status": "default" + }, + "gfx.webrender.all": { + "Value": true, + "Status": "default" + }, + "webgl.force-enabled": { + "Value": true, + "Status": "default" + } + } + } +} +_PREFS + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/firefox/build-fedora/scripts/startup.sh b/apps/firefox/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..7318058d --- /dev/null +++ b/apps/firefox/build-fedora/scripts/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source /opt/gow/launch-comp.sh +launcher /usr/bin/firefox \ No newline at end of file diff --git a/apps/heroic-games-launcher/build-fedora/Dockerfile b/apps/heroic-games-launcher/build-fedora/Dockerfile new file mode 100644 index 00000000..f95e957b --- /dev/null +++ b/apps/heroic-games-launcher/build-fedora/Dockerfile @@ -0,0 +1,57 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +# Install RPM Fusion for wine and multimedia codecs +RUN dnf install -y \ + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + +# Install Wine, 32-bit libs, and multimedia packages +RUN dnf install -y \ + freetype.i686 \ + vulkan-loader vulkan-loader.i686 \ + mesa-vulkan-drivers mesa-vulkan-drivers.i686 \ + wine wine.i686 \ + winetricks \ + alsa-plugins-pulseaudio.i686 \ + sdl2-compat.i686 \ + dbus-libs.i686 \ + sqlite-libs.i686 \ + zenity \ + libnotify \ + xdg-utils \ + libsecret \ + curl \ + unzip \ + p7zip \ + cabextract \ + gstreamer1-plugins-base gstreamer1-plugins-good gstreamer1-plugins-bad-free gstreamer1-plugins-ugly-free \ + gstreamer1-plugins-base.i686 gstreamer1-plugins-good.i686 gstreamer1-plugins-bad-free.i686 gstreamer1-plugins-ugly-free.i686 \ + tar \ + wget \ + ca-certificates \ + xz \ + && dnf clean all + +WORKDIR / + +# Install Heroic Games Launcher from RPM +RUN <<_INSTALL_HEROIC +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh + +github_download "Heroic-Games-Launcher/HeroicGamesLauncher" ".assets[]|select(.name|endswith(\".rpm\"))|select(.name|contains(\"x86_64\")).browser_download_url" "heroic.rpm" +dnf install -y ./heroic.rpm +rm heroic.rpm +_INSTALL_HEROIC + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/heroic-games-launcher/build-fedora/scripts/startup.sh b/apps/heroic-games-launcher/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..516aa657 --- /dev/null +++ b/apps/heroic-games-launcher/build-fedora/scripts/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source /opt/gow/launch-comp.sh +launcher /usr/bin/heroic ${HEROIC_STARTUP_FLAGS} --no-sandbox diff --git a/apps/kodi/build-fedora/Dockerfile b/apps/kodi/build-fedora/Dockerfile new file mode 100644 index 00000000..455aef64 --- /dev/null +++ b/apps/kodi/build-fedora/Dockerfile @@ -0,0 +1,41 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +RUN <<_INSTALL_KODI + +set -e + +dnf install -y \ + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + +dnf install -y \ + dbus \ + python3 \ + kodi + +# Remove foot terminal if present +dnf remove -y foot 2>/dev/null || true +dnf clean all + +# Fix bwrap perms for flatpaks +chmod u+s /usr/bin/bwrap + +_INSTALL_KODI + +# Replace launch scripts +COPY overlay / +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh +COPY --chmod=777 scripts/startup-10-create-dirs.sh /opt/gow/startup.d/10-create-dirs.sh +COPY configs/Xbox_controller.xml /opt/gow/Xbox_controller.xml +COPY configs/Switch_controller.xml /opt/gow/Switch_controller.xml +COPY configs/PS_controller.xml /opt/gow/PS_controller.xml +COPY configs/settings.xml /opt/gow/settings.xml + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/kodi/build-fedora/configs/PS_controller.xml b/apps/kodi/build-fedora/configs/PS_controller.xml new file mode 100644 index 00000000..4929d9a4 --- /dev/null +++ b/apps/kodi/build-fedora/configs/PS_controller.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/kodi/build-fedora/configs/Switch_controller.xml b/apps/kodi/build-fedora/configs/Switch_controller.xml new file mode 100644 index 00000000..4bbbf51c --- /dev/null +++ b/apps/kodi/build-fedora/configs/Switch_controller.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/kodi/build-fedora/configs/Xbox_controller.xml b/apps/kodi/build-fedora/configs/Xbox_controller.xml new file mode 100644 index 00000000..f74360ea --- /dev/null +++ b/apps/kodi/build-fedora/configs/Xbox_controller.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/kodi/build-fedora/configs/settings.xml b/apps/kodi/build-fedora/configs/settings.xml new file mode 100644 index 00000000..b3903cef --- /dev/null +++ b/apps/kodi/build-fedora/configs/settings.xml @@ -0,0 +1,3 @@ + + 0 + diff --git a/apps/kodi/build-fedora/overlay/etc/cont-init.d/99-startdbus.sh b/apps/kodi/build-fedora/overlay/etc/cont-init.d/99-startdbus.sh new file mode 100644 index 00000000..38ecf508 --- /dev/null +++ b/apps/kodi/build-fedora/overlay/etc/cont-init.d/99-startdbus.sh @@ -0,0 +1,2 @@ +#!/bin/bash +service dbus start \ No newline at end of file diff --git a/apps/kodi/build-fedora/scripts/startup-10-create-dirs.sh b/apps/kodi/build-fedora/scripts/startup-10-create-dirs.sh new file mode 100644 index 00000000..06a32176 --- /dev/null +++ b/apps/kodi/build-fedora/scripts/startup-10-create-dirs.sh @@ -0,0 +1,16 @@ +#!/bin/bash -e + +gow_log "[start-create-dirs] Begin" + +# configure the controller. +if [ ! -d "${HOME}/.var/app/tv.kodi.Kodi/data/userdata/addon_data/peripheral.joystick/resources/buttonmaps/xml/linux" ] +then + gow_log "[start-create-dirs] Creating controller config file." + mkdir -p "${HOME}/.var/app/tv.kodi.Kodi/data/userdata/addon_data/peripheral.joystick/resources/buttonmaps/xml/linux/" + cp "/opt/gow/Xbox_controller.xml" "${HOME}/.var/app/tv.kodi.Kodi/data/userdata/addon_data/peripheral.joystick/resources/buttonmaps/xml/linux/Wolf_X-Box_One__virtual__pad_11b_8a.xml" + cp "/opt/gow/Switch_controller.xml" "${HOME}/.var/app/tv.kodi.Kodi/data/userdata/addon_data/peripheral.joystick/resources/buttonmaps/xml/linux/Wolf_Nintendo__virtual__pad_14b_6a.xml" + cp "/opt/gow/PS_controller.xml" "${HOME}/.var/app/tv.kodi.Kodi/data/userdata/addon_data/peripheral.joystick/resources/buttonmaps/xml/linux/Wolf_DualSense__virtual__pad_13b_8a.xml" + cp "/opt/gow/settings.xml" "${HOME}/.var/app/tv.kodi.Kodi/data/userdata/addon_data/peripheral.joystick/settings.xml" +fi + +gow_log "[start-create-dirs] End" diff --git a/apps/kodi/build-fedora/scripts/startup.sh b/apps/kodi/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..03f98471 --- /dev/null +++ b/apps/kodi/build-fedora/scripts/startup.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +source /opt/gow/bash-lib/utils.sh + +# Run additional startup scripts +for file in /opt/gow/startup.d/* ; do + if [ -f "$file" ] ; then + gow_log "[start] Sourcing $file" + source $file + fi +done + + + +export XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/home/retro/.local/share/flatpak/exports/share:/usr/local/share/:/usr/share/ + + + +gow_log "Starting Kodi" +source /opt/gow/launch-comp.sh +launcher /usr/bin/kodi --standalone \ No newline at end of file diff --git a/apps/lutris/build-fedora/Dockerfile b/apps/lutris/build-fedora/Dockerfile new file mode 100644 index 00000000..c72e6079 --- /dev/null +++ b/apps/lutris/build-fedora/Dockerfile @@ -0,0 +1,80 @@ +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +###################################### +# Same as Steam, here we build a patched bubblewrap +# that works with CAP_SYS_ADMIN in containers. +FROM ${BASE_APP_IMAGE} AS bwrap-builder + +WORKDIR /root +COPY ignore_capabilities.patch /root/ +RUN dnf install -y git meson ca-certificates dpkg-dev && \ + git clone https://github.com/containers/bubblewrap && \ + cd bubblewrap && \ + ./ci/builddeps.sh && \ + patch -p1 < ../ignore_capabilities.patch && \ + meson _builddir && \ + meson compile -C _builddir + +###################################### + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +ARG LUTRIS_VERSION=0.5.22 + +# Install RPM Fusion for wine and multimedia codecs +RUN dnf install -y \ + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + +# Install Wine, 32-bit libs, Python deps, and Lutris dependencies +RUN dnf install -y \ + cabextract \ + curl \ + fluid-soundfont-gm \ + gtk3 gobject-introspection \ + webkit2gtk4.1 \ + gdk-pixbuf2 \ + librsvg2 \ + alsa-plugins-pulseaudio.i686 \ + dbus-libs.i686 \ + freetype.i686 \ + mesa-libGL.i686 \ + mesa-libEGL.i686 \ + sdl2-compat.i686 \ + sqlite-libs.i686 \ + vulkan-loader vulkan-loader.i686 \ + mesa-vulkan-drivers mesa-vulkan-drivers.i686 \ + p7zip \ + python3-dbus \ + python3-distro \ + python3-gobject \ + python3-lxml \ + python3-pillow \ + python3-requests \ + python3-setproctitle \ + python3-pyyaml \ + python3-magic \ + unzip \ + vulkan-tools \ + wine wine.i686 \ + winetricks \ + xrandr \ + zenity \ + lutris \ + && dnf clean all + +# Replace system bwrap with patched version that works with CAP_SYS_ADMIN +COPY --from=bwrap-builder --chmod=755 /root/bubblewrap/_builddir/bwrap /usr/bin/bwrap + +RUN mkdir -pm 777 /var/lutris/ && \ + mkdir /opt/gow/startup.d/ +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh +COPY --chmod=777 scripts/startup-10-create-dirs.sh /opt/gow/startup.d/10-create-dirs.sh +COPY configs/lutris-system.yml /opt/gow/lutris-system.yml +COPY configs/lutris-lutris.conf /opt/gow/lutris-lutris.conf + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/lutris/build-fedora/configs/lutris-lutris.conf b/apps/lutris/build-fedora/configs/lutris-lutris.conf new file mode 100644 index 00000000..fd8214b0 --- /dev/null +++ b/apps/lutris/build-fedora/configs/lutris-lutris.conf @@ -0,0 +1,2 @@ +[lutris] +hide-wine-systemwide-install-warning = True diff --git a/apps/lutris/build-fedora/configs/lutris-system.yml b/apps/lutris/build-fedora/configs/lutris-system.yml new file mode 100644 index 00000000..8a984247 --- /dev/null +++ b/apps/lutris/build-fedora/configs/lutris-system.yml @@ -0,0 +1,2 @@ +system: + game_path: /var/lutris/Games diff --git a/apps/lutris/build-fedora/ignore_capabilities.patch b/apps/lutris/build-fedora/ignore_capabilities.patch new file mode 100644 index 00000000..66fb9aba --- /dev/null +++ b/apps/lutris/build-fedora/ignore_capabilities.patch @@ -0,0 +1,18 @@ +diff --git a/bubblewrap.c b/bubblewrap.c +index 8322ea0..4e20262 100644 +--- a/bubblewrap.c ++++ b/bubblewrap.c +@@ -868,13 +868,6 @@ acquire_privs (void) + /* Keep only the required capabilities for setup */ + set_required_caps (); + } +- else if (real_uid != 0 && has_caps ()) +- { +- /* We have some capabilities in the non-setuid case, which should not happen. +- Probably caused by the binary being setcap instead of setuid which we +- don't support anymore */ +- die ("Unexpected capabilities but not setuid, old file caps config?"); +- } + else if (real_uid == 0) + { + /* If our uid is 0, default to inheriting all caps; the caller \ No newline at end of file diff --git a/apps/lutris/build-fedora/scripts/startup-10-create-dirs.sh b/apps/lutris/build-fedora/scripts/startup-10-create-dirs.sh new file mode 100644 index 00000000..e7694719 --- /dev/null +++ b/apps/lutris/build-fedora/scripts/startup-10-create-dirs.sh @@ -0,0 +1,58 @@ +#!/bin/bash -e + +# Create the basic file structe lutris expects, using symlinks to /var/lutris +# It is expected that a volume be mounted at /var/volume such that game +# installation can be shared by multiple images and containers. + +gow_log "[start-create-dirs] Begin" + +# "library" will contain information about available games and installed games. +if [ ! -d "/var/lutris/library" ] +then + gow_log "[start-create-dirs] Creating /var/lutris/library" + mkdir -p "/var/lutris/library" +fi + +if [ ! -e "${HOME}/.config/lutris/games" ] +then + gow_log "[start-create-dirs] Creating symlink ${HOME}/.config/lutris/games -> /var/lutris/library" + mkdir -p "${HOME}/.config/lutris" + ln -s "/var/lutris/library" "${HOME}/.config/lutris/games" +fi + +# "share" contains stateful information, and sharing share allows the system to have a common games library. +if [ ! -d "/var/lutris/share" ] +then + gow_log "[start-create-dirs] Creating /var/lutris/share" + mkdir -p "/var/lutris/share" +fi + +if [ ! -e "${HOME}/.local/share/lutris" ] +then + gow_log "[start-create-dirs] Creating symlink ${HOME}/.local/share/lutris -> /var/lutris/share" + mkdir -p "${HOME}/.local/share" + ln -s "/var/lutris/share" "${HOME}/.local/share/lutris" +fi + +# "Games" will contain actual installation files. +if [ ! -d "/var/lutris/Games" ] +then + gow_log "[start-create-dirs] Creating /var/lutris/Games" + mkdir -p "/var/lutris/Games" +fi + +# configuration file, pointing lutris at the Games directory. +if [ ! -f "${HOME}/.config/lutris/system.yml" ] +then + gow_log "[start-create-dirs] Creating lutris system config file." + cp "/opt/gow/lutris-system.yml" "${HOME}/.config/lutris/system.yml" +fi + +# configuration file, telling lutris to ignore missing wine +if [ ! -f "${HOME}/.config/lutris/lutris.conf" ] +then + gow_log "[start-create-dirs] Creating lutris config file." + cp "/opt/gow/lutris-lutris.conf" "${HOME}/.config/lutris/lutris.conf" +fi + +gow_log "[start-create-dirs] End" diff --git a/apps/lutris/build-fedora/scripts/startup.sh b/apps/lutris/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..09732f88 --- /dev/null +++ b/apps/lutris/build-fedora/scripts/startup.sh @@ -0,0 +1,18 @@ +#!/bin/bash -e + +source /opt/gow/bash-lib/utils.sh + +LUTRIS=/usr/bin/lutris + +# Run additional startup scripts +for file in /opt/gow/startup.d/* ; do + if [ -f "$file" ] ; then + gow_log "[start] Sourcing $file" + source $file + fi +done + +gow_log "[start] Starting Lutris" + +source /opt/gow/launch-comp.sh +launcher "${LUTRIS}" "${LUTRIS_ARGS[@]}" diff --git a/apps/lutris/build/Dockerfile b/apps/lutris/build/Dockerfile index cc2ad190..eab0f233 100644 --- a/apps/lutris/build/Dockerfile +++ b/apps/lutris/build/Dockerfile @@ -4,9 +4,9 @@ ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:edge # Same as Steam, here we build a patched bubblewrap # that works with CAP_SYS_ADMIN in containers. # bwrap detects explicit capabilities and aborts; this patch removes that check. -FROM ubuntu:25.04 AS bwrap-builder +FROM ${BASE_APP_IMAGE} AS bwrap-builder -ENV DEBIAN_FRONTEND=non-interactive +ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root COPY ignore_capabilities.patch /root/ RUN apt-get update -y && \ diff --git a/apps/pegasus/build-fedora/Dockerfile b/apps/pegasus/build-fedora/Dockerfile new file mode 100644 index 00000000..899b0e9b --- /dev/null +++ b/apps/pegasus/build-fedora/Dockerfile @@ -0,0 +1,51 @@ +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +# see: https://github.com/AppImage/AppImageKit/wiki/FUSE#docker +ENV APPIMAGE_EXTRACT_AND_RUN=1 + +RUN dnf install -y \ + gstreamer1-plugins-base \ + fuse-zip \ + openssl-libs \ + && dnf clean all + +# Setup ISO mounting location +RUN mkdir -p /media/iso_mount && chown 1000:1000 /media/iso_mount + +# Install pegasus via static x11 build (no .deb or AppImage available for Fedora) +RUN <<_INSTALL_PEGASUS +#!/bin/bash +set -e + +echo "**** Installing pegasus ****" + +cd /tmp +curl -s https://api.github.com/repos/mmatyas/pegasus-frontend/releases/tags/continuous | \ +jq -r '.assets[] | select(.name | contains("x11-static.zip")) | .browser_download_url' | head -1 | \ +xargs curl -fsSL -o pegasus.zip + +dnf install -y unzip +unzip pegasus.zip -d /tmp/pegasus +cp /tmp/pegasus/pegasus-fe /usr/local/bin/pegasus-fe +chmod +x /usr/local/bin/pegasus-fe +dnf remove -y unzip + +# Cleanup +rm -rf /tmp/* +_INSTALL_PEGASUS + +# Copy config files +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh +COPY --chmod=777 scripts/pegasus.sh /bin/pegasus.sh + +# Copy Pegasus related files +COPY scripts/tools/*.sh /bin/ +COPY configs /cfg + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/pegasus/build-fedora/configs/PCSX2/PCSX2.ini b/apps/pegasus/build-fedora/configs/PCSX2/PCSX2.ini new file mode 100644 index 00000000..671b3d8d --- /dev/null +++ b/apps/pegasus/build-fedora/configs/PCSX2/PCSX2.ini @@ -0,0 +1,547 @@ +[UI] +SettingsVersion = 1 +InhibitScreensaver = true +ConfirmShutdown = true +StartPaused = false +PauseOnFocusLoss = false +StartFullscreen = true +DoubleClickTogglesFullscreen = true +HideMouseCursor = false +RenderToSeparateWindow = false +HideMainWindowWhenRunning = false +DisableWindowResize = false +Theme = darkfusion +MainWindowGeometry = AdnQywADAAAAAAAAAAAAAAAABBkAAAKZAAAAAAAAAAAAAAQZAAACmQAAAAAAAAAAB4AAAAAAAAAAAAAABBkAAAKZ +MainWindowState = AAAA/wAAAAD9AAAAAAAABBoAAAJxAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAHQAbwBvAGwAQgBhAHIAAAAAAP////8AAAAAAAAAAA== + + +[Folders] +Bios = ../../../../bioses/pcsx2/bios +Snapshots = snaps +Savestates = sstates +MemoryCards = memcards +Logs = logs +Cheats = cheats +Patches = patches +Cache = cache +Textures = textures +InputProfiles = inputprofiles +Videos = videos + + +[EmuCore] +CdvdVerboseReads = false +CdvdDumpBlocks = false +CdvdShareWrite = false +EnablePatches = true +EnableCheats = false +EnablePINE = false +EnableWideScreenPatches = false +EnableNoInterlacingPatches = false +EnableRecordingTools = true +EnableGameFixes = true +SaveStateOnShutdown = false +EnableDiscordPresence = false +InhibitScreensaver = true +ConsoleToStdio = false +HostFs = false +BackupSavestate = true +SavestateZstdCompression = true +McdEnableEjection = true +McdFolderAutoManage = true +WarnAboutUnsafeSettings = true +GzipIsoIndexTemplate = $(f).pindex.tmp +PINESlot = 28011 +BlockDumpSaveDirectory = +EnableFastBoot = true + + +[EmuCore/Speedhacks] +EECycleRate = 0 +EECycleSkip = 0 +fastCDVD = false +IntcStat = true +WaitLoop = true +vuFlagHack = true +vuThread = true +vu1Instant = true + + +[EmuCore/CPU] +FPU.DenormalsAreZero = true +FPU.FlushToZero = true +FPU.Roundmode = 3 +AffinityControlMode = 0 +VU0.DenormalsAreZero = true +VU0.FlushToZero = true +VU0.Roundmode = 3 +VU1.DenormalsAreZero = true +VU1.FlushToZero = true +VU1.Roundmode = 3 + + +[EmuCore/CPU/Recompiler] +EnableEE = true +EnableIOP = true +EnableEECache = false +EnableVU0 = true +EnableVU1 = true +EnableFastmem = true +PauseOnTLBMiss = false +vu0Overflow = true +vu0ExtraOverflow = false +vu0SignOverflow = false +vu0Underflow = false +vu1Overflow = true +vu1ExtraOverflow = false +vu1SignOverflow = false +vu1Underflow = false +fpuOverflow = true +fpuExtraOverflow = false +fpuFullMode = false + + +[EmuCore/GS] +VsyncQueueSize = 2 +FrameLimitEnable = true +VsyncEnable = 0 +FramerateNTSC = 59.94 +FrameratePAL = 50 +SyncToHostRefreshRate = false +AspectRatio = 16:9 +FMVAspectRatioSwitch = Off +ScreenshotSize = 0 +ScreenshotFormat = 0 +ScreenshotQuality = 50 +StretchY = 100 +CropLeft = 0 +CropTop = 0 +CropRight = 0 +CropBottom = 0 +pcrtc_antiblur = true +disable_interlace_offset = false +pcrtc_offsets = false +pcrtc_overscan = false +IntegerScaling = false +UseDebugDevice = false +UseBlitSwapChain = false +DisableShaderCache = false +DisableDualSourceBlend = false +DisableFramebufferFetch = false +DisableVertexShaderExpand = false +DisableThreadedPresentation = false +SkipDuplicateFrames = false +OsdShowMessages = true +OsdShowSpeed = false +OsdShowFPS = false +OsdShowCPU = false +OsdShowGPU = false +OsdShowResolution = false +OsdShowGSStats = false +OsdShowIndicators = true +OsdShowSettings = false +OsdShowInputs = false +OsdShowFrameTimes = false +HWSpinGPUForReadbacks = false +HWSpinCPUForReadbacks = false +paltex = false +autoflush_sw = true +preload_frame_with_gs_data = false +mipmap = true +UserHacks = false +UserHacks_align_sprite_X = false +UserHacks_AutoFlushLevel = 0 +UserHacks_CPU_FB_Conversion = false +UserHacks_ReadTCOnClose = false +UserHacks_DisableDepthSupport = false +UserHacks_DisablePartialInvalidation = false +UserHacks_Disable_Safe_Features = false +UserHacks_DisableRenderFixes = false +UserHacks_merge_pp_sprite = false +UserHacks_WildHack = false +UserHacks_BilinearHack = false +UserHacks_NativePaletteDraw = false +UserHacks_TextureInsideRt = 0 +UserHacks_TargetPartialInvalidation = false +UserHacks_EstimateTextureRegion = false +fxaa = false +ShadeBoost = false +dump = false +save = false +savef = false +savet = false +savez = false +DumpReplaceableTextures = false +DumpReplaceableMipmaps = false +DumpTexturesWithFMVActive = false +DumpDirectTextures = true +DumpPaletteTextures = true +LoadTextureReplacements = false +LoadTextureReplacementsAsync = true +PrecacheTextureReplacements = false +EnableVideoCapture = true +EnableVideoCaptureParameters = false +VideoCaptureAutoResolution = false +EnableAudioCapture = true +EnableAudioCaptureParameters = false +linear_present_mode = 1 +deinterlace_mode = 0 +OsdScale = 100 +Renderer = -1 +upscale_multiplier = 3 +mipmap_hw = -1 +accurate_blending_unit = 1 +filter = 2 +texture_preloading = 2 +GSDumpCompression = 2 +HWDownloadMode = 0 +CASMode = 0 +CASSharpness = 50 +dithering_ps2 = 2 +MaxAnisotropy = 0 +extrathreads = 3 +extrathreads_height = 4 +TVShader = 0 +UserHacks_SkipDraw_Start = 0 +UserHacks_SkipDraw_End = 0 +UserHacks_Half_Bottom_Override = -1 +UserHacks_HalfPixelOffset = 0 +UserHacks_round_sprite_offset = 0 +UserHacks_TCOffsetX = 0 +UserHacks_TCOffsetY = 0 +UserHacks_CPUSpriteRenderBW = 0 +UserHacks_CPUSpriteRenderLevel = 0 +UserHacks_CPUCLUTRender = 0 +UserHacks_GPUTargetCLUTMode = 0 +TriFilter = -1 +OverrideTextureBarriers = -1 +ShadeBoost_Brightness = 50 +ShadeBoost_Contrast = 50 +ShadeBoost_Saturation = 50 +ExclusiveFullscreenControl = -1 +png_compression_level = 1 +saven = 0 +savel = 5000 +CaptureContainer = mp4 +VideoCaptureCodec = +VideoCaptureParameters = +AudioCaptureCodec = +AudioCaptureParameters = +VideoCaptureBitrate = 6000 +VideoCaptureWidth = 640 +VideoCaptureHeight = 480 +AudioCaptureBitrate = 160 +Adapter = +HWDumpDirectory = +SWDumpDirectory = + + +[SPU2/Debug] +Global_Enable = false +Show_Messages = false +Show_Messages_Key_On_Off = false +Show_Messages_Voice_Off = false +Show_Messages_DMA_Transfer = false +Show_Messages_AutoDMA = false +Show_Messages_Overruns = false +Show_Messages_CacheStats = false +Log_Register_Access = false +Log_DMA_Transfers = false +Log_WAVE_Output = false +Dump_Info = false +Dump_Memory = false +Dump_Regs = false + + +[SPU2/Mixing] +FinalVolume = 100 + + +[SPU2/Output] +OutputModule = cubeb +BackendName = +DeviceName = +Latency = 60 +OutputLatency = 20 +OutputLatencyMinimal = false +SynchMode = 0 +SpeakerConfiguration = 0 +DplDecodingLevel = 0 + + +[DEV9/Eth] +EthEnable = false +EthApi = Unset +EthDevice = +EthLogDNS = false +InterceptDHCP = false +PS2IP = 0.0.0.0 +Mask = 0.0.0.0 +Gateway = 0.0.0.0 +DNS1 = 0.0.0.0 +DNS2 = 0.0.0.0 +AutoMask = true +AutoGateway = true +ModeDNS1 = Auto +ModeDNS2 = Auto + + +[DEV9/Eth/Hosts] +Count = 0 + + +[DEV9/Hdd] +HddEnable = false +HddFile = DEV9hdd.raw +HddSizeSectors = 83886080 + + +[EmuCore/Gamefixes] +VuAddSubHack = false +FpuMulHack = false +FpuNegDivHack = false +XgKickHack = false +EETimingHack = false +InstantDMAHack = false +SoftwareRendererFMVHack = false +SkipMPEGHack = false +OPHFlagHack = false +DMABusyHack = false +VIFFIFOHack = false +VIF1StallHack = false +GIFFIFOHack = false +GoemonTlbHack = false +IbitHack = false +VUSyncHack = false +VUOverflowHack = false +BlitInternalFPSHack = false +FullVU0SyncHack = false + + +[EmuCore/Profiler] +Enabled = false +RecBlocks_EE = true +RecBlocks_IOP = true +RecBlocks_VU0 = true +RecBlocks_VU1 = true + + +[EmuCore/Debugger] +ShowDebuggerOnStart = false +AlignMemoryWindowStart = true +FontWidth = 8 +FontHeight = 12 +WindowWidth = 0 +WindowHeight = 0 +MemoryViewBytesPerRow = 16 + + +[EmuCore/TraceLog] +Enabled = false +EE.bitset = 0 +IOP.bitset = 0 + + +[USB1] +Type = None + + +[USB2] +Type = None + + +[Achievements] +Enabled = false +TestMode = false +UnofficialTestMode = false +RichPresence = true +ChallengeMode = false +Leaderboards = true +Notifications = true +SoundEffects = true +PrimedIndicators = true + + +[Filenames] +BIOS = scph39001.bin + + +[Framerate] +NominalScalar = 1 +TurboScalar = 2 +SlomoScalar = 0.5 + + +[MemoryCards] +Slot1_Enable = true +Slot1_Filename = Mcd001.ps2 +Slot2_Enable = true +Slot2_Filename = Mcd002.ps2 +Multitap1_Slot2_Enable = false +Multitap1_Slot2_Filename = Mcd-Multitap1-Slot02.ps2 +Multitap1_Slot3_Enable = false +Multitap1_Slot3_Filename = Mcd-Multitap1-Slot03.ps2 +Multitap1_Slot4_Enable = false +Multitap1_Slot4_Filename = Mcd-Multitap1-Slot04.ps2 +Multitap2_Slot2_Enable = false +Multitap2_Slot2_Filename = Mcd-Multitap2-Slot02.ps2 +Multitap2_Slot3_Enable = false +Multitap2_Slot3_Filename = Mcd-Multitap2-Slot03.ps2 +Multitap2_Slot4_Enable = false +Multitap2_Slot4_Filename = Mcd-Multitap2-Slot04.ps2 + + +[Logging] +EnableSystemConsole = false +EnableFileLogging = false +EnableTimestamps = true +EnableVerbose = false +EnableEEConsole = false +EnableIOPConsole = false +EnableInputRecordingLogs = true +EnableControllerLogs = false + + +[InputSources] +Keyboard = true +Mouse = true +SDL = true +SDLControllerEnhancedMode = false + + +[Hotkeys] +ToggleFullscreen = Keyboard/Alt & Keyboard/Return +CycleAspectRatio = Keyboard/F6 +CycleInterlaceMode = Keyboard/F5 +CycleMipmapMode = Keyboard/Insert +GSDumpMultiFrame = Keyboard/Control & Keyboard/Shift & Keyboard/F8 +Screenshot = Keyboard/F8 +GSDumpSingleFrame = Keyboard/Shift & Keyboard/F8 +ToggleSoftwareRendering = Keyboard/F9 +ZoomIn = Keyboard/Control & Keyboard/Plus +ZoomOut = Keyboard/Control & Keyboard/Minus +InputRecToggleMode = Keyboard/Shift & Keyboard/R +LoadStateFromSlot = Keyboard/F3 +SaveStateToSlot = Keyboard/F1 +NextSaveStateSlot = Keyboard/F2 +PreviousSaveStateSlot = Keyboard/Shift & Keyboard/F2 +OpenPauseMenu = Keyboard/Escape +ToggleFrameLimit = Keyboard/F4 +TogglePause = Keyboard/Space +ToggleSlowMotion = Keyboard/Shift & Keyboard/Backtab +ToggleTurbo = Keyboard/Tab +HoldTurbo = Keyboard/Period + + +[Pad] +MultitapPort1 = false +MultitapPort2 = false +PointerXSpeed = 40 +PointerYSpeed = 40 +PointerXDeadZone = 20 +PointerYDeadZone = 20 +PointerInertia = 10 + + +[Pad1] +Type = DualShock2 +InvertL = 0 +InvertR = 0 +Deadzone = 0 +AxisScale = 1.33 +TriggerDeadzone = 0 +TriggerScale = 1 +LargeMotorScale = 1 +SmallMotorScale = 1 +ButtonDeadzone = 0 +PressureModifier = 0.5 +Up = SDL-0/DPadUp +Right = SDL-0/DPadRight +Down = SDL-0/DPadDown +Left = SDL-0/DPadLeft +Triangle = SDL-0/Y +Circle = SDL-0/B +Cross = SDL-0/A +Square = SDL-0/X +Select = SDL-0/Back +Start = SDL-0/Start +L1 = SDL-0/LeftShoulder +L2 = SDL-0/+LeftTrigger +R1 = SDL-0/RightShoulder +R2 = SDL-0/+RightTrigger +L3 = SDL-0/LeftStick +R3 = SDL-0/RightStick +LUp = SDL-0/-LeftY +LRight = SDL-0/+LeftX +LDown = SDL-0/+LeftY +LLeft = SDL-0/-LeftX +RUp = SDL-0/-RightY +RRight = SDL-0/+RightX +RDown = SDL-0/+RightY +RLeft = SDL-0/-RightX + + +[Pad2] +Type = DualShock2 +InvertL = 0 +InvertR = 0 +Deadzone = 0 +AxisScale = 1.33 +TriggerDeadzone = 0 +TriggerScale = 1 +LargeMotorScale = 1 +SmallMotorScale = 1 +ButtonDeadzone = 0 +PressureModifier = 0.5 +Up = SDL-1/DPadUp +Right = SDL-1/DPadRight +Down = SDL-1/DPadDown +Left = SDL-1/DPadLeft +Triangle = SDL-1/Y +Circle = SDL-1/B +Cross = SDL-1/A +Square = SDL-1/X +Select = SDL-1/Back +Start = SDL-1/Start +L1 = SDL-1/LeftShoulder +L2 = SDL-1/+LeftTrigger +R1 = SDL-1/RightShoulder +R2 = SDL-1/+RightTrigger +L3 = SDL-1/LeftStick +R3 = SDL-1/RightStick +LUp = SDL-1/-LeftY +LRight = SDL-1/+LeftX +LDown = SDL-1/+LeftY +LLeft = SDL-1/-LeftX +RUp = SDL-1/-RightY +RRight = SDL-1/+RightX +RDown = SDL-1/+RightY +RLeft = SDL-1/-RightX + + +[Pad3] +Type = None + + +[Pad4] +Type = None + + +[Pad5] +Type = None + + +[Pad6] +Type = None + + +[Pad7] +Type = None + + +[Pad8] +Type = None + + +[AutoUpdater] +CheckAtStartup = false \ No newline at end of file diff --git a/apps/pegasus/build-fedora/configs/app/game_dirs.txt b/apps/pegasus/build-fedora/configs/app/game_dirs.txt new file mode 100644 index 00000000..7cf48571 --- /dev/null +++ b/apps/pegasus/build-fedora/configs/app/game_dirs.txt @@ -0,0 +1,46 @@ +/cfg/app +/ROMs/3do +/ROMs/amiga +/ROMs/amigacd32 +/ROMs/arcade +/ROMs/atari2600 +/ROMs/atari5200 +/ROMs/atari7800 +/ROMs/atarijaguar +/ROMs/atarijaguarcd +/ROMs/atarilynx +/ROMs/atarist +/ROMs/dreamcast +/ROMs/gb +/ROMs/gba +/ROMs/gbc +/ROMs/gc +/ROMs/genesis +/ROMs/mastersystem +/ROMs/megacd +/ROMs/model2 +/ROMs/model3 +/ROMs/n64 +/ROMs/naomi +/ROMs/neogeo +/ROMs/nes +/ROMs/ngp +/ROMs/ngpc +/ROMs/ps2 +/ROMs/ps3 +/ROMs/psp +/ROMs/psx +/ROMs/saturn +/ROMs/scummvm +/ROMs/sega32x +/ROMs/segacd +/ROMs/snes +/ROMs/snes_widescreen +/ROMs/switch +/ROMs/virtualboy +/ROMs/wii +/ROMs/wiiu +/ROMs/wonderswan +/ROMs/wonderswancolor +/ROMs/xbox +/ROMs/xbox360 diff --git a/apps/pegasus/build-fedora/configs/app/metadata.pegasus.txt b/apps/pegasus/build-fedora/configs/app/metadata.pegasus.txt new file mode 100644 index 00000000..a738636a --- /dev/null +++ b/apps/pegasus/build-fedora/configs/app/metadata.pegasus.txt @@ -0,0 +1,67 @@ +collection: Applications +launch: {file.path} +files: + /Applications/launchers/cemu.sh + /Applications/launchers/retroarch.sh + /Applications/launchers/pcsx2.sh + /bin/download_pegasus_themes.sh + /Applications/launchers/dolphin.sh + /Applications/launchers/xemu.sh + /Applications/launchers/citron.sh + /Applications/launchers/rpcs3.sh + /bin/Install_RPCS3_Firmware.sh + /usr/bin/kitty + +game: Bash Console +file: /usr/bin/kitty +description: Bash Console + +game: Emulators - Cemu +release: 2015-10-13 +file: /Applications/launchers/cemu.sh +description: Cemu is a free and open-source Wii U emulator, first released on October 13, 2015 for Microsoft Windows as a closed-source emulator developed by Exzap and Petergov. Experimental builds currently support Linux and macOS, in addition to the Windows environment available from launch. + +game: Emulators - Dolphin +release: 2023-09-22 +file: /Applications/launchers/dolphin.sh +description: Dolphin is an open-source emulator for the Nintendo GameCube and Wii with support for Microsoft Windows, Linux, Mac OS X, and Android. Dolphin was the first emulator to boot GameCube and later Wii games, and now boasts compatibility with most titles for those game systems. With a huge community of developers and users around the world, Dolphin continues to gain compatibility, performance, and new features to this day. + +game: Emulators - PCSX2 +release: 2023-09-22 +file: /Applications/launchers/pcsx2.sh +description: PCSX2 is a free and open-source PlayStation 2 (PS2) emulator. Its purpose is to emulate the PS2's hardware, using a combination of MIPS CPU Interpreters, Recompilers and a Virtual Machine which manages hardware states and PS2 system memory. + +game: Emulators - RetroArch +release: 2023-09-22 +file: /Applications/launchers/retroarch.sh +description: RetroArch is a frontend for emulators, game engines and media players. It enables you to run classic games on a wide range of computers and consoles through its slick graphical interface. Settings are also unified so configuration is done once and for all. In addition to this, you are able to run original game discs (CDs) from RetroArch. + +game: Emulators - Citron +release: 2025-08-01 +file: /Applications/launchers/citron.sh +description: Citron is a high-performance, homebrew-focused Nintendo Switch emulator. + +game: Emulators - RPCS3 +release: 2023-09-22 +file: /Applications/launchers/rpcs3.sh +description: RPCS3 is a multi-platform open-source Sony PlayStation 3 emulator and debugger written in C++ for Windows, Linux, macOS and FreeBSD. The purpose of this project is to accurately emulate the PlayStation 3 in its entirety with the power of reverse engineering and community collaboration. + +game: Emulators - Xemu Emulator +release: 2023-09-22 +file: /Applications/launchers/xemu.sh +description: xemu is an active fork of the XQEMU project, which is based on the very popular and highly actively maintained QEMU full system emulator project. xemu is a low-level, full-system emulator which emulates the actual hardware of the Xbox. + +game: Emulators - Xenia Canary +release: 2024-05-01 +file: /Applications/launchers/xenia.sh +description: Xenia Canary is an experimental Xbox 360 emulator for Linux, based on the Xenia project. This version is the latest Canary build for Linux, providing improved compatibility and features over the mainline version. + +game: Tools - Download Pegasus Themes +release: 2023-09-22 +file: /bin/download_pegasus_themes.sh +description: Script to automatically download various Pegasus Themes. + +game: Tools - RPCS3 Install Firmware +release: 2023-09-22 +file: /bin/Install_RPCS3_Firmware.sh +description: Install RPCS3 firmware from bios folder. Bios folder should be mounted to /bioses/. The bios file should be "PS3UPDAT.PUP" diff --git a/apps/pegasus/build-fedora/configs/cemu/settings.xml b/apps/pegasus/build-fedora/configs/cemu/settings.xml new file mode 100644 index 00000000..5d181af1 --- /dev/null +++ b/apps/pegasus/build-fedora/configs/cemu/settings.xml @@ -0,0 +1,19 @@ + + + + 1 + + + diff --git a/apps/pegasus/build-fedora/configs/dolphin/Dolphin.ini b/apps/pegasus/build-fedora/configs/dolphin/Dolphin.ini new file mode 100644 index 00000000..5b92bafe --- /dev/null +++ b/apps/pegasus/build-fedora/configs/dolphin/Dolphin.ini @@ -0,0 +1,30 @@ +[Analytics] +Enabled = True +PermissionAsked = True +[NetPlay] +TraversalChoice = direct +[Core] +AudioStretch = False +AudioStretchMaxLatency = 80 +DPL2Decoder = False +DPL2Quality = 2 +DSPHLE = True +EnableCheats = True +GFXBackend = Vulkan +[DSP] +Backend = Pulse +EnableJIT = False +[Display] +FullscreenResolution = 1920x1080 +Fullscreen = True +RenderToMain = False +RenderWindowXPos = -1 +RenderWindowYPos = -1 +RenderWindowWidth = 1920 +RenderWindowHeight = 1080 +RenderWindowAutoSize = True +KeepWindowOnTop = True +ProgressiveScan = False +PAL60 = True +DisableScreenSaver = True +ForceNTSCJ = False \ No newline at end of file diff --git a/apps/pegasus/build-fedora/configs/retroarch/retroarch.cfg b/apps/pegasus/build-fedora/configs/retroarch/retroarch.cfg new file mode 100644 index 00000000..0a131394 --- /dev/null +++ b/apps/pegasus/build-fedora/configs/retroarch/retroarch.cfg @@ -0,0 +1,12 @@ +# This is just the minimal changes we want from the default. Retroarch will +# fill in the rest the first time it runs. + +# start in fullscreen +video_fullscreen = "true" + +# don't allow quitting, at least for now, since there's not an easy way to +# restart without restarting the container +menu_show_quit_retroarch = "true" + +# Consistent with Pegasus +menu_swap_ok_cancel_buttons = "true" diff --git a/apps/pegasus/build-fedora/configs/rpcs3/CurrentSettings.ini b/apps/pegasus/build-fedora/configs/rpcs3/CurrentSettings.ini new file mode 100755 index 00000000..6a665a18 --- /dev/null +++ b/apps/pegasus/build-fedora/configs/rpcs3/CurrentSettings.ini @@ -0,0 +1,57 @@ +[Config] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3W\0\0\x2\xaf\0\0\0\0\0\0\0\0\0\0\x3W\0\0\x2\xaf\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x3W\0\0\x2\xaf) + +[Debugger] +splitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\xff\xff\xff\xff\xff\xff\xff\xff\x1\xff\xff\xff\xff\x1\0\0\0\x1\0) + +[GSFrame] +geometry=@Rect(0 0 1280 720) +screen=0 +visibility=2 + +[GameList] +hidden_list=@Invalid() +iconColor=@Variant(\0\0\0\x43\x1\xff\xff\xf0\xf0\xf0\xf0\xf0\xf0\0\0) +marginFactor=0.09 +sortAsc=true +sortCol=1 +state=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x1\x1\0\0\0\0\0\0\0\0\0\0\0\xfH\x6\0\0\0\x4\0\0\0\x6\0\0\0\0\0\0\0\t\0\0\0\0\0\0\0\n\0\0\0\0\0\0\0\x3\0\0\0\0\0\0\x5\xe1\0\0\0\xf\0\x1\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x96\xff\xff\xff\xff\0\0\0\x1\0\0\0\0\0\0\0\xf\0\0\0[\0\0\0\x1\0\0\0\x2\0\0\0\x63\0\0\0\x1\0\0\0\0\0\0\0\x63\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0o\0\0\0\x1\0\0\0\0\0\0\0z\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\xb2\0\0\0\x1\0\0\0\0\0\0\0\xd7\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x8a\0\0\0\x1\0\0\0\0\0\0\0\x8f\0\0\0\x1\0\0\0\0\0\0\0\x97\0\0\0\x1\0\0\0\0\0\0\0\x9e\0\0\0\x1\0\0\0\0\0\0\x3\xe8\x1\0\0\0\x9e\0\0\0\0) +textFactor=2 +visibility_column_category=true +visibility_column_compat=true +visibility_column_dir_size=true +visibility_column_firmware=false +visibility_column_icon=true +visibility_column_last_play=true +visibility_column_move=true +visibility_column_name=true +visibility_column_parental=false +visibility_column_path=false +visibility_column_playtime=true +visibility_column_resolution=true +visibility_column_serial=true +visibility_column_sound=false +visibility_column_version=true + +[Localization] +language=en + +[Logger] +ANSI_code=true +ERR_stack=true +level=4 +stack=true + +[Meta] +discordState= +showDebugTab=false +useRichPresence=true + +[main_window] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x5?\0\0\x2\xf3\0\0\0\0\0\0\0\0\0\0\x5?\0\0\x2\xf3\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x5?\0\0\x2\xf3) +infoBoxEnabledWelcome=false +lastExplorePathGAME=/ROMs/ps3 +lastExplorePathPUP=/bioses +mwState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x2\0\0\0\0\0\0\x5@\0\0\x2\xa6\xfc\x2\0\0\0\x2\xfb\0\0\0\x10\0g\0\x61\0m\0\x65\0l\0i\0s\0t\x1\0\0\0\0\0\0\x2\f\0\0\0Z\0\xff\xff\xff\xfb\0\0\0\f\0l\0o\0g\0g\0\x65\0r\x1\0\0\x2\x12\0\0\0\x94\0\0\0\x94\0\xff\xff\xff\0\0\0\x1\0\0\0\0\0\0\0\0\xfc\x2\0\0\0\x1\xfb\0\0\0\x10\0\x64\0\x65\0\x62\0u\0g\0g\0\x65\0r\0\0\0\0\0\xff\xff\xff\xff\0\0\0\xca\0\xff\xff\xff\0\0\0\0\0\0\x2\xa6\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0) +recentGamesNames=@ByteArray(\0\0\0\0) +windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x5@\0\0\x2\xa6\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\0\0\0\x14\0m\0w\0_\0t\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0) diff --git a/apps/pegasus/build-fedora/configs/rpcs3/config.yml b/apps/pegasus/build-fedora/configs/rpcs3/config.yml new file mode 100644 index 00000000..42ee9b2b --- /dev/null +++ b/apps/pegasus/build-fedora/configs/rpcs3/config.yml @@ -0,0 +1,33 @@ +Audio: + Renderer: Cubeb + Audio Provider: CellAudio + RSXAudio Avport: HDMI 0 + Dump to file: false + Convert to 16 bit: true + Audio Format: Stereo + Audio Formats: 0 + Audio Device: "@@@default@@@" + Master Volume: 100 + Enable Buffering: false + Desired Audio Buffer Duration: 100 + Enable Time Stretching: false + Disable Sampling Skip: false + Time Stretching Threshold: 75 + Microphone Type: "Null" + Microphone Devices: "@@@@@@@@@@@@" + Music Handler: Qt +Miscellaneous: + Automatically start games after boot: true + Exit RPCS3 when process finishes: false + Pause emulation on RPCS3 focus loss: false + Start games in fullscreen mode: true + Prevent display sleep while running games: true + Show trophy popups: true + Show shader compilation hint: true + Show PPU compilation hint: true + Use native user interface: true + GDB Server: 127.0.0.1:2345 + Silence All Logs: false + Window Title Format: "FPS: %F | %R | %V | %T [%t]" + Pause Emulation During Home Menu: false +Log: {} \ No newline at end of file diff --git a/apps/pegasus/build-fedora/configs/xemu/xemu.toml b/apps/pegasus/build-fedora/configs/xemu/xemu.toml new file mode 100644 index 00000000..6b466faa --- /dev/null +++ b/apps/pegasus/build-fedora/configs/xemu/xemu.toml @@ -0,0 +1,9 @@ +[general] +show_welcome = false + +[sys.files] +bootrom_path = '/bioses/mcpx_1.0.bin' +flashrom_path = '/bioses/Complex_4627.bin' +eeprom_path = '/home/retro/.local/share/xemu/xemu/eeprom.bin' +hdd_path = '/home/retro/.local/share/xemu/xemu/xbox_hdd.qcow2' + diff --git a/apps/pegasus/build-fedora/scripts/pegasus.sh b/apps/pegasus/build-fedora/scripts/pegasus.sh new file mode 100644 index 00000000..31704bd3 --- /dev/null +++ b/apps/pegasus/build-fedora/scripts/pegasus.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +echo "Starting pegasus-fe" + +# Seems to have issues with Wayland, let's fallback to X11 +export XDG_SESSION_TYPE=x11 +unset WAYLAND_DISPLAY +pegasus-fe \ No newline at end of file diff --git a/apps/pegasus/build-fedora/scripts/startup.sh b/apps/pegasus/build-fedora/scripts/startup.sh new file mode 100755 index 00000000..a9c4159c --- /dev/null +++ b/apps/pegasus/build-fedora/scripts/startup.sh @@ -0,0 +1,118 @@ +#!/bin/bash +set -e + +source /opt/gow/bash-lib/utils.sh +source /opt/gow/launch-comp.sh + +gow_log "Symlinking Bioses from /Bioses" +ln -sf /bioses $HOME + +######################################### +# Configure Pegasus +######################################### +PEGASUS_CFG=$HOME/.config/pegasus-frontend +gow_log "Pegasus - Configure" +mkdir -p "$PEGASUS_CFG" +gow_log "Pegasus - Copying game_dirs.txt, if not edited" +cp -u /cfg/app/game_dirs.txt "${PEGASUS_CFG}/game_dirs.txt" + +######################################### +# Configure PCSX2 +######################################### +PCSX2_CFG=$HOME/.config/PCSX2 + +gow_log "PCSX2 - Configure" +mkdir -p "$PCSX2_CFG/inis/" +cp -u /cfg/PCSX2/PCSX2.ini "${PCSX2_CFG}/inis/PCSX2.ini" + +######################################### +# Configure Dolphin +######################################### +DOLPHIN_CFG=$HOME/.config/dolphin-emu + +mkdir -p "$DOLPHIN_CFG" +gow_log "Dolphin - Copying config, if not edited" +cp -u /cfg/dolphin/Dolphin.ini "$DOLPHIN_CFG/Dolphin.ini" + +######################################### +# Configure Retroarch +######################################### +RETROARCH_CFG_DIR=$HOME/.config/retroarch + +# Copying config in case it's the first time we mount from the host +gow_log "Retroarch - Copying config, if not edited" +mkdir -p "$RETROARCH_CFG_DIR/cores/" +cp -u /cfg/retroarch/retroarch.cfg "$RETROARCH_CFG_DIR/retroarch.cfg" + +gow_log "Retroarch - Checking RA Assets presence, if none - install them" +if [ ! -d "$RETROARCH_CFG_DIR/assets" ]; then + gow_log "Retroarch - No assets found, starting install" + wget -q -P /tmp https://buildbot.libretro.com/assets/frontend/assets.zip + 7z x /tmp/assets.zip -bso0 -bse0 -bsp1 -o"$RETROARCH_CFG_DIR/assets" + rm /tmp/assets.zip +fi + +# Copy pre-installed cores from the retroarch ppa +# shellcheck disable=SC2046 +# cp -u /usr/lib/$(uname -m)-linux-gnu/libretro/* "$CFG_DIR/cores/" + +######################################### +# Configure CEMU +######################################### +CEMU_CFG_DIR=$HOME/.config/Cemu +mkdir -p ${CEMU_CFG_DIR}/ + +gow_log "CEMU - Setting default sound device and run in fullscreen, if not edited" +if ! test -f $CEMU_CFG_DIR/settings.xml; then + gow_log "Pulse sink is: ${PULSE_SINK}" + cp /cfg/cemu/settings.xml /tmp/settings_new.xml + searchString="replace_me" + replaceString="${PULSE_SINK}" + sed -i -e "s|$searchString|$replaceString|g" /tmp/settings_new.xml + searchString="replace_me" + replaceString="${PULSE_SINK}" + sed -i -e "s|$searchString|$replaceString|g" /tmp/settings_new.xml + cp /tmp/settings_new.xml $CEMU_CFG_DIR/settings.xml +fi + +######################################### +# Configure RPCS3 +######################################### +RPCS3_CFG_DIR=$HOME/.config/rpcs3 + +gow_log "RPCS3 - Copying custom config (disable Auto-Update pop-up), if not edited" +mkdir -p $RPCS3_CFG_DIR/GuiConfigs/ +cp -u /cfg/rpcs3/CurrentSettings.ini $RPCS3_CFG_DIR/GuiConfigs/CurrentSettings.ini + +gow_log "RPCS3 - Setting default sound device and run in fullscreen, if not edited" +mkdir -p $RPCS3_CFG_DIR/ +if ! test -f $RPCS3_CFG_DIR/config.yml; then + echo "File does not exist." + cp /cfg/rpcs3/config.yml /tmp/config_new.yml + searchString="Audio Device: \"@@@default@@@\"" + replaceString="Audio Device: \"${PULSE_SINK}\"" + sed -i -e "s|$searchString|$replaceString|g" /tmp/config_new.yml + # Set the date of the file back to the original date + cp /tmp/config_new.yml $RPCS3_CFG_DIR/config.yml +fi + +######################################### +# Configure XEMU +######################################### +XEMU_CFG_DIR=$HOME/.local/share/xemu +gow_log "XEMU - Copying custom config - settings, if not edited" +mkdir -p $XEMU_CFG_DIR/xemu/ +cp -u /cfg/xemu/xemu.toml $XEMU_CFG_DIR/xemu/xemu.toml +gow_log "XEMU - Copying basic hard drive (/bioses/xbox_hdd.gcow2), if present and not edited" +if [ -f "/bioses/xbox_hdd.qcow2" ]; then + cp -u /bioses/xbox_hdd.qcow2 $XEMU_CFG_DIR/xemu/xbox_hdd.qcow2 +fi + +######################################### +# Configure Xenia Canary +######################################### +XENIA_CFG_DIR=$HOME/.config/xenia-canary +mkdir -p $XENIA_CFG_DIR +# (Add more config copy/setup here if needed in the future) + +launcher /bin/pegasus.sh diff --git a/apps/pegasus/build-fedora/scripts/tools/download_pegasus_themes.sh b/apps/pegasus/build-fedora/scripts/tools/download_pegasus_themes.sh new file mode 100755 index 00000000..05ad3258 --- /dev/null +++ b/apps/pegasus/build-fedora/scripts/tools/download_pegasus_themes.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# Download themes +PEGASUS_THEMES_DIR=$HOME/.config/pegasus-frontend/themes +mkdir -p "${PEGASUS_THEMES_DIR}" + + +declare -A PEGASUS_THEMES=( \ +["bartopOS"]="https://github.com/fastpop72/bartopOS/archive/master.zip" \ +["clearOS"]="https://github.com/PlayingKarrde/clearOS/archive/master.zip" \ +["EasyLaunch"]="https://github.com/VGmove/EasyLaunch/archive/master.zip" \ +["epic-memories-theme"]="https://github.com/FrenchGithubUser/epic-memories-theme/archive/master.zip" \ +["FlixNet_Plus"]="https://github.com/ZagonAb/FlixNet_Plus/archive/master.zip" \ +["gameOS"]="https://github.com/jimbob4000/gameOS/archive/master.zip" \ +["gameOS-fire-sKye"]="https://github.com/HomeStarRunnerTron/gameOS-fire-sKye/archive/master.zip" \ +["library"]="https://github.com/Fr75s/library/archive/master.zip" \ +["Minimis"]="https://github.com/waldnercharles/Minimis/archive/master.zip" \ +["neoretro"]="https://github.com/valsou/neoretro/archive/master.zip" \ +["pegasus-theme-9999999-in-1"]="https://github.com/mmatyas/pegasus-theme-9999999-in-1/archive/master.zip" \ +["pegasus-theme-es2-simple"]="https://github.com/mmatyas/pegasus-theme-es2-simple/archive/master.zip" \ +["pegasus-theme-flixnet"]="https://github.com/mmatyas/pegasus-theme-flixnet/archive/master.zip" \ +["pegasus-theme-grid-micro"]="https://github.com/mmatyas/pegasus-theme-grid-micro/archive/master.zip" \ +["pegasus-theme-gpiOS"]="https://github.com/SinisterSpatula/pegasus-theme-gpiOS/archive/master.zip" \ +["pegasus-theme-homage"]="https://github.com/asdfgasfhsn/pegasus-theme-homage/archive/master.zip" \ +["pegasus-theme-refiOS"]="https://github.com/eleo95/pegasus-theme-refiOS/archive/master.zip" \ +["prosperoOS"]="https://github.com/PlayingKarrde/prosperoOS/archive/master.zip" \ +["retromega"]="https://github.com/djfumberger/retromega/archive/master.zip" \ +["retromega-next"]="https://github.com/plaidman/retromega-next/archive/master.zip" \ +["RP-RG351"]="https://github.com/dragoonDorise/RP-RG351/archive/master.zip" \ +["shinretro"]="https://github.com/TigraTT-Driver/shinretro/archive/master.zip" \ +) + +# ["pegasus-theme-npe"]="https://github.com/riquenunes/pegasus-theme-npe/archive/master.zip" \ +# ["revolutionmenu"]="https://github.com/travrei/revolutionmenu/archive/master.zip" \ + +# Loop through and download all the themes above +for CURR_THEME in "${!PEGASUS_THEMES[@]}" +do + THEME_NAME=$CURR_THEME + THEME_URL=${PEGASUS_THEMES[$CURR_THEME]} + if [[ ! -d ${PEGASUS_THEMES_DIR}/${THEME_NAME}-master ]] ; then + echo "Downloading Pegasus Theme: ${THEME_NAME} from ${THEME_URL}" + wget -q --show-progress ${THEME_URL} --output-document=/tmp/theme.zip + echo "Extracting" + 7z x /tmp/theme.zip -bso0 -bse0 -bsp1 -o"$PEGASUS_THEMES_DIR" + echo "Cleanup" + rm /tmp/theme.zip + fi +done diff --git a/apps/plex/_index.md b/apps/plex/_index.md new file mode 100644 index 00000000..24fb2882 --- /dev/null +++ b/apps/plex/_index.md @@ -0,0 +1,9 @@ +# Plex + +Plex HTPC — the official living-room media client for Plex. Streams movies, +TV, music, and live TV from any Plex Media Server with a 10-foot UI optimised +for gamepad and remote control. + +Plex distributes HTPC on Linux exclusively via Flathub (`tv.plex.PlexHTPC`), +so this image installs it from Flathub at build time. The runtime launches +it with `flatpak run tv.plex.PlexHTPC`. diff --git a/apps/plex/assets/wolf.config.toml b/apps/plex/assets/wolf.config.toml new file mode 100644 index 00000000..3ee30842 --- /dev/null +++ b/apps/plex/assets/wolf.config.toml @@ -0,0 +1,23 @@ +[[apps]] +title = "Plex" +icon_png_path = "https://games-on-whales.github.io/wildlife/apps/plex/assets/icon.png" + +[apps.runner] +type = "docker" +name = "WolfPlex" +image = "ghcr.io/games-on-whales/plex:edge" +mounts = [] +env = ["RUN_SWAY=1", "GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*"] +devices = [] +ports = [] +base_create_json = """ +{ + "HostConfig": { + "IpcMode": "host", + "Privileged": false, + "CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN"], + "DeviceCgroupRules": ["c 13:* rmw", "c 244:* rmw"] + } +} +\ +""" diff --git a/apps/plex/build-fedora/Dockerfile b/apps/plex/build-fedora/Dockerfile new file mode 100644 index 00000000..f9d47b63 --- /dev/null +++ b/apps/plex/build-fedora/Dockerfile @@ -0,0 +1,32 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +# Plex HTPC on Linux is only officially distributed via Flathub — Plex does +# not publish any .deb/.rpm/AppImage, and the raw tarball at artifacts.plex.tv +# is behind Cloudflare bot-management that blocks standard HTTP clients. The +# only reliable install path is therefore `flatpak install` at build time. +RUN <<_INSTALL_PLEX_HTPC +set -e + +dnf install -y flatpak xdg-desktop-portal + +# bwrap needs to be setuid inside the container runtime. +chmod u+s /usr/bin/bwrap + +flatpak remote-add --system --if-not-exists \ + flathub https://dl.flathub.org/repo/flathub.flatpakrepo + +flatpak install --system -y --noninteractive flathub tv.plex.PlexHTPC + +dnf clean all +_INSTALL_PLEX_HTPC + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/plex/build-fedora/scripts/startup.sh b/apps/plex/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..6a3544b3 --- /dev/null +++ b/apps/plex/build-fedora/scripts/startup.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +export XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/usr/local/share:/usr/share + +source /opt/gow/launch-comp.sh +launcher flatpak run --branch=stable --arch=x86_64 --command=Plex tv.plex.PlexHTPC diff --git a/apps/plex/build/Dockerfile b/apps/plex/build/Dockerfile new file mode 100644 index 00000000..b5fc5418 --- /dev/null +++ b/apps/plex/build/Dockerfile @@ -0,0 +1,37 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +ARG DEBIAN_FRONTEND=noninteractive + +# Plex HTPC on Linux is only officially distributed via Flathub — Plex does +# not publish any .deb/.rpm/AppImage, and the raw tarball at artifacts.plex.tv +# is behind Cloudflare bot-management that blocks standard HTTP clients. The +# only reliable install path is therefore `flatpak install` at build time. +RUN <<_INSTALL_PLEX_HTPC +set -e +apt-get update +apt-get install -y --no-install-recommends \ + ca-certificates flatpak xdg-desktop-portal + +# bwrap needs to be setuid inside the container runtime; other apps in this +# repo do the same thing for their flatpak flows. +chmod u+s /usr/bin/bwrap + +flatpak remote-add --system --if-not-exists \ + flathub https://dl.flathub.org/repo/flathub.flatpakrepo + +flatpak install --system -y --noninteractive flathub tv.plex.PlexHTPC + +apt-get autoremove -y +rm -rf /var/lib/apt/lists/* +_INSTALL_PLEX_HTPC + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/plex/build/scripts/startup.sh b/apps/plex/build/scripts/startup.sh new file mode 100644 index 00000000..6a3544b3 --- /dev/null +++ b/apps/plex/build/scripts/startup.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +export XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/usr/local/share:/usr/share + +source /opt/gow/launch-comp.sh +launcher flatpak run --branch=stable --arch=x86_64 --command=Plex tv.plex.PlexHTPC diff --git a/apps/prismlauncher/build-fedora/Dockerfile b/apps/prismlauncher/build-fedora/Dockerfile new file mode 100644 index 00000000..7c3bf4bd --- /dev/null +++ b/apps/prismlauncher/build-fedora/Dockerfile @@ -0,0 +1,20 @@ +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +# Install Java runtimes and PrismLauncher +# PrismLauncher is available in Fedora repos via COPR +RUN dnf install -y \ + java-21-openjdk \ + wget \ + && dnf copr enable -y g3tchoo/prismlauncher \ + && dnf install -y prismlauncher \ + && dnf clean all + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/prismlauncher/build-fedora/scripts/startup.sh b/apps/prismlauncher/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..3dc4266f --- /dev/null +++ b/apps/prismlauncher/build-fedora/scripts/startup.sh @@ -0,0 +1,18 @@ +#!/bin/bash -e + +source /opt/gow/bash-lib/utils.sh + +PrismLauncher=prismlauncher + +# Run additional startup scripts +for file in /opt/gow/startup.d/* ; do + if [ -f "$file" ] ; then + gow_log "[start] Sourcing $file" + source $file + fi +done + +gow_log "[start] Starting PrismLauncher" + +source /opt/gow/launch-comp.sh +launcher "${PrismLauncher}" diff --git a/apps/prismlauncher/build/Dockerfile b/apps/prismlauncher/build/Dockerfile index 1a7bfd2c..854a59e1 100644 --- a/apps/prismlauncher/build/Dockerfile +++ b/apps/prismlauncher/build/Dockerfile @@ -8,21 +8,32 @@ ARG REQUIRED_PACKAGES=" \ openjdk-21-jre \ openjdk-17-jre \ openjdk-8-jre \ - lsb-release \ - wget \ - gnupg2 \ " RUN apt-get update && \ apt-get install -y --no-install-recommends $REQUIRED_PACKAGES && \ - # Get PrismLauncher from updated community source (https://prismlauncher.org/download/linux/) \ - wget https://prism-launcher-for-debian.github.io/repo/prismlauncher.gpg -O /usr/share/keyrings/prismlauncher-archive-keyring.gpg && \ - echo "deb [signed-by=/usr/share/keyrings/prismlauncher-archive-keyring.gpg] https://prism-launcher-for-debian.github.io/repo $(. /etc/os-release; echo "${UBUNTU_CODENAME:-${DEBIAN_CODENAME:-${VERSION_CODENAME}}}") main" | tee /etc/apt/sources.list.d/prismlauncher.list && \ - apt update && \ - apt install -y prismlauncher && \ - # Cleanup \ - apt-get autoremove -y && \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* + +# Install PrismLauncher from official GitHub releases (portable Qt6 build). +# Avoids the community PPA which has had broken plucky packages. +RUN <<_INSTALL_PRISM +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh + +github_download "PrismLauncher/PrismLauncher" \ + ".assets[]|select(.name|contains(\"Linux-Qt6-Portable\"))|select(.name|endswith(\".tar.gz\")).browser_download_url" \ + "PrismLauncher-portable.tar.gz" + +mkdir -p /opt/prismlauncher +tar xf PrismLauncher-portable.tar.gz -C /opt/prismlauncher +rm PrismLauncher-portable.tar.gz + +chmod +x /opt/prismlauncher/PrismLauncher /opt/prismlauncher/bin/prismlauncher + +# Expose as 'prismlauncher' in PATH (startup.sh calls 'prismlauncher') +ln -sf /opt/prismlauncher/PrismLauncher /usr/local/bin/prismlauncher +_INSTALL_PRISM COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh diff --git a/apps/retroarch/build-fedora/Dockerfile b/apps/retroarch/build-fedora/Dockerfile new file mode 100644 index 00000000..afd04ee0 --- /dev/null +++ b/apps/retroarch/build-fedora/Dockerfile @@ -0,0 +1,23 @@ +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +# Install RPM Fusion for retroarch +RUN dnf install -y \ + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \ + dnf install -y \ + retroarch \ + p7zip \ + mesa-libGLU \ + libaio \ + && dnf clean all + +COPY configs/retroarch.cfg /cfg/retroarch.cfg +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/retroarch/build-fedora/configs/retroarch.cfg b/apps/retroarch/build-fedora/configs/retroarch.cfg new file mode 100644 index 00000000..c0b11677 --- /dev/null +++ b/apps/retroarch/build-fedora/configs/retroarch.cfg @@ -0,0 +1,9 @@ +# This is just the minimal changes we want from the default. Retroarch will +# fill in the rest the first time it runs. + +# start in fullscreen +video_fullscreen = "true" + +# don't allow quitting, at least for now, since there's not an easy way to +# restart without restarting the container +menu_show_quit_retroarch = "false" diff --git a/apps/retroarch/build-fedora/scripts/startup.sh b/apps/retroarch/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..1d58b165 --- /dev/null +++ b/apps/retroarch/build-fedora/scripts/startup.sh @@ -0,0 +1,36 @@ +#!/bin/bash +set -e + +source /opt/gow/bash-lib/utils.sh + +gow_log "Starting RetroArch" + +CFG_DIR=$HOME/.config/retroarch + +# Copying config in case it's the first time we mount from the host +mkdir -p "$CFG_DIR/cores/" + +cp -u /cfg/retroarch.cfg "$CFG_DIR/retroarch.cfg" + +# Copy pre-installed cores from the retroarch ppa +# shellcheck disable=SC2046 +# cp -u /usr/lib/$(uname -m)-linux-gnu/libretro/* "$CFG_DIR/cores/" + +# if there are no assets, manually download them +if [ ! -d "$CFG_DIR/assets" ]; then + gow_log "Missing assets, downloading..." + wget -q --show-progress -P /tmp https://buildbot.libretro.com/assets/frontend/assets.zip + 7z x /tmp/assets.zip -bso0 -bse0 -bsp1 -o"$CFG_DIR/assets" + rm /tmp/assets.zip +fi + +# Add the base autoconfig profile so that it'll pickup joypads automatically +if [ ! -d "$CFG_DIR/autoconfig" ]; then + gow_log "Missing autoconfig, downloading..." + wget -q --show-progress -P /tmp https://buildbot.libretro.com/assets/frontend/autoconfig.zip + 7z x /tmp/autoconfig.zip -bso0 -bse0 -bsp1 -o"$CFG_DIR/autoconfig" + rm /tmp/autoconfig.zip +fi + +source /opt/gow/launch-comp.sh +launcher /usr/bin/retroarch diff --git a/apps/steam/build-fedora/Dockerfile b/apps/steam/build-fedora/Dockerfile new file mode 100644 index 00000000..f046cdea --- /dev/null +++ b/apps/steam/build-fedora/Dockerfile @@ -0,0 +1,62 @@ +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +###################################### +# The issue here is, that you don't want to give privileged, +# but bwrap needs CAP_SYS_ADMIN. +# However if you explicitly give CAP_SYS_ADMIN, bwrap throws an error, +# because it detects that capabilities have been tempered with +FROM ${BASE_APP_IMAGE} AS bwrap-builder + +WORKDIR /root +COPY ignore_capabilities.patch /root/ +RUN dnf install -y git meson ca-certificates dpkg-dev && \ + git clone https://github.com/containers/bubblewrap && \ + cd bubblewrap && \ + ./ci/builddeps.sh && \ + patch -p1 < ../ignore_capabilities.patch && \ + meson _builddir && \ + meson compile -C _builddir + +###################################### + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +RUN <<_INSTALL_STEAM +#!/bin/bash +set -e + +# Taken from https://docs.fedoraproject.org/en-US/gaming/proton/ +dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y +dnf config-manager setopt fedora-cisco-openh264.enabled=1 + +# Install Steam +dnf install -y steam + +# Additional packages +dnf install -y NetworkManager bluez ibus pkexec file pciutils lsb-release + +# Cleanup +# We'll be using a custom steam startup script, the default `steam` script that comes from Fedora was failing +rm $(which steam) +dnf clean all +_INSTALL_STEAM + +# create symlink for improved decky loader compatibility +RUN ln -sf "$HOME" /home/deck + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh +COPY --chmod=777 scripts/system-services.sh /etc/cont-init.d/system-services.sh +COPY --chmod=777 steamos-update /usr/bin/steamos-update +COPY --chmod=777 steamos-update /usr/bin/steamos-polkit-helpers/steamos-update +COPY --chmod=777 steamos-session-select /usr/bin/steamos-session-select +COPY --chmod=777 jupiter-biosupdate /usr/bin/jupiter-biosupdate +COPY --chmod=777 jupiter-biosupdate /usr/bin/steamos-polkit-helpers/jupiter-biosupdate +COPY --chmod=777 scripts/steamos-dbus-watchdog.sh /usr/local/bin/steamos-dbus-watchdog.sh +COPY --chmod=777 scripts/steam.sh /usr/games/steam +COPY --from=bwrap-builder --chmod=755 /root/bubblewrap/_builddir/bwrap /usr/bin/bwrap + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/steam/build-fedora/ignore_capabilities.patch b/apps/steam/build-fedora/ignore_capabilities.patch new file mode 100644 index 00000000..66fb9aba --- /dev/null +++ b/apps/steam/build-fedora/ignore_capabilities.patch @@ -0,0 +1,18 @@ +diff --git a/bubblewrap.c b/bubblewrap.c +index 8322ea0..4e20262 100644 +--- a/bubblewrap.c ++++ b/bubblewrap.c +@@ -868,13 +868,6 @@ acquire_privs (void) + /* Keep only the required capabilities for setup */ + set_required_caps (); + } +- else if (real_uid != 0 && has_caps ()) +- { +- /* We have some capabilities in the non-setuid case, which should not happen. +- Probably caused by the binary being setcap instead of setuid which we +- don't support anymore */ +- die ("Unexpected capabilities but not setuid, old file caps config?"); +- } + else if (real_uid == 0) + { + /* If our uid is 0, default to inheriting all caps; the caller \ No newline at end of file diff --git a/apps/steam/build-fedora/jupiter-biosupdate b/apps/steam/build-fedora/jupiter-biosupdate new file mode 100755 index 00000000..ca916d09 --- /dev/null +++ b/apps/steam/build-fedora/jupiter-biosupdate @@ -0,0 +1 @@ +exit 0 diff --git a/apps/steam/build-fedora/scripts/startup.sh b/apps/steam/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..a75ada1d --- /dev/null +++ b/apps/steam/build-fedora/scripts/startup.sh @@ -0,0 +1,139 @@ +#!/bin/bash +set -e + +source /opt/gow/bash-lib/utils.sh + +gow_log "Steam startup.sh" + +# Recursively creating Steam necessary folders (https://github.com/ValveSoftware/steam-for-linux/issues/6492) +mkdir -p "$HOME/.local/share/Steam/ubuntu12_32/steam-runtime" +export WINEPREFIX="$HOME/.local/share/WolfSteam/pfx" +export STEAM_COMPAT_DATA_PATH="$WINEPREFIX" + +# Use the new big picture mode by default +STEAM_STARTUP_FLAGS=${STEAM_STARTUP_FLAGS:-"-bigpicture"} + +# Some game fixes taken from the Steam Deck +export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 + +# Enable Mangoapp +# Note: Ubuntus Mangoapp doesn't support Presets, so disable this for now +#export STEAM_MANGOAPP_PRESETS_SUPPORTED=1 +export STEAM_USE_MANGOAPP=1 +export MANGOHUD_CONFIGFILE=$(mktemp /tmp/mangohud.XXXXXXXX) +# Enable horizontal mangoapp bar +export STEAM_MANGOAPP_HORIZONTAL_SUPPORTED=1 + +# Enable Variable Rate Shading +# Note: this only works on gallium drivers and with new enough mesa +# unfortunately there is no good way to check and disable this flag otherwise +export STEAM_USE_DYNAMIC_VRS=1 +export RADV_FORCE_VRS_CONFIG_FILE=$(mktemp /tmp/radv_vrs.XXXXXXXX) +# To expose vram info from radv +export WINEDLLOVERRIDES=dxgi=n + +# Initially write no_display to our config file +# so we don't get mangoapp showing up before Steam initializes +# on OOBE and stuff. +mkdir -p "$(dirname "$MANGOHUD_CONFIGFILE")" +echo "position=top-right" > "$MANGOHUD_CONFIGFILE" +echo "no_display" >> "$MANGOHUD_CONFIGFILE" + +# Prepare our initial VRS config file +# for dynamic VRS in Mesa. +mkdir -p "$(dirname "$RADV_FORCE_VRS_CONFIG_FILE")" +# By default don't do half shading +echo "1x1" > "$RADV_FORCE_VRS_CONFIG_FILE" + + +# Scaling support +export STEAM_GAMESCOPE_FANCY_SCALING_SUPPORT=1 + +# Have SteamRT's xdg-open send http:// and https:// URLs to Steam +export SRT_URLOPEN_PREFER_STEAM=1 + +# Set input method modules for Qt/GTK that will show the Steam keyboard +export QT_IM_MODULE=steam +export GTK_IM_MODULE=Steam + + +if [ -n "$RUN_GAMESCOPE" ]; then + # Enable support for xwayland isolation per-game in Steam + # Note: This breaks without the additional steamdeck flags + #export STEAM_MULTIPLE_XWAYLANDS=1 + #STEAM_STARTUP_FLAGS="${STEAM_STARTUP_FLAGS} -steamos3 -steamdeck -steampal" + + # We no longer need to set GAMESCOPE_EXTERNAL_OVERLAY from steam, mangoapp now does it itself + export STEAM_DISABLE_MANGOAPP_ATOM_WORKAROUND=1 + + # Setup socket for gamescope statistics shown in mango and steam + # Create run directory file for startup and stats sockets + tmpdir="$([[ -n ${XDG_RUNTIME_DIR+x} ]] && mktemp -p "$XDG_RUNTIME_DIR" -d -t gamescope.XXXXXXX)" + socket="${tmpdir:+$tmpdir/startup.socket}" + stats="${tmpdir:+$tmpdir/stats.pipe}" + # Fail early if we don't have a proper runtime directory setup + if [[ -z $tmpdir || -z ${XDG_RUNTIME_DIR+x} ]]; then + echo >&2 "!! Failed to find run directory in which to create stats session sockets (is \$XDG_RUNTIME_DIR set?)" + exit 0 + fi + + export GAMESCOPE_STATS="$stats" + mkfifo -- "$stats" + mkfifo -- "$socket" + + # Attempt to claim global session if we're the first one running (e.g. /run/1000/gamescope) + linkname="gamescope-stats" + # shellcheck disable=SC2031 # (broken warning) + sessionlink="${XDG_RUNTIME_DIR:+$XDG_RUNTIME_DIR/}${linkname}" # Account for XDG_RUNTIME_DIR="" (notfragileatall) + lockfile="$sessionlink".lck + exec 9>"$lockfile" # Keep as an fd such that the lock lasts as long as the session if it is taken + if flock -n 9 && rm -f "$sessionlink" && ln -sf "$tmpdir" "$sessionlink"; then + # Took the lock. Don't blow up if those commands fail, though. + echo >&2 "Claimed global gamescope stats session at \"$sessionlink\"" + else + echo >&2 "!! Failed to claim global gamescope stats session" + fi + + GAMESCOPE_WIDTH=${GAMESCOPE_WIDTH:-1920} + GAMESCOPE_HEIGHT=${GAMESCOPE_HEIGHT:-1080} + GAMESCOPE_REFRESH=${GAMESCOPE_REFRESH:-60} + GAMESCOPE_MODE=${GAMESCOPE_MODE:-"-b"} + + # shellcheck disable=SC2086 + gamescope -e ${GAMESCOPE_MODE} -R $socket -T $stats -W "${GAMESCOPE_WIDTH}" -H "${GAMESCOPE_HEIGHT}" -r "${GAMESCOPE_REFRESH}" & + + # Read the variables we need from the socket + if read -r -t 3 response_x_display response_wl_display <> "$socket"; then + export DISPLAY="$response_x_display" + export GAMESCOPE_WAYLAND_DISPLAY="$response_wl_display" + unset WAYLAND_DISPLAY + # We're done! + else + echo "gamescope failed" + exit 1 + fi + + # Start IBus to enable showing the steam on-screen keyboard + /usr/bin/ibus-daemon -d -r --panel=disable --emoji-extension=disable + # Launch mango + mangoapp & + + # Start Steam + # shellcheck disable=SC2086 + dbus-run-session -- steam ${STEAM_STARTUP_FLAGS} + +elif [ -n "$RUN_SWAY" ]; then + # Start IBus to enable showing the steam on-screen keyboard + /usr/bin/ibus-daemon -d -r --panel=disable --emoji-extension=disable + + # Enable MangoHud for all vulkan (including Proton) games + # unless the user has explicitly disabled it in config. + export MANGOHUD=${MANGOHUD:-1} + + # Start Steam + source /opt/gow/launch-comp.sh + launcher steam ${STEAM_STARTUP_FLAGS} +else + # shellcheck disable=SC2086 + exec steam ${STEAM_STARTUP_FLAGS} +fi diff --git a/apps/steam/build-fedora/scripts/steam.sh b/apps/steam/build-fedora/scripts/steam.sh new file mode 100644 index 00000000..871159f1 --- /dev/null +++ b/apps/steam/build-fedora/scripts/steam.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Custom steam startup script, the default `steam` script that comes from Fedora was failing + +STEAMDIR="${HOME}/.local/share/Steam" +STEAMDIR_LEGACY="${HOME}/.steam/steam" +echo "Steam directory: $STEAMDIR" + +if [[ ! -f "$STEAMDIR/steam.sh" ]]; then + mkdir -p "$STEAMDIR" + cd "$STEAMDIR" + tar xJf /usr/lib/steam/bootstraplinux_ubuntu12_32.tar.xz + mkdir -p "$STEAMDIR_LEGACY" + ln -fns "$STEAMDIR" "$STEAMDIR_LEGACY" +fi + + +cd "$STEAMDIR" + +while true; do + echo "Steam arguments received: $@" + ./steam.sh "$@" + EXIT_CODE=$? + + # Exit code 0 means clean shutdown (user quit) + # Exit codes like 42 or other non-zero often mean "restart me" + if [[ $EXIT_CODE -eq 0 ]]; then + echo "Steam exited cleanly" + break + fi + + echo "Steam exited with code $EXIT_CODE, restarting in 2 seconds..." + sleep 2 +done \ No newline at end of file diff --git a/apps/steam/build-fedora/scripts/steamos-dbus-watchdog.sh b/apps/steam/build-fedora/scripts/steamos-dbus-watchdog.sh new file mode 100644 index 00000000..5e3cebc4 --- /dev/null +++ b/apps/steam/build-fedora/scripts/steamos-dbus-watchdog.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +source /opt/gow/bash-lib/utils.sh + +function shutdown_steam() { + gow_log "[steamos-dbus-watchdog] Shutting down Steam..." + "$HOME/.local/share/Steam/steam.sh" -shutdown + exit 0 +} + +gow_log "[steamos-dbus-watchdog] Starting D-Bus watcher for Steam shutdown..." +dbus-monitor --system "interface='org.freedesktop.login1.Manager'" | \ +while read -r line; do + if echo "$line" | grep -q "member=PowerOff"; then + gow_log "[steamos-dbus-watchdog] Detected 'PowerOff' D-Bus call!" + shutdown_steam + fi + + if echo "$line" | grep -q "member=Reboot"; then + gow_log "[steamos-dbus-watchdog] Detected 'Reboot' D-Bus call!" + shutdown_steam + fi + + if echo "$line" | grep -q "member=Suspend"; then + gow_log "[steamos-dbus-watchdog] Detected 'Suspend' D-Bus call!" + shutdown_steam + fi +done diff --git a/apps/steam/build-fedora/scripts/system-services.sh b/apps/steam/build-fedora/scripts/system-services.sh new file mode 100644 index 00000000..7daccb60 --- /dev/null +++ b/apps/steam/build-fedora/scripts/system-services.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +source /opt/gow/bash-lib/utils.sh + +# Steam Big Picture First time setup needs a couple of services + +mkdir -p /run/dbus +dbus-daemon --system --fork --nosyslog +gow_log "*** DBus started ***" +bluetoothd --nodetach & +gow_log "*** Bluez started ***" +NetworkManager +gow_log "*** NetworkManager started ***" +# Watchdog will stop steam when selecting Turn off, Suspend or Restart from the Steam power menu +steamos-dbus-watchdog.sh & +gow_log "*** D-Bus Watchdog started ***" + +STEAMDIR="${HOME}/.local/share/Steam" +STEAMDIR_LEGACY="${HOME}/.steam/steam" + +# Install Decky Loader +if [ ! -f "$HOME/homebrew/services/PluginLoader" ]; then + gow_log "Installing Decky Loader" + mkdir -p "$STEAMDIR" + touch "$STEAMDIR/.cef-enable-remote-debugging" + ln -fs --no-target-directory "$STEAMDIR/compatibilitytools.d" "$STEAMDIR_LEGACY/compatibilitytools.d" + ln -fs --no-target-directory "$STEAMDIR_LEGACY/steamapps" "$STEAMDIR/steamapps" + echo "Steam directory: $STEAMDIR" + mkdir -p "$HOME/homebrew/services/" + github_download "SteamDeckHomebrew/decky-loader" ".assets[]|select(.name|(\"PluginLoader\")).browser_download_url" "PluginLoader" + chmod +x PluginLoader + mv PluginLoader "$HOME/homebrew/services" +fi + +# Start Decky Loader +gow_log "*** Decky Loader started ***" +$HOME/homebrew/services/PluginLoader & + +disown diff --git a/apps/steam/build-fedora/steamos-session-select b/apps/steam/build-fedora/steamos-session-select new file mode 100644 index 00000000..cd4418b9 --- /dev/null +++ b/apps/steam/build-fedora/steamos-session-select @@ -0,0 +1,3 @@ +#!/bin/bash +# see https://github.com/games-on-whales/gow/pull/187 +steam -shutdown \ No newline at end of file diff --git a/apps/steam/build-fedora/steamos-update b/apps/steam/build-fedora/steamos-update new file mode 100755 index 00000000..684c636e --- /dev/null +++ b/apps/steam/build-fedora/steamos-update @@ -0,0 +1 @@ +exit 7 diff --git a/apps/steam/build/Dockerfile b/apps/steam/build/Dockerfile index 8b64ba17..e9e7f5a6 100644 --- a/apps/steam/build/Dockerfile +++ b/apps/steam/build/Dockerfile @@ -5,9 +5,9 @@ ARG BASE_APP_IMAGE # but bwrap needs CAP_SYS_ADMIN. # However if you explicitly give CAP_SYS_ADMIN, bwrap throws an error, # because it detects that capabilities have been tempered with -FROM ubuntu:25.04 AS bwrap-builder +FROM ${BASE_APP_IMAGE} AS bwrap-builder -ENV DEBIAN_FRONTEND=non-interactive +ENV DEBIAN_FRONTEND=noninteractive WORKDIR /root COPY ignore_capabilities.patch /root/ RUN apt-get update -y && \ diff --git a/apps/xfce/build-fedora/Dockerfile b/apps/xfce/build-fedora/Dockerfile new file mode 100644 index 00000000..2a74bbe9 --- /dev/null +++ b/apps/xfce/build-fedora/Dockerfile @@ -0,0 +1,54 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +RUN dnf install -y \ + # Core \ + wget \ + dbus-x11 \ + flatpak \ + sudo \ + # Desktop environment \ + @xfce-desktop-environment \ + xfce4-settings \ + papirus-icon-theme arc-theme \ + at-spi2-core \ + # Additional apps \ + xfce4-terminal \ + xfce4-taskmanager \ + xfce4-whiskermenu-plugin \ + xfce4-docklike-plugin \ + xarchiver \ + mousepad \ + zip unzip p7zip \ + gnome-software \ + # Browser \ + firefox \ + && { dnf remove -y foot 2>/dev/null || true; } \ + && dnf clean all + +# Remove xscreensaver autostart if present +RUN rm -f /etc/xdg/autostart/xscreensaver.desktop + +# Replace launch scripts +COPY --chmod=777 scripts/launch-comp.sh scripts/startup.sh /opt/gow/ +COPY --chmod=777 scripts/startdbus.sh /opt/gow/startdbus + +# Include default xfce config +COPY --chmod=777 --chown=retro:retro scripts/xfce4 /opt/gow/xfce4 + +# Fix locales +COPY scripts/locale /etc/default/locale + +# Allow anyone to start dbus without password +RUN echo -e "\nALL ALL=NOPASSWD: /opt/gow/startdbus" >> /etc/sudoers + +# Fix bwrap perms for flatpaks +RUN chmod u+s /usr/bin/bwrap + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/xfce/build-fedora/scripts/launch-comp.sh b/apps/xfce/build-fedora/scripts/launch-comp.sh new file mode 100644 index 00000000..a52a4b05 --- /dev/null +++ b/apps/xfce/build-fedora/scripts/launch-comp.sh @@ -0,0 +1,50 @@ +#!/bin/bash +set -e + +source /opt/gow/bash-lib/utils.sh + +function launcher() { + export XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/home/retro/.local/share/flatpak/exports/share:/usr/local/share/:/usr/share/ + + if [ ! -d "$HOME/.config/xfce4" ]; then + # set default config + mkdir -p $HOME/.config/xfce4 + cp -r /opt/gow/xfce4/* $HOME/.config/xfce4/ + + # add flathub repo (skip if flatpak is not installed in this image) + if command -v flatpak >/dev/null 2>&1; then + flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo + # XFCE4 will only run in X11 so we have to disable wayland + flatpak override --user --nosocket=wayland + else + gow_log "[start] flatpak not installed, skipping flathub setup" + fi + + # Create commun folders + mkdir ~/Desktop ~/Documents ~/Downloads ~/Music ~/Pictures ~/Public ~/Templates ~/Videos + chmod 755 ~/Desktop ~/Documents ~/Downloads ~/Music ~/Pictures ~/Public ~/Templates ~/Videos + fi + + # + # Launch DBUS + sudo /opt/gow/startdbus + + export DESKTOP_SESSION=xfce + export XDG_CURRENT_DESKTOP=XFCE + export XDG_SESSION_TYPE="x11" + export _JAVA_AWT_WM_NONREPARENTING=1 + export GDK_BACKEND=x11 + export MOZ_ENABLE_WAYLAND=0 + export QT_QPA_PLATFORM="xcb" + export QT_AUTO_SCREEN_SCALE_FACTOR=1 + export QT_ENABLE_HIGHDPI_SCALING=1 + export DISPLAY=:0 + export $(dbus-launch) + export REAL_WAYLAND_DISPLAY=$WAYLAND_DISPLAY + export GTK_THEME=Arc-Dark:dark + unset WAYLAND_DISPLAY + + # + # Start Xwayland and xfce4 + dbus-run-session -- bash -E -c "WAYLAND_DISPLAY=\$REAL_WAYLAND_DISPLAY Xwayland :0 & sleep 2 && startxfce4" +} diff --git a/apps/xfce/build-fedora/scripts/locale b/apps/xfce/build-fedora/scripts/locale new file mode 100644 index 00000000..77b6771d --- /dev/null +++ b/apps/xfce/build-fedora/scripts/locale @@ -0,0 +1,2 @@ +LANG=en_US.UTF-8 +LC_ALL=en_US.UTF-8 diff --git a/apps/xfce/build-fedora/scripts/startdbus.sh b/apps/xfce/build-fedora/scripts/startdbus.sh new file mode 100644 index 00000000..5082611a --- /dev/null +++ b/apps/xfce/build-fedora/scripts/startdbus.sh @@ -0,0 +1,3 @@ +#!/bin/bash +mkdir -p /var/run/dbus +dbus-daemon --system --fork --nosyslog diff --git a/apps/xfce/build-fedora/scripts/startup.sh b/apps/xfce/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..4fbcb050 --- /dev/null +++ b/apps/xfce/build-fedora/scripts/startup.sh @@ -0,0 +1,16 @@ +#!/bin/bash -e + +source /opt/gow/bash-lib/utils.sh + +# Run additional startup scripts +for file in /opt/gow/startup.d/* ; do + if [ -f "$file" ] ; then + gow_log "[start] Sourcing $file" + source $file + fi +done + +gow_log "[start] Starting XFCE" + +source /opt/gow/launch-comp.sh +launcher diff --git a/apps/xfce/build-fedora/scripts/xfce4/panel/docklike-7.rc b/apps/xfce/build-fedora/scripts/xfce4/panel/docklike-7.rc new file mode 100644 index 00000000..6f54515b --- /dev/null +++ b/apps/xfce/build-fedora/scripts/xfce4/panel/docklike-7.rc @@ -0,0 +1,2 @@ +[user] +pinned=/usr/share/applications/firefox.desktop;/usr/share/applications/thunar.desktop; diff --git a/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml b/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml new file mode 100644 index 00000000..1a368339 --- /dev/null +++ b/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml new file mode 100644 index 00000000..53d0a1ff --- /dev/null +++ b/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml b/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml new file mode 100644 index 00000000..6423844a --- /dev/null +++ b/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml b/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml new file mode 100644 index 00000000..7621db20 --- /dev/null +++ b/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml b/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml new file mode 100644 index 00000000..a793c10f --- /dev/null +++ b/apps/xfce/build-fedora/scripts/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/youtube/_index.md b/apps/youtube/_index.md new file mode 100644 index 00000000..377c72cc --- /dev/null +++ b/apps/youtube/_index.md @@ -0,0 +1,9 @@ +# YouTube (ad-free) + +[FreeTube](https://freetubeapp.io/) is an open-source desktop YouTube client +that plays videos without ads, tracking, or a Google account. It uses the +[Invidious](https://invidious.io/) and [Local API](https://github.com/TeamPiped/piped) +back-ends so no requests go to YouTube directly. + +This image installs the upstream FreeTube Electron build from its GitHub +releases and launches it full-screen on top of Sway. diff --git a/apps/youtube/assets/wolf.config.toml b/apps/youtube/assets/wolf.config.toml new file mode 100644 index 00000000..da3b96d0 --- /dev/null +++ b/apps/youtube/assets/wolf.config.toml @@ -0,0 +1,23 @@ +[[apps]] +title = "YouTube" +icon_png_path = "https://games-on-whales.github.io/wildlife/apps/youtube/assets/icon.png" + +[apps.runner] +type = "docker" +name = "WolfYouTube" +image = "ghcr.io/games-on-whales/youtube:edge" +mounts = [] +env = ["RUN_SWAY=1", "GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*"] +devices = [] +ports = [] +base_create_json = """ +{ + "HostConfig": { + "IpcMode": "host", + "Privileged": false, + "CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN"], + "DeviceCgroupRules": ["c 13:* rmw", "c 244:* rmw"] + } +} +\ +""" diff --git a/apps/youtube/build-fedora/Dockerfile b/apps/youtube/build-fedora/Dockerfile new file mode 100644 index 00000000..62ac76b9 --- /dev/null +++ b/apps/youtube/build-fedora/Dockerfile @@ -0,0 +1,51 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +RUN <<_INSTALL_FREETUBE +set -e + +dnf install -y \ + nss \ + libXScrnSaver \ + alsa-lib \ + mesa-libgbm \ + gtk3 \ + libsecret \ + libnotify \ + at-spi2-core \ + libdrm \ + libxkbcommon \ + libXcomposite \ + libXdamage \ + libXrandr \ + libxshmfence \ + cups-libs \ + xdg-utils \ + curl \ + jq + +URL=$(curl -fsSL "https://api.github.com/repos/FreeTubeApp/FreeTube/releases?per_page=1" \ + | jq -r '.[0].assets[] | select(.name | test("amd64\\.rpm$")) | .browser_download_url' \ + | head -n1) + +if [ -z "$URL" ] || [ "$URL" = "null" ]; then + echo "Failed to resolve FreeTube .rpm download URL" >&2 + exit 1 +fi + +curl -fsSL -o /tmp/freetube.rpm "$URL" +dnf install -y /tmp/freetube.rpm +rm -f /tmp/freetube.rpm + +dnf clean all +_INSTALL_FREETUBE + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/youtube/build-fedora/scripts/startup.sh b/apps/youtube/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..58d97933 --- /dev/null +++ b/apps/youtube/build-fedora/scripts/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source /opt/gow/launch-comp.sh +launcher /usr/bin/freetube --no-sandbox diff --git a/apps/youtube/build/Dockerfile b/apps/youtube/build/Dockerfile new file mode 100644 index 00000000..48a9f4b9 --- /dev/null +++ b/apps/youtube/build/Dockerfile @@ -0,0 +1,55 @@ +# syntax=docker/dockerfile:1.4 +ARG BASE_APP_IMAGE + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +ARG DEBIAN_FRONTEND=noninteractive +ARG REQUIRED_PACKAGES=" \ + libnss3 \ + libxss1 \ + libasound2t64 \ + libgbm1 \ + libgtk-3-0 \ + libsecret-1-0 \ + libnotify4 \ + libatspi2.0-0 \ + libdrm2 \ + libxkbcommon0 \ + libxcomposite1 \ + libxdamage1 \ + libxrandr2 \ + libx11-xcb1 \ + libxshmfence1 \ + libcups2 \ + xdg-utils \ + " + +RUN <<_INSTALL_FREETUBE +set -e +apt-get update +apt-get install -y --no-install-recommends $REQUIRED_PACKAGES ca-certificates curl jq + +URL=$(curl -fsSL "https://api.github.com/repos/FreeTubeApp/FreeTube/releases?per_page=1" \ + | jq -r '.[0].assets[] | select(.name | test("amd64\\.deb$")) | .browser_download_url' \ + | head -n1) + +if [ -z "$URL" ] || [ "$URL" = "null" ]; then + echo "Failed to resolve FreeTube .deb download URL" >&2 + exit 1 +fi + +curl -fsSL -o /tmp/freetube.deb "$URL" +apt-get install -y /tmp/freetube.deb +rm -f /tmp/freetube.deb + +apt-get autoremove -y +rm -rf /var/lib/apt/lists/* +_INSTALL_FREETUBE + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh + +ENV XDG_RUNTIME_DIR=/tmp/.X11-unix + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/apps/youtube/build/scripts/startup.sh b/apps/youtube/build/scripts/startup.sh new file mode 100644 index 00000000..58d97933 --- /dev/null +++ b/apps/youtube/build/scripts/startup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source /opt/gow/launch-comp.sh +launcher /usr/bin/freetube --no-sandbox diff --git a/images/base-app/build-fedora/Dockerfile b/images/base-app/build-fedora/Dockerfile new file mode 100644 index 00000000..68dfee0a --- /dev/null +++ b/images/base-app/build-fedora/Dockerfile @@ -0,0 +1,70 @@ +ARG BASE_IMAGE=ghcr.io/games-on-whales/base:fedora +################################# +FROM ${BASE_IMAGE} AS sdl-jstest-builder + +WORKDIR / + +ARG SDL_JS_TEST_VERSION=8a84a47209f96eb3994cf9f906ae072e828886bb +ENV SDL_JS_TEST_VERSION=${SDL_JS_TEST_VERSION} +RUN <<_BUILD_SDL_JSTEST + set -e + + dnf -y install \ + automake \ + gcc \ + gcc-c++ \ + cmake \ + sdl2-compat-devel \ + ncurses-devel \ + git + + git clone https://github.com/games-on-whales/sdl-jstest + cd sdl-jstest + git checkout ${SDL_JS_TEST_VERSION} + git submodule init + git submodule update + mkdir build + cd build + cmake .. -DBUILD_SDL_JSTEST=OFF -DBUILD_SDL2_JSTEST=ON + make + +_BUILD_SDL_JSTEST + +################################# +FROM ${BASE_IMAGE} + +ARG GAMESCOPE_VERSION="3.16.22" +ENV GAMESCOPE_VERSION=$GAMESCOPE_VERSION + +ARG PKGS_ROOT=/opt/gow + +ARG REQUIRED_PACKAGES="\ + mesa-dri-drivers mesa-vulkan-drivers mesa-va-drivers mesa-libgbm mesa-libGL mesa-libEGL \ + egl-gbm \ + gamescope \ + sway \ + xorg-x11-server-Xwayland kitty nano \ + waybar default-fonts xdg-desktop-portal xdg-desktop-portal-gtk psmisc \ + mangohud \ + sdl2-compat ncurses \ + dbus-daemon \ + " + +RUN dnf install -y $REQUIRED_PACKAGES && \ + dnf clean all + +COPY configs /cfg + +COPY --chmod=777 scripts/init-gamescope.sh /etc/cont-init.d/init-gamescope.sh +COPY --chmod=777 scripts/launch-comp.sh /opt/gow/launch-comp.sh +COPY --chmod=777 scripts/startup.sh /opt/gow/startup.sh +COPY --from=sdl-jstest-builder /sdl-jstest/build/sdl2-jstest /usr/local/bin/sdl2-jstest + +# Fix Sway cap_sys_nice=ep +RUN setcap -r /usr/sbin/sway + +# Add /usr/games/ to $PATH in order to be able to run gamescope +ENV PATH="/usr/games/:${PATH}" + +# Configure the default directory to be the 'retro' users home directory +WORKDIR ${HOME} diff --git a/images/base-app/build-fedora/configs/sway/config b/images/base-app/build-fedora/configs/sway/config new file mode 100644 index 00000000..30c1d07c --- /dev/null +++ b/images/base-app/build-fedora/configs/sway/config @@ -0,0 +1,114 @@ +# Users can easily add custom configuration in the home folder +include /home/retro/.config/sway/custom-cfg + +### Variables +# +# Logo key. Use Mod1 for Alt. +set $mod Mod1 +# Home row direction keys, like vim +set $left h +set $down j +set $up k +set $right l +# Your preferred terminal emulator +set $term foot +# Your preferred application launcher +# Note: pass the final command to swaymsg so that the resulting window can be opened +# on the original workspace that the command was run on. +set $menu dmenu_path | dmenu | xargs swaymsg exec -- + +include /etc/sway/config-vars.d/* + +### Output configuration +# +# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) +# output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill +# +# Example configuration: +# +# output HDMI-A-1 resolution 1920x1080 position 1920,0 +# +# You can get the names of your outputs by running: swaymsg -t get_outputs + +### Key bindings +# +# Basics: +# + # Start a terminal + bindsym $mod+Return exec kitty + + # Kill focused window + # Cemu doesn't have a close button on some of its menus (sway doesn't support those button types yet) + bindsym $mod+Shift+q kill + bindsym Alt+F4 kill + + # Start your launcher + # bindsym $mod+d exec $menu + + # Drag floating windows by holding down $mod and left mouse button. + # Resize them with right mouse button + $mod. + # Despite the name, also works for non-floating windows. + # Change normal to inverse to use left mouse button for resizing and right + # mouse button for dragging. + floating_modifier $mod normal + + # Reload the configuration file + bindsym $mod+Shift+c reload + + # Exit sway (logs you out of your Wayland session) + bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' + +# Resizing containers: +# +mode "resize" { + # left will shrink the containers width + # right will grow the containers width + # up will shrink the containers height + # down will grow the containers height + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + # Ditto, with arrow keys + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} +# bindsym $mod+r mode "resize" + +include /etc/sway/config.d/* + +# Font, borders, and gaps + gaps inner 4 + gaps outer -4 + gaps top -2 + gaps bottom 0 + default_border pixel 2 + default_floating_border pixel 2 + +# Colours + client.background n/a #434c5e n/a + client.focused #4C566A #434c5e #eceff4 #434c5e #434c5e + client.focused_inactive #3b4252 #3b4252 #eceff4 #3b4252 #3b4252 + client.unfocused #3b4252 #3b4252 #eceff4 #3b4252 #3b4252 + client.urgent #4C566A #434c5e #eceff4 #434c5e #434c5e + +bar swaybar_command waybar + +# App fixes +# You can get more info about windows at runtime with `swaymsg -t get_tree` +# Steam big picture fix (force windowing mode) +for_window [class="steam"] fullscreen disabled +# Force steam games in fullscreen mode +for_window [class="steam_app_.*"] fullscreen enabled +# Force ES-DE to start windowed +for_window [class="es-de"] fullscreen disabled + +# Need to autostart something after this line, for example: +# see: launch-comp.sh diff --git a/images/base-app/build-fedora/configs/waybar/config.jsonc b/images/base-app/build-fedora/configs/waybar/config.jsonc new file mode 100644 index 00000000..fcd2e2da --- /dev/null +++ b/images/base-app/build-fedora/configs/waybar/config.jsonc @@ -0,0 +1,118 @@ +// -*- mode: jsonc -*- +{ + "layer": "top", + // Waybar at top layer + "position": "top", + // Waybar position (top|bottom|left|right) + "height": 30, + // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 4, + // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": [ + "sway/workspaces", + "sway/mode", + "sway/scratchpad", + "custom/kitty" + ], + "modules-center": [ + "sway/window" + ], + "modules-right": [ + "pulseaudio", + "network", + "cpu", + "memory", + "temperature", + "sway/language", + "custom/clock" + ], + "custom/kitty": { + "format": "{} ", + "tooltip": false, + "on-click": "kitty" + }, + "sway/mode": { + "format": "{}" + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": [ + "", + "" + ], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "custom/clock": { + // see: https://github.com/games-on-whales/wolf/issues/137 + // and: https://github.com/Alexays/Waybar/issues/3575#issuecomment-2338813343 + "format": " {}", + "tooltip": false, + "interval": 60, + "exec": "date +'%d %a %H:%M'" + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + "memory": { + "format": "{}% " + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C", + "format-icons": [ + "", + "", + "" + ] + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr}", + "tooltip-format": "{ifname} via {gwaddr}", + "format-linked": "{ifname} (No IP)", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": [ + "", + "", + "" + ] + } + } +} diff --git a/images/base-app/build-fedora/configs/waybar/style.css b/images/base-app/build-fedora/configs/waybar/style.css new file mode 100644 index 00000000..40051e80 --- /dev/null +++ b/images/base-app/build-fedora/configs/waybar/style.css @@ -0,0 +1,296 @@ +/* TAKEN FROM: https://github.com/Pipshag/dotfiles_nord/tree/master/.config/waybar */ +@keyframes blink-warning { + 70% { + color: @light; + } + + to { + color: @light; + background-color: @warning; + } +} + +@keyframes blink-critical { + 70% { + color: @light; + } + + to { + color: @light; + background-color: @critical; + } +} + + +/* ----------------------------------------------------------------------------- + * Styles + * -------------------------------------------------------------------------- */ + +/* COLORS */ + +/* Nord */ +@define-color bg #2E3440; +/*@define-color bg #353C4A;*/ +@define-color light #D8DEE9; +/*@define-color dark @nord_dark_font;*/ +@define-color warning #ebcb8b; +@define-color critical #BF616A; +@define-color mode #434C5E; +/*@define-color workspaces @bg;*/ +/*@define-color workspaces @nord_dark_font;*/ +/*@define-color workspacesfocused #434C5E;*/ +@define-color workspacesfocused #4C566A; +@define-color tray @workspacesfocused; +@define-color sound #EBCB8B; +@define-color network #5D7096; +@define-color memory #546484; +@define-color cpu #596A8D; +@define-color temp #4D5C78; +@define-color layout #5e81ac; +@define-color battery #88c0d0; +@define-color date #434C5E; +@define-color time #434C5E; +@define-color backlight #434C5E; +@define-color nord_bg #434C5E; +@define-color nord_bg_blue #546484; +@define-color nord_light #D8DEE9; +@define-color nord_light_font #D8DEE9; +@define-color nord_dark_font #434C5E; + +/* Reset all styles */ +* { + border: none; + border-radius: 3px; + min-height: 0; + margin: 0.2em 0.3em 0.2em 0.3em; +} + +/* The whole bar */ +#waybar { + background: @bg; + color: @light; + font-family: "Cantarell", "Font Awesome 5 Pro"; + font-size: 12px; + font-weight: bold; +} + +/* Each module */ +#battery, +#clock, +#cpu, +#custom-layout, +#memory, +#mode, +#network, +#pulseaudio, +#temperature, +#custom-alsa, +#custom-pacman, +#custom-weather, +#custom-gpu, +#tray, +#backlight, +#language, +#custom-cpugovernor { + padding-left: 0.6em; + padding-right: 0.6em; +} + +/* Each module that should blink */ +#mode, +#memory, +#temperature, +#battery { + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +/* Each critical module */ +#memory.critical, +#cpu.critical, +#temperature.critical, +#battery.critical { + color: @critical; +} + +/* Each critical that should blink */ +#mode, +#memory.critical, +#temperature.critical, +#battery.critical.discharging { + animation-name: blink-critical; + animation-duration: 2s; +} + +/* Each warning */ +#network.disconnected, +#memory.warning, +#cpu.warning, +#temperature.warning, +#battery.warning { + background: @warning; + color: @nord_dark_font; +} + +/* Each warning that should blink */ +#battery.warning.discharging { + animation-name: blink-warning; + animation-duration: 3s; +} + +/* And now modules themselves in their respective order */ + +#mode { /* Shown current Sway mode (resize etc.) */ + color: @light; + background: @mode; +} + +/* Workspaces stuff */ + +#workspaces { + /* color: #D8DEE9; + margin-right: 10px;*/ +} + +#workspaces button { + font-weight: bold; /* Somewhy the bar-wide setting is ignored*/ + padding: 0; + /*color: #999;*/ + opacity: 0.3; + background: none; + font-size: 1em; +} + +#workspaces button.focused { + background: @workspacesfocused; + color: #D8DEE9; + opacity: 1; + padding: 0 0.4em; +} + +#workspaces button.urgent { + border-color: #c9545d; + color: #c9545d; + opacity: 1; +} + +#window { + margin-right: 40px; + margin-left: 40px; + font-weight: normal; +} +#bluetooth { + background: @nord_bg_blue; + font-size: 1.2em; + font-weight: bold; + padding: 0 0.6em; +} +#custom-gpu { + background: @nord_bg; + font-weight: bold; + padding: 0 0.6em; +} +#custom-weather { + background: @mode; + font-weight: bold; + padding: 0 0.6em; +} +#custom-pacman { + background: @nord_light; + color: @nord_dark_font; + font-weight: bold; + padding: 0 0.6em; +} +#custom-scratchpad-indicator { + background: @nord_light; + color: @nord_dark_font; + font-weight: bold; + padding: 0 0.6em; +} +#idle_inhibitor { + background: @mode; + /*font-size: 1.6em;*/ + font-weight: bold; + padding: 0 0.6em; +} +#custom-alsa { + background: @sound; +} + +#network { + background: @nord_bg_blue; +} + +#memory { + background: @memory; +} + +#cpu { + background: @nord_bg; + color: #D8DEE9; +} +#cpu.critical { + color: @nord_dark_font; +} +#language { + background: @nord_bg_blue; + color: #D8DEE9; + padding: 0 0.4em; +} +#custom-cpugovernor { + background-color: @nord_light; + color: @nord_dark_font; +} +#custom-cpugovernor.perf { + +} +#temperature { + background-color: @nord_bg; + color: #D8DEE9; +} +#temperature.critical { + background: @critical; +} +#custom-layout { + background: @layout; +} + +#battery { + background: @battery; +} + +#backlight { + background: @backlight; +} + +#clock { + background: @nord_bg_blue; + color: #D8DEE9; +} +#clock.date { + background: @date; +} + +#clock.time { + background: @mode; +} + +#pulseaudio { /* Unsused but kept for those who needs it */ + background: @nord_bg_blue; + color: #D8DEE9; +} + +#pulseaudio.muted { + background: #BF616A; + color: #BF616A; + /* No styles */ +} +#pulseaudio.source-muted { + background: #D08770; + color: #D8DEE9; + /* No styles */ +} +#tray { + background: #434C5E; +} diff --git a/images/base-app/build-fedora/scripts/init-gamescope.sh b/images/base-app/build-fedora/scripts/init-gamescope.sh new file mode 100644 index 00000000..f6bbff4a --- /dev/null +++ b/images/base-app/build-fedora/scripts/init-gamescope.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +chown "${UNAME}":"${UNAME}" $(which gamescope) \ No newline at end of file diff --git a/images/base-app/build-fedora/scripts/launch-comp.sh b/images/base-app/build-fedora/scripts/launch-comp.sh new file mode 100644 index 00000000..c4e6bff8 --- /dev/null +++ b/images/base-app/build-fedora/scripts/launch-comp.sh @@ -0,0 +1,48 @@ +#!/bin/bash +set -e + +source /opt/gow/bash-lib/utils.sh + +function launcher() { + export GAMESCOPE_WIDTH=${GAMESCOPE_WIDTH:-1920} + export GAMESCOPE_HEIGHT=${GAMESCOPE_HEIGHT:-1080} + export GAMESCOPE_REFRESH=${GAMESCOPE_REFRESH:-60} + + if [ -n "$RUN_GAMESCOPE" ]; then + gow_log "[Gamescope] - Starting: \`$@\`" + + GAMESCOPE_MODE=${GAMESCOPE_MODE:-"-b"} + gamescope "${GAMESCOPE_MODE}" -W "${GAMESCOPE_WIDTH}" -H "${GAMESCOPE_HEIGHT}" -r "${GAMESCOPE_REFRESH}" -- "$@" + elif [ -n "$RUN_SWAY" ]; then + gow_log "[Sway] - Starting: \`$@\`" + + export SWAYSOCK=${XDG_RUNTIME_DIR}/sway.socket # Enables the sway socket + export SWAY_STOP_ON_APP_EXIT=${SWAY_STOP_ON_APP_EXIT:-"yes"} + export XDG_CURRENT_DESKTOP=sway # xdg-desktop-portal + export XDG_SESSION_DESKTOP=sway # systemd + export XDG_SESSION_TYPE=wayland # xdg/systemd + + # Only copy waybar default config if it doesn't exist + mkdir -p $HOME/.config/waybar + cp -u /cfg/waybar/* $HOME/.config/waybar/ + + # Sway needs to be overridden since we are going to change the resolution and app start + mkdir -p $HOME/.config/sway/ + cp /cfg/sway/config $HOME/.config/sway/config + # Modify the config file for res and to launch the app at the end + echo "output * resolution ${GAMESCOPE_WIDTH}x${GAMESCOPE_HEIGHT} position 0,0" >> $HOME/.config/sway/config + echo -n "workspace main; exec $@" >> $HOME/.config/sway/config + + # if SWAY_STOP_ON_APP_EXIT == "yes" then kill sway when the app exits + if [ "$SWAY_STOP_ON_APP_EXIT" == "yes" ]; then + echo -n " && killall sway" >> $HOME/.config/sway/config + fi + + # Start sway + dbus-run-session -- sway --unsupported-gpu + else + gow_log "[exec] Starting: $@" + + exec $@ + fi +} diff --git a/images/base-app/build-fedora/scripts/startup.sh b/images/base-app/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..535fbfbc --- /dev/null +++ b/images/base-app/build-fedora/scripts/startup.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e + +source /opt/gow/bash-lib/utils.sh +exec /opt/gow/startup-app.sh \ No newline at end of file diff --git a/images/base-app/build/Dockerfile b/images/base-app/build/Dockerfile index 78be1c94..bb69e645 100644 --- a/images/base-app/build/Dockerfile +++ b/images/base-app/build/Dockerfile @@ -34,7 +34,7 @@ _BUILD_SDL_JSTEST ################################# FROM ${BASE_IMAGE} -ARG GAMESCOPE_VERSION="3.15.14" +ARG GAMESCOPE_VERSION="3.16.22" ENV GAMESCOPE_VERSION=$GAMESCOPE_VERSION ENV DEBIAN_FRONTEND=noninteractive diff --git a/images/base-app/build/scripts/init-gamescope.sh b/images/base-app/build/scripts/init-gamescope.sh index aca6ce35..14e59d7e 100755 --- a/images/base-app/build/scripts/init-gamescope.sh +++ b/images/base-app/build/scripts/init-gamescope.sh @@ -2,4 +2,7 @@ set -e -chown "${UNAME}":"${UNAME}" /usr/games/gamescope \ No newline at end of file +GAMESCOPE_BIN=$(command -v gamescope || true) +if [ -n "$GAMESCOPE_BIN" ]; then + chown "${UNAME}":"${UNAME}" "$GAMESCOPE_BIN" +fi \ No newline at end of file diff --git a/images/base-app/build/scripts/launch-comp.sh b/images/base-app/build/scripts/launch-comp.sh index f7f8375f..a12b5566 100755 --- a/images/base-app/build/scripts/launch-comp.sh +++ b/images/base-app/build/scripts/launch-comp.sh @@ -12,7 +12,7 @@ function launcher() { gow_log "[Gamescope] - Starting: \`$@\`" GAMESCOPE_MODE=${GAMESCOPE_MODE:-"-b"} - /usr/games/gamescope "${GAMESCOPE_MODE}" -W "${GAMESCOPE_WIDTH}" -H "${GAMESCOPE_HEIGHT}" -r "${GAMESCOPE_REFRESH}" -- "$@" + "$(command -v gamescope)" "${GAMESCOPE_MODE}" -W "${GAMESCOPE_WIDTH}" -H "${GAMESCOPE_HEIGHT}" -r "${GAMESCOPE_REFRESH}" -- "$@" elif [ -n "$RUN_SWAY" ]; then gow_log "[Sway] - Starting: \`$@\`" diff --git a/images/base-emu/build-fedora/Dockerfile b/images/base-emu/build-fedora/Dockerfile new file mode 100644 index 00000000..13e11470 --- /dev/null +++ b/images/base-emu/build-fedora/Dockerfile @@ -0,0 +1,149 @@ +ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_APP_IMAGE} + +# see: https://github.com/AppImage/AppImageKit/wiki/FUSE#docker +ENV APPIMAGE_EXTRACT_AND_RUN=1 + +#GitHub REST query versioning +ARG GITHUB_REST_VERSION=2022-11-28 + +# Install prereqs +RUN dnf install -y \ + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \ + dnf install -y --allowerasing \ + curl \ + ffmpeg \ + jq \ + dbus-libs \ + mesa-libEGL \ + mesa-libGLU \ + gtk3 \ + SDL2 \ + vulkan-loader \ + p7zip \ + qt5-qtbase \ + qt6-qtbase \ + wget \ + xrandr \ + libaio \ + libusb1 \ + xz \ + retroarch \ + && dnf clean all + +RUN <<_INSTALL_EMULATORS +#!/bin/bash +set -e + +EMULATORS_DIR=/Applications +mkdir -p $EMULATORS_DIR +cd $EMULATORS_DIR + +github_download(){ + local repo="$1" + local out_file="$2" + local extra_filter="$3" + local api_suffix="$4" + local ext=".${out_file##*.}" + local url="https://api.github.com/repos/${repo}/releases${api_suffix}" + local jq_prefix="" + if [ -z "$api_suffix" ]; then + jq_prefix='[.[] | select(.prerelease==false and .draft==false)][0]' + fi + curl -s "$url" | \ + jq "${jq_prefix}.assets[]|select(.name|endswith(\"${ext}\"))${extra_filter}.browser_download_url" | \ + xargs wget -O "$out_file" +} + +gitlab_download(){ + local gitlab_url="$1" + local out_file="$2" + local extra_filter="$3" + + local gitlab_instance=$(echo "$gitlab_url" | sed 's|https://\([^/]*\).*|\1|') + local project_path=$(echo "$gitlab_url" | sed 's|https://[^/]*/||') + local api_url="https://${gitlab_instance}/api/v4/projects/${project_path//\//%2F}/releases" + + local download_url=$(curl -s "$api_url" | \ + jq '.[0].assets.links[] | select(.name | contains("'${extra_filter}'")) | .direct_asset_url' | \ + tr -d '"') + + if [ -z "$download_url" ] || [ "$download_url" = "null" ]; then + echo "No matching download found for ${out_file} with filter: ${extra_filter}" + return 1 + fi + + wget -O "$out_file" "$download_url" +} + +forgejo_download(){ + local forgejo_url="$1" + local out_file="$2" + local extra_filter="$3" + + local forgejo_instance=$(echo "$forgejo_url" | sed 's|https://\([^/]*\).*|\1|') + local project_path=$(echo "$forgejo_url" | sed 's|https://[^/]*/||') + + local owner=$(echo "$project_path" | cut -d'/' -f1) + local repo=$(echo "$project_path" | cut -d'/' -f2) + + local api_url="https://${forgejo_instance}/api/v1/repos/${owner}/${repo}/releases" + + local download_url=$(curl -s "$api_url" | jq -r '.[] | .assets[]?.browser_download_url' | grep "$extra_filter" | head -n 1) + + if [ -z "$download_url" ]; then + echo "No matching download found for ${out_file} with filter: ${extra_filter}" + return 1 + fi + + wget -O "$out_file" "$download_url" +} + + +echo "**** Downloading PCSX2 AppImage ****" +github_download "PCSX2/pcsx2" "pcsx2-emu.AppImage" "" "/latest" + +echo "**** Downloading XEMU AppImage ****" +github_download "xemu-project/xemu" "xemu-emu.AppImage" "|select(.name|contains(\"dbg\")|not)|select(.name|contains(\"x86_64\"))" "/latest" + +echo "**** Downloading RPCS3 AppImage ****" +github_download "rpcs3/rpcs3-binaries-linux" "rpcs3-emu.AppImage" "" "/latest" + +echo "**** Downloading CEMU AppImage ****" +github_download "cemu-project/Cemu" "cemu-emu.AppImage" "" "/latest" + +echo "**** Downloading Dolphin AppImage ****" +github_download "pkgforge-dev/Dolphin-emu-AppImage" "dolphin-emu.AppImage" "|select(.name|contains(\"zsync\")|not)|select(.name|contains(\"x86_64.AppImage\"))" + +echo "**** Downloading Citron Emulator AppImage ****" +# TODO: check why this is failing +#forgejo_download "https://git.citron-emu.org/citron-emu/Citron" "citron.AppImage" "x86_64" + +echo "**** Downloading Xenia Canary ****" +github_download "xenia-canary/xenia-canary-releases" "xenia_canary_linux.tar.xz" "" "" + +echo "**** Extracting Xenia Canary ****" +mkdir -p xenia-canary +tar -xf xenia_canary_linux.tar.xz -C xenia-canary +rm xenia_canary_linux.tar.xz + +chmod -v -R 777 $EMULATORS_DIR +chmod -v -R a+x $EMULATORS_DIR +_INSTALL_EMULATORS + +COPY --chmod=777 launchers /Applications/launchers +ENV PATH="/Applications/launchers:${PATH}" + +RUN \ + echo "**** Preparing /bioses for symlinking ****" && \ + mkdir -pm755 /bioses + +RUN \ + echo "**** Preparing /ROMs for symlinking ****" && \ + mkdir -pm755 /ROMs + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/images/base-emu/build-fedora/launchers/cemu.sh b/images/base-emu/build-fedora/launchers/cemu.sh new file mode 100755 index 00000000..d3a4d03f --- /dev/null +++ b/images/base-emu/build-fedora/launchers/cemu.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh + +gow_log "Starting CEMU with DISPLAY=${DISPLAY}" +/Applications/cemu-emu.AppImage --appimage-extract-and-run \ No newline at end of file diff --git a/images/base-emu/build-fedora/launchers/citron.sh b/images/base-emu/build-fedora/launchers/citron.sh new file mode 100644 index 00000000..3451d826 --- /dev/null +++ b/images/base-emu/build-fedora/launchers/citron.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh + +gow_log "Starting Citron with DISPLAY=${DISPLAY}" +/Applications/citron.AppImage --appimage-extract-and-run "$@" \ No newline at end of file diff --git a/images/base-emu/build-fedora/launchers/dolphin.sh b/images/base-emu/build-fedora/launchers/dolphin.sh new file mode 100755 index 00000000..601fab2e --- /dev/null +++ b/images/base-emu/build-fedora/launchers/dolphin.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh + +gow_log "Starting dolphin-emu with DISPLAY=${DISPLAY}" +/Applications/dolphin-emu.AppImage --appimage-extract-and-run diff --git a/images/base-emu/build-fedora/launchers/pcsx2.sh b/images/base-emu/build-fedora/launchers/pcsx2.sh new file mode 100644 index 00000000..eb19cfef --- /dev/null +++ b/images/base-emu/build-fedora/launchers/pcsx2.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh + +gow_log "Starting PCSX2-QT with DISPLAY=${DISPLAY}" +/Applications/pcsx2-emu.AppImage --appimage-extract-and-run \ No newline at end of file diff --git a/images/base-emu/build-fedora/launchers/retroarch.sh b/images/base-emu/build-fedora/launchers/retroarch.sh new file mode 100644 index 00000000..99f7c1fd --- /dev/null +++ b/images/base-emu/build-fedora/launchers/retroarch.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh + +gow_log "Starting RetroArch with DISPLAY=${DISPLAY}" +retroarch \ No newline at end of file diff --git a/images/base-emu/build-fedora/launchers/rom_launcher.sh b/images/base-emu/build-fedora/launchers/rom_launcher.sh new file mode 100755 index 00000000..13157975 --- /dev/null +++ b/images/base-emu/build-fedora/launchers/rom_launcher.sh @@ -0,0 +1,100 @@ +#!/bin/bash +EMULATOR=$1 +ROM=$2 + +# Mount location where we will mount both zip files and iso files +ISO_MOUNT_LOCATION=/media/iso_mount + +function launch_ps3 { + + local ROM_FILE="$1" + + # Mount the folder/file if it's an iso + if [[ $ROM_FILE == *.iso ]]; then + echo "Mounting: ${ROM_FILE} to ${ISO_MOUNT_LOCATION}" + fuseiso "${ROM_FILE}" ${ISO_MOUNT_LOCATION} + ROM_FILE=${ISO_MOUNT_LOCATION} + fi + + # Launch the game + /Applications/rpcs3-emu.AppImage --appimage-extract-and-run "${ROM_FILE}" + + # Unmount (if we mounted the ISO) + if [[ "${ROM_FILE}" == "${ISO_MOUNT_LOCATION}" ]]; then + echo "UnMounting: ${ISO_MOUNT_LOCATION}" + fusermount -u ${ISO_MOUNT_LOCATION} + fi +} + +function launch_scummvm { + + local ROM_FILE="$1" + + # Mount the folder/file if it's an iso + if [[ $ROM_FILE == *.zip ]]; then + echo "Mounting: ${ROM_FILE} to ${ISO_MOUNT_LOCATION}" + fuse-zip -o ro "${ROM_FILE}" ${ISO_MOUNT_LOCATION} + ROM_FILE=${ISO_MOUNT_LOCATION} + fi + + # Find the .scummvm filename + SCUMMVM_FILE=`ls ${ISO_MOUNT_LOCATION}/*.scummvm` + + # Launch the game + retroarch -L ~/.config/retroarch/cores/scummvm_libretro.so ${SCUMMVM_FILE} + + # Unmount (if we mounted the ISO) + if [[ "${ROM_FILE}" == "${ISO_MOUNT_LOCATION}" ]]; then + echo "UnMounting: ${ISO_MOUNT_LOCATION}" + fusermount -u ${ISO_MOUNT_LOCATION} + fi +} + +# dictionary of emulator to command to run +declare -A EMULATOR_COMMAND=( \ +["3do"]="retroarch --fullscreen -L ~/.config/retroarch/cores/opera_libretro.so \"${ROM}\"" \ +["arcade"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mame_libretro.so \"${ROM}\"" \ +["amiga"]="retroarch --fullscreen -L ~/.config/retroarch/cores/puae_libretro.so \"${ROM}\"" \ +["amigacd32"]="retroarch --fullscreen -L ~/.config/retroarch/cores/puae_libretro.so \"${ROM}\"" \ +["atari2600"]="retroarch --fullscreen -L ~/.config/retroarch/cores/stella_libretro.so \"${ROM}\"" \ +["atari5200"]="retroarch --fullscreen -L ~/.config/retroarch/cores/a5200_libretro.so \"${ROM}\"" \ +["atari7800"]="retroarch --fullscreen -L ~/.config/retroarch/cores/prosystem_libretro.so \"${ROM}\"" \ +["atarijaguar"]="retroarch --fullscreen -L ~/.config/retroarch/cores/virtualjaguar_libretro.so \"${ROM}\"" \ +["atarijaguarcd"]="retroarch --fullscreen -L ~/.config/retroarch/cores/virtualjaguar_libretro.so \"${ROM}\"" \ +["atarilynx"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mednafen_lynx_libretro.so \"${ROM}\"" \ +["dreamcast"]="retroarch --fullscreen -L ~/.config/retroarch/cores/flycast_libretro.so \"${ROM}\"" \ +["gb"]="retroarch --fullscreen -L ~/.config/retroarch/cores/gambatte_libretro.so \"${ROM}\"" \ +["gbc"]="retroarch --fullscreen -L ~/.config/retroarch/cores/gambatte_libretro.so \"${ROM}\"" \ +["gba"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mgba_libretro.so \"${ROM}\"" \ +["gc"]="/Applications/dolphin-emu.AppImage --appimage-extract-and-run --batch --exec=\"${ROM}\"" \ +["genesis"]="retroarch --fullscreen -L ~/.config/retroarch/cores/picodrive_libretro.so \"${ROM}\"" \ +["megacd"]="retroarch --fullscreen -L ~/.config/retroarch/cores/genesis_plus_gx_libretro.so \"${ROM}\"" \ +["model2"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mame_libretro.so \"${ROM}\"" \ +["n64"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mupen64plus_next_libretro.so \"${ROM}\"" \ +["naomi"]="retroarch --fullscreen -L ~/.config/retroarch/cores/flycast_libretro.so \"${ROM}\"" \ +["neogeo"]="retroarch --fullscreen -L ~/.config/retroarch/cores/fbneo_libretro.so \"${ROM}\"" \ +["nes"]="retroarch --fullscreen -L ~/.config/retroarch/cores/fceumm_libretro.so \"${ROM}\"" \ +["ngp"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mednafen_ngp_libretro.so \"${ROM}\"" \ +["ngpc"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mednafen_ngp_libretro.so \"${ROM}\"" \ +["psp"]="retroarch --fullscreen -L ~/.config/retroarch/cores/ppsspp_libretro.so \"${ROM}\"" \ +["psx"]="retroarch --fullscreen -L ~/.config/retroarch/cores/pcsx_rearmed_libretro.so \"${ROM}\"" \ +["ps2"]="/Applications/pcsx2-emu.AppImage --appimage-extract-and-run \"${ROM}\"" \ +["ps3"]="launch_ps3 \"${ROM}\"" \ +["saturn"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mednafen_saturn_libretro.so \"${ROM}\"" \ +["sega32x"]="retroarch --fullscreen -L ~/.config/retroarch/cores/picodrive_libretro.so \"${ROM}\"" \ +["segacd"]="retroarch --fullscreen -L ~/.config/retroarch/cores/genesis_plus_gx_libretro.so \"${ROM}\"" \ +["scummvm"]="launch_scummvm \"${ROM}\"" \ +["snes"]="retroarch --fullscreen -L ~/.config/retroarch/cores/snes9x_libretro.so \"${ROM}\"" \ +["snes_widescreen"]="retroarch --fullscreen -L ~/.config/retroarch/cores/bsnes_hd_beta_libretro.so \"${ROM}\"" \ +["switch"]="/Applications/launchers/citron.sh -f -g \"${ROM}\"" \ +["virtualboy"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mednafen_vb_libretro.so \"${ROM}\"" \ +["wii"]="/Applications/dolphin-emu.AppImage --appimage-extract-and-run --batch --exec=\"${ROM}\"" \ +["wiiu"]="/Applications/cemu-emu.AppImage --appimage-extract-and-run -f -g \"${ROM}\"" \ +["wonderswan"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mednafen_wswan_libretro.so \"${ROM}\"" \ +["wonderswancolor"]="retroarch --fullscreen -L ~/.config/retroarch/cores/mednafen_wswan_libretro.so \"${ROM}\"" \ +["xbox"]="/Applications/xemu-emu.AppImage --appimage-extract-and-run -full-screen -dvd_path \"${ROM}\"" \ +["xbox360"]="/Applications/launchers/xenia.sh --fullscreen \"${ROM}\"" \ +) + +echo "Running command: ${EMULATOR_COMMAND[${EMULATOR}]}" +eval ${EMULATOR_COMMAND[${EMULATOR}]} diff --git a/images/base-emu/build-fedora/launchers/rpcs3.sh b/images/base-emu/build-fedora/launchers/rpcs3.sh new file mode 100644 index 00000000..56acb2b7 --- /dev/null +++ b/images/base-emu/build-fedora/launchers/rpcs3.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh + +gow_log "Starting RPCS3 with DISPLAY=${DISPLAY}" +/Applications/rpcs3-emu.AppImage --appimage-extract-and-run \ No newline at end of file diff --git a/images/base-emu/build-fedora/launchers/xemu.sh b/images/base-emu/build-fedora/launchers/xemu.sh new file mode 100644 index 00000000..67ef038f --- /dev/null +++ b/images/base-emu/build-fedora/launchers/xemu.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh + +gow_log "Starting XEMU with DISPLAY=${DISPLAY}" +/Applications/xemu-emu.AppImage --appimage-extract-and-run \ No newline at end of file diff --git a/images/base-emu/build-fedora/launchers/xenia.sh b/images/base-emu/build-fedora/launchers/xenia.sh new file mode 100644 index 00000000..115b6473 --- /dev/null +++ b/images/base-emu/build-fedora/launchers/xenia.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e +source /opt/gow/bash-lib/utils.sh + +XENIA_WORKDIR="$HOME/.local/share/Xenia/root" +mkdir -p "$XENIA_WORKDIR" + +gow_log "Starting Xenia Canary with DISPLAY=${DISPLAY} and working directory $XENIA_WORKDIR and args: $@" +cd "$XENIA_WORKDIR" +/Applications/xenia-canary/xenia_canary "$@" \ No newline at end of file diff --git a/images/base/build-fedora/Dockerfile b/images/base/build-fedora/Dockerfile new file mode 100644 index 00000000..eb1492dd --- /dev/null +++ b/images/base/build-fedora/Dockerfile @@ -0,0 +1,53 @@ +# syntax=docker/dockerfile:1.4 +FROM quay.io/fedora/fedora:43 + +# Configure default user and set env +# The users UID and GID will be set on container startup +ENV \ + PUID=1000 \ + PGID=1000 \ + UMASK=000 \ + UNAME="retro" \ + HOME="/home/retro" \ + TZ="Europe/London" + +ARG TARGETARCH TARGETVARIANT + +# Install default required packages +ARG GOSU_VERSION=1.14 + +RUN <<_INSTALL_PACKAGES +#!/bin/bash +set -e + +echo "**** Install base packages ****" +dnf -y install \ + ca-certificates \ + fuse \ + wget \ + curl \ + jq + +echo "**** Install gosu ****" +wget --progress=dot:giga \ + -O /usr/bin/gosu \ + "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${TARGETARCH}${TARGETVARIANT}" +chmod +x /usr/bin/gosu + +echo "**** Verify gosu works ****" +gosu nobody true && echo "Working!" + +echo "**** Section cleanup ****" +dnf clean all + +echo +_INSTALL_PACKAGES + +# Import overlay +COPY overlay / + +# Set entrypoint script +ENTRYPOINT ["/entrypoint.sh"] + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/images/base/build-fedora/overlay/entrypoint.sh b/images/base/build-fedora/overlay/entrypoint.sh new file mode 100755 index 00000000..7a41726f --- /dev/null +++ b/images/base/build-fedora/overlay/entrypoint.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -e + +# Source functions from GOW utils +source /opt/gow/bash-lib/utils.sh + +# Execute all container init scripts. Only run this if the container is started as the root user +if [ "$(id -u)" = "0" ]; then + for init_script in /etc/cont-init.d/*.sh ; do + gow_log + gow_log "[ ${init_script}: executing... ]" + #sed -i 's/\r$//' "${init_script}" # Remove Windows line endings + # shellcheck source=/dev/null + source "${init_script}" + done +fi + +# If a command was passed, run that instead of the usual init startup script +# shellcheck disable=SC2198 +if [ -n "${@:-}" ]; then + /bin/bash -c "$@" + exit $? +fi + +# Launch startup script as 'UNAME' user (some services will run as root) +gow_log "Launching the container's startup script as user '${UNAME}'" +chmod +x /opt/gow/startup.sh +exec gosu "${UNAME}" /opt/gow/startup.sh diff --git a/images/base/build-fedora/overlay/etc/cont-init.d/10-setup_user.sh b/images/base/build-fedora/overlay/etc/cont-init.d/10-setup_user.sh new file mode 100755 index 00000000..860c167e --- /dev/null +++ b/images/base/build-fedora/overlay/etc/cont-init.d/10-setup_user.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +set -e + +gow_log "**** Configure default user ****" + +if [[ "${UNAME}" != "root" ]]; then + PUID="${PUID:-1000}" + PGID="${PGID:-1000}" + UMASK="${UMASK:-000}" + + gow_log "Setting default user uid=${PUID}(${UNAME}) gid=${PGID}(${UNAME})" + if id -u "${PUID}" &>/dev/null; then + # need to delete the old user $PUID then change $UNAME's UID + # default ubuntu image comes with user `ubuntu` and UID 1000 + oldname=$(id -nu "${PUID}") + userdel -r "${oldname}" + fi + + groupadd -f -g "${PGID}" ${UNAME} + useradd -m -d ${HOME} -u "${PUID}" -g "${PGID}" -s /bin/bash ${UNAME} + + gow_log "Setting umask to ${UMASK}" + umask "${UMASK}" + + gow_log "Ensure retro home directory is writable" + chown "${PUID}:${PGID}" "${HOME}" + + gow_log "Ensure XDG_RUNTIME_DIR is writable" + chown -R "${PUID}:${PGID}" "${XDG_RUNTIME_DIR}" +else + gow_log "Container running as root. Nothing to do." +fi + +gow_log "DONE" diff --git a/images/base/build-fedora/overlay/etc/cont-init.d/15-setup_devices.sh b/images/base/build-fedora/overlay/etc/cont-init.d/15-setup_devices.sh new file mode 100644 index 00000000..e3ee0680 --- /dev/null +++ b/images/base/build-fedora/overlay/etc/cont-init.d/15-setup_devices.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e + +gow_log "**** Configure devices ****" + +gow_log "Exec device groups" +# make sure we're in the right groups to use all the required devices +# we're actually relying on word splitting for this call, so disable the +# warning from shellcheck +# shellcheck disable=SC2086 +/opt/gow/ensure-groups ${GOW_REQUIRED_DEVICES:-/dev/uinput /dev/input/event*} + +gow_log "DONE" diff --git a/images/base/build-fedora/overlay/etc/cont-init.d/30-nvidia.sh b/images/base/build-fedora/overlay/etc/cont-init.d/30-nvidia.sh new file mode 100644 index 00000000..392d622f --- /dev/null +++ b/images/base/build-fedora/overlay/etc/cont-init.d/30-nvidia.sh @@ -0,0 +1,95 @@ +#!/bin/bash + +# TODO: check whether we need this before actually doing it + +set -e + +source /opt/gow/bash-lib/utils.sh + +# Check if our custom volume is mounted +if [ -d /usr/nvidia ]; then + gow_log "Nvidia driver volume detected" + ldconfig + + if [ -d /usr/nvidia/share/vulkan/icd.d ]; then + gow_log "[nvidia] Add Vulkan ICD" + mkdir -p /usr/share/vulkan/icd.d/ + cp /usr/nvidia/share/vulkan/icd.d/* /usr/share/vulkan/icd.d/ + fi + + if [ -d /usr/nvidia/share/egl/egl_external_platform.d ]; then + gow_log "[nvidia] Add EGL external platform" + mkdir -p /usr/share/egl/egl_external_platform.d/ + cp /usr/nvidia/share/egl/egl_external_platform.d/* /usr/share/egl/egl_external_platform.d/ + fi + + if [ -d /usr/nvidia/share/glvnd/egl_vendor.d ]; then + gow_log "[nvidia] Add egl-vendor" + mkdir -p /usr/share/glvnd/egl_vendor.d/ + cp /usr/nvidia/share/glvnd/egl_vendor.d/* /usr/share/glvnd/egl_vendor.d/ + + fi + + if [ -d /usr/nvidia/lib/gbm ]; then + gow_log "[nvidia] Add gbm backend" + mkdir -p /usr/lib64/gbm/ + cp /usr/nvidia/lib/gbm/* /usr/lib64/gbm/ + fi +# Check if there's libnvidia-allocator.so.1 +elif [ -e /usr/lib64/libnvidia-allocator.so.1 ]; then + gow_log "Nvidia driver detected, assuming it's using the nvidia driver volume" + ldconfig + + # Create a symlink to the nvidia-drm_gbm.so (if not present) + if [ ! -e /usr/lib64/gbm/nvidia-drm_gbm.so ]; then + gow_log "Creating symlink to nvidia-drm_gbm.so" + mkdir -p /usr/lib64/gbm + ln -sv ../libnvidia-allocator.so.1 /usr/lib64/gbm/nvidia-drm_gbm.so + fi + + # Create json config files + if [ ! -f /usr/share/glvnd/egl_vendor.d/10_nvidia.json ]; then + gow_log "Creating json 10_nvidia.json file" + mkdir -p /usr/share/glvnd/egl_vendor.d/ + echo '{ + "file_format_version" : "1.0.0", + "ICD": { + "library_path": "libEGL_nvidia.so.0" + } + }' > /usr/share/glvnd/egl_vendor.d/10_nvidia.json + fi + + if [ ! -f /usr/share/vulkan/icd.d/nvidia_icd.json ]; then + gow_log "Creating json nvidia_icd.json file" + mkdir -p /usr/share/vulkan/icd.d/ + echo '{ + "file_format_version" : "1.0.0", + "ICD": { + "library_path": "libGLX_nvidia.so.0", + "api_version" : "1.3.242" + } + }' > /usr/share/vulkan/icd.d/nvidia_icd.json + fi + + if [ ! -f /usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json ]; then + gow_log "Creating json 15_nvidia_gbm.json file" + mkdir -p /usr/share/egl/egl_external_platform.d/ + echo '{ + "file_format_version" : "1.0.0", + "ICD": { + "library_path": "libnvidia-egl-gbm.so.1" + } + }' > /usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json + fi + + if [ ! -f /usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json ]; then + gow_log "Creating json 10_nvidia_wayland.json file" + mkdir -p /usr/share/egl/egl_external_platform.d/ + echo '{ + "file_format_version" : "1.0.0", + "ICD": { + "library_path": "libnvidia-egl-wayland.so.1" + } + }' > /usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json + fi +fi diff --git a/images/base/build-fedora/overlay/etc/ld.so.conf.d/nvidia.conf b/images/base/build-fedora/overlay/etc/ld.so.conf.d/nvidia.conf new file mode 100644 index 00000000..d4384274 --- /dev/null +++ b/images/base/build-fedora/overlay/etc/ld.so.conf.d/nvidia.conf @@ -0,0 +1,2 @@ +/usr/nvidia/lib +/usr/nvidia/lib32 diff --git a/images/base/build-fedora/overlay/opt/gow/bash-lib/utils.sh b/images/base/build-fedora/overlay/opt/gow/bash-lib/utils.sh new file mode 100644 index 00000000..debf69d4 --- /dev/null +++ b/images/base/build-fedora/overlay/opt/gow/bash-lib/utils.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +gow_log() { + echo "$(date +"[%Y-%m-%d %H:%M:%S]") $*" +} + +join_by() { local IFS="$1"; shift; echo "$*"; } + +github_download(){ + curl -H "X-GitHub-Api-Version: "${GITHUB_REST_VERSION:-2022-11-28}"" \ + https://api.github.com/repos/$1/releases/latest | \ + jq $2 | \ + xargs wget -O $3 +} diff --git a/images/base/build-fedora/overlay/opt/gow/ensure-groups b/images/base/build-fedora/overlay/opt/gow/ensure-groups new file mode 100755 index 00000000..e9816f76 --- /dev/null +++ b/images/base/build-fedora/overlay/opt/gow/ensure-groups @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +set -e + +source /opt/gow/bash-lib/utils.sh + +declare -A group_map + +for dev in "$@"; do + if [ -e "$dev" ]; then + dev_group=$(stat -c "%G" "$dev") + dev_gid=$(stat -c "%g" "$dev") + + if [ "$dev_group" = "UNKNOWN" ]; then + new_name="gow-gid-$dev_gid" + # We only have a GID for this group; create a named group for it + # this isn't 100% necessary but it prevents some useless noise in the console + groupadd -g "$dev_gid" "$new_name" + group_map[$new_name]=1 + else + # the group already exists; just add it to the list + group_map[$dev_group]=1 + fi + + # is this device read/writable by the group? if not, make it so + if [ "$(stat -c "%a" "$dev" | cut -c2)" -lt 6 ]; then + chmod g+rw "$dev" + fi + else + gow_log "Path '$dev' is not present." + fi +done + +groups=$(join_by "," "${!group_map[@]}") +if [ "$groups" != "" ]; then + gow_log "Adding user '${UNAME}' to groups: $groups" + usermod -G "$groups" "${UNAME}" +else + gow_log "Not modifying user groups ($groups)" +fi diff --git a/images/base/build-fedora/overlay/opt/gow/startup.sh b/images/base/build-fedora/overlay/opt/gow/startup.sh new file mode 100644 index 00000000..d5e15725 --- /dev/null +++ b/images/base/build-fedora/overlay/opt/gow/startup.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -e + +echo "ERROR: This script '$0' must be replaced with the service init commands. Exit!" +exit 1 diff --git a/images/base/build/Dockerfile b/images/base/build/Dockerfile index c53e260e..72cbed2b 100644 --- a/images/base/build/Dockerfile +++ b/images/base/build/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.4 -FROM ubuntu:25.04 +FROM public.ecr.aws/ubuntu/ubuntu:25.04 # Configure default user and set env # The users UID and GID will be set on container startup diff --git a/images/pulseaudio/build-fedora/Dockerfile b/images/pulseaudio/build-fedora/Dockerfile new file mode 100644 index 00000000..2a51ba58 --- /dev/null +++ b/images/pulseaudio/build-fedora/Dockerfile @@ -0,0 +1,36 @@ +ARG BASE_IMAGE=ghcr.io/games-on-whales/base:fedora + +# hadolint ignore=DL3006 +FROM ${BASE_IMAGE} + +ARG REQUIRED_PACKAGES=" \ + alsa-utils \ + alsa-lib \ + alsa-plugins-pulseaudio \ + pulseaudio \ + " + +# Configure container to run process as root user +# Note: +# The PulseAudio daemon will refuse to start if the $HOME directory is not +# owned by the user who launched it, _EVEN IF THAT USER IS root_. So we need +# to override $HOME to _not_ be /home/retro. This isn't a big deal because +# this dir is entirely inside the container anyway (it's not mounted into +# $local_state) so its name is essentially irrelevant. +ENV \ + UNAME="root" \ + HOME="/root" + +RUN dnf install -y $REQUIRED_PACKAGES && \ + dnf clean all + +COPY configs/default.pa /etc/pulse/default.pa +COPY configs/client.conf /etc/pulse/client.conf +COPY configs/daemon.conf /etc/pulse/daemon.conf + +COPY --chmod=777 scripts/startup.sh /opt/gow/startup.sh + +EXPOSE 4713 + +ARG IMAGE_SOURCE +LABEL org.opencontainers.image.source=$IMAGE_SOURCE diff --git a/images/pulseaudio/build-fedora/configs/client.conf b/images/pulseaudio/build-fedora/configs/client.conf new file mode 100644 index 00000000..cb5551d8 --- /dev/null +++ b/images/pulseaudio/build-fedora/configs/client.conf @@ -0,0 +1,37 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. + +## Configuration file for PulseAudio clients. See pulse-client.conf(5) for +## more information. Default values are commented out. Use either ; or # for +## commenting. + +; default-sink = +; default-source = +; default-server = +; default-dbus-server = + +autospawn = no +daemon-binary = /bin/true +; extra-arguments = --log-target=syslog + +; cookie-file = + +; enable-shm = yes +; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB + +; auto-connect-localhost = no +; auto-connect-display = no diff --git a/images/pulseaudio/build-fedora/configs/daemon.conf b/images/pulseaudio/build-fedora/configs/daemon.conf new file mode 100644 index 00000000..c03e2f2e --- /dev/null +++ b/images/pulseaudio/build-fedora/configs/daemon.conf @@ -0,0 +1,86 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, see . + +## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for +## more information. Default values are commented out. Use either ; or # for +## commenting. + +; daemonize = no +; fail = yes +; allow-module-loading = yes +; allow-exit = yes +; use-pid-file = yes +; system-instance = no +; local-server-type = user +; enable-shm = yes +; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB +; lock-memory = no +; cpu-limit = no + +; high-priority = yes +; nice-level = -11 + +; realtime-scheduling = yes +; realtime-priority = 5 + +exit-idle-time = -1 +; scache-idle-time = 20 + +; dl-search-path = (depends on architecture) + +; load-default-script-file = yes +; default-script-file = /etc/pulse/default.pa + +; log-target = auto +; log-level = notice +; log-meta = no +; log-time = no +; log-backtrace = 0 + +; resample-method = speex-float-1 +; enable-remixing = yes +; enable-lfe-remixing = no + +flat-volumes = yes + +; rlimit-fsize = -1 +; rlimit-data = -1 +; rlimit-stack = -1 +; rlimit-core = -1 +; rlimit-as = -1 +; rlimit-rss = -1 +; rlimit-nproc = -1 +; rlimit-nofile = 256 +; rlimit-memlock = -1 +; rlimit-locks = -1 +; rlimit-sigpending = -1 +; rlimit-msgqueue = -1 +; rlimit-nice = 31 +; rlimit-rtprio = 9 +; rlimit-rttime = 200000 + +; default-sample-format = s16le +; default-sample-rate = 44100 +; alternate-sample-rate = 48000 +; default-sample-channels = 2 +; default-channel-map = front-left,front-right + +; default-fragments = 4 +; default-fragment-size-msec = 25 + +; enable-deferred-volume = yes +; deferred-volume-safety-margin-usec = 8000 +; deferred-volume-extra-delay-usec = 0 + diff --git a/images/pulseaudio/build-fedora/configs/default.pa b/images/pulseaudio/build-fedora/configs/default.pa new file mode 100644 index 00000000..3717b1b7 --- /dev/null +++ b/images/pulseaudio/build-fedora/configs/default.pa @@ -0,0 +1,24 @@ +# Replace the *entire* content of this file with these few lines and +# read the comments + +.fail + # We don't do socket connection (YET?) + load-module module-native-protocol-unix auth-anonymous=1 socket=/tmp/pulse/pulse-socket + + # Needed in order for other containers to connect to this instance + # add auth-anonymous=1 if you have permission errors + # in theory we don't need it since we share the .config/pulse/cookie folder between containers + #load-module module-native-protocol-tcp auth-anonymous=1 + +#.nofail +#.ifexists module-x11-publish.so +# # Publish to X11 so the clients know how to connect to Pulse. Will +# # clear itself on unload. +# load-module module-x11-publish +#.endif + +# Adds a default null sink +#load-module module-null-sink + +### Make sure we always have a sink around, even if it is a null sink. +load-module module-always-sink diff --git a/images/pulseaudio/build-fedora/scripts/startup.sh b/images/pulseaudio/build-fedora/scripts/startup.sh new file mode 100644 index 00000000..9d991113 --- /dev/null +++ b/images/pulseaudio/build-fedora/scripts/startup.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +source /opt/gow/bash-lib/utils.sh + +gow_log "Removing all files from $HOME/.config/pulse" + +mkdir -p "$HOME/.config/pulse" +rm -rf "$HOME/.config/pulse/*" + +gow_log "Starting pulseaudio" +exec pulseaudio --log-level=1 #--log-target=stderr -v