Needs of gstreamer libraries in sniper

Đang mở
#748 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
dockerfile, flutter, linux, shell

Hướng nghiên cứu

Bắt đầu bằng việc xem xét hướng dẫn đóng gói Steam Linux Runtime SDK 1.0 và launcher pum.sh được liệt kê, sau đó tái hiện hành vi tải GStreamer của Flutter bundle với thiết lập LD_LIBRARY_PATH đã nêu. Công việc được xem là hoàn tất khi xác lập được một cách được hỗ trợ để đóng gói hoặc khai báo các thư viện, hoặc ghi lại các dependency bắt buộc trên host và các giới hạn của việc hỗ trợ Flatpak.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Shell
Star
1.5k
Fork
98
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ValveSoftware/steam-runtime

Tất cả issue của ValveSoftware/steam-runtime

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.