Needs of gstreamer libraries in sniper

Abierto
#748 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
dockerfile, flutter, linux, shell

Línea de trabajo

Comienza revisando las directrices de empaquetado de Steam Linux Runtime SDK 1.0 y el launcher pum.sh indicado; después, reproduce el comportamiento de carga de GStreamer del bundle de Flutter con la configuración de LD_LIBRARY_PATH mostrada. El trabajo estará terminado cuando se haya establecido una forma compatible de empaquetar o declarar las bibliotecas, o se hayan documentado las dependencias necesarias del host y los límites de la compatibilidad con Flatpak.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Dear steam-runtime team,

I hope this issue does not bring trouble, I really tried to read as much as I could.

I am a new indie-single game developer, trying to get my game working on Steam natively on Linux. The game is very simple, and developed in Flutter, runs in Windowed mode.

However, it needs to play audio, and the current dependency makes use of libgstreamer1.0-dev and libgstreamer-plugins-base1.0-dev to run, which are typically available in host systems (but not always).

I am personally fine with asking users to install these libraries, however I wish I could bundle a safe container. I tried a few things but no success, for example packing the .so files in a directory, and running the game from a script that appends the LD_LIBRARY_PATH.

# Copy GStreamer libraries with fixed paths
RUN mkdir -p /app/pum/build/linux/x64/release/bundle/lib/ && \
    cp /usr/lib/x86_64-linux-gnu/libgstapp-1.0.so.0 /app/pum/build/linux/x64/release/bundle/lib/ && \
    cp /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 /app/pum/build/linux/x64/release/bundle/lib/ && \
    cp /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0 /app/pum/build/linux/x64/release/bundle/lib/ && \
    cp /usr/lib/x86_64-linux-gnu/libgstpbutils-1.0.so.0 /app/pum/build/linux/x64/release/bundle/lib/ && \
    cp /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0 /app/pum/build/linux/x64/release/bundle/lib/ && \
    cp /usr/lib/x86_64-linux-gnu/libunwind.so.8 /app/pum/build/linux/x64/release/bundle/lib/ && \
    cp /usr/lib/x86_64-linux-gnu/libdw.so.1 /app/pum/build/linux/x64/release/bundle/lib/


# Create a script to set LD_LIBRARY_PATH and run the pum executable
RUN echo '#!/bin/bash\n' \
         'export LD_LIBRARY_PATH="$(dirname "$0")/lib:$LD_LIBRARY_PATH"\n' \
         '"$(dirname "$0")/pum" "$@"\n' \
         > /app/pum/build/linux/x64/release/bundle/pum.sh && \
    chmod +x /app/pum/build/linux/x64/release/bundle/pum.sh

However all of this put me in an endless loop of trial and error, ultimately getting me stuck in

chdir "/storage/SteamLibrary/steamapps/common/PUM Companion"
ERROR: ld.so: object '/home/saif/.steam/debian-installation/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/saif/.steam/debian-installation/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/saif/.steam/debian-installation/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/saif/.steam/debian-installation/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/saif/.steam/debian-installation/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Game Recording - would start recording game 3564960, but recording for this game is disabled

(pum:171139): dbind-WARNING **: 20:40:15.590: Couldn't connect to accessibility bus: Failed to connect to socket /run/user/1000/at-spi/bus: No such file or directory
Adding process 171137 for gameID 3564960
Adding process 171138 for gameID 3564960
Adding process 171139 for gameID 3564960
Gdk-Message: 20:40:16.207: Unable to load  from the cursor theme

(pum:171139): Atk-CRITICAL **: 20:40:16.207: atk_socket_embed: assertion 'plug_id != NULL' failed
Game Recording - game stopped [gameid=3564960]

Which could either mean I am getting closer to a solution, or that I am in a tunnel without light at the end of it :)

Any advice is welcome, I am trying hard not to run my app on proton.

Alternative 2: I could be fine to not provide this library and ask users to install these on their host. But how should I package my game then? Would sdk 1.0 do this?

Alternative 3: My app works in the form of a Flatpak, if ever could Steam run a flatpak container instead of a native runtime?

Best regards
Saif

Lenguaje dominante
Shell
Estrellas
1.5k
Forks
98
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ValveSoftware/steam-runtime

Todos los issues de ValveSoftware/steam-runtime

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.