diff --git a/.gitmodules b/.gitmodules index 3a8200a..6885011 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "FFmpeg"] - path = FFmpeg - url = https://github.com/cgutman/FFmpeg.git [submodule "SDL2"] path = SDL2 url = https://github.com/libsdl-org/SDL.git diff --git a/Dockerfile.aarch64.bookworm b/Dockerfile.aarch64.bookworm index b0d8acc..539a3d0 100644 --- a/Dockerfile.aarch64.bookworm +++ b/Dockerfile.aarch64.bookworm @@ -1,22 +1,25 @@ -FROM arm64v8/debian:bookworm +FROM git.byte-mate.ru/drholy/arm64v8/debian:bookworm ENV TARGET=embedded ENV DISTRO=bookworm COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + /bin/sh -c /opt/scripts/install-base-deps.sh -COPY dav1d /opt/dav1d -COPY FFmpeg /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf +RUN git clone https://code.videolan.org/videolan/dav1d /opt/dav1d && cd /opt/dav1d && git checkout b546257 +RUN git clone -b SDL2 https://github.com/libsdl-org/SDL /opt/SDL2 && cd /opt/SDL2 && git checkout 9cc2f248f5437daaf090e3ef6afb4f6dc88068ac +RUN git clone -b SDL2 https://github.com/libsdl-org/SDL_ttf /opt/SDL_ttf && cd /opt/SDL_ttf && git checkout 4a318f8dfaa1bb6f10e0c5e54052e25d3c7f3440 +RUN git clone -b jellyfin-mpp --depth=1 https://gitee.com/nyanmisaka/mpp.git /opt/rkmpp +RUN git clone -b jellyfin-rga --depth=1 https://gitee.com/nyanmisaka/rga.git /opt/rkrga +RUN git clone --depth=1 https://github.com/nyanmisaka/ffmpeg-rockchip.git /opt/ffmpeg +RUN git clone https://git.byte-mate.ru/drholy/moonlight-qt.git /opt/moonlight-qt && cd /opt/moonlight-qt && git checkout master && git log -1 && git -c submodule.libs.update=none submodule update --init --recursive -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh +COPY scripts/build-deps-ffmpeg.sh /opt/scripts/ +RUN ["/bin/sh", "-c", "/opt/scripts/build-deps-ffmpeg.sh"] COPY scripts/build-package.sh /opt/scripts/ VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] +ENTRYPOINT [ "/bin/sh", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.aarch64.jammy b/Dockerfile.aarch64.jammy deleted file mode 100644 index d63224e..0000000 --- a/Dockerfile.aarch64.jammy +++ /dev/null @@ -1,22 +0,0 @@ -FROM arm64v8/ubuntu:jammy - -ENV TARGET=embedded -ENV DISTRO=jammy - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.aarch64.noble b/Dockerfile.aarch64.noble deleted file mode 100644 index 196ca40..0000000 --- a/Dockerfile.aarch64.noble +++ /dev/null @@ -1,22 +0,0 @@ -FROM arm64v8/ubuntu:noble - -ENV TARGET=embedded -ENV DISTRO=noble - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.aarch64.trixie b/Dockerfile.aarch64.trixie deleted file mode 100644 index 432830b..0000000 --- a/Dockerfile.aarch64.trixie +++ /dev/null @@ -1,22 +0,0 @@ -FROM arm64v8/debian:trixie - -ENV TARGET=embedded -ENV DISTRO=trixie - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.amd64.trixie b/Dockerfile.amd64.trixie deleted file mode 100644 index 44fe56d..0000000 --- a/Dockerfile.amd64.trixie +++ /dev/null @@ -1,23 +0,0 @@ -FROM amd64/debian:trixie - -ENV TARGET=desktop -ENV DISTRO=trixie - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get install -y --no-install-recommends libwayland-dev wayland-protocols libva-dev libvdpau-dev && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.armhf.bookworm b/Dockerfile.armhf.bookworm deleted file mode 100644 index cffd4af..0000000 --- a/Dockerfile.armhf.bookworm +++ /dev/null @@ -1,22 +0,0 @@ -FROM arm32v7/debian:bookworm - -ENV TARGET=embedded -ENV DISTRO=bookworm - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.armhf.jammy b/Dockerfile.armhf.jammy deleted file mode 100644 index 580c5f6..0000000 --- a/Dockerfile.armhf.jammy +++ /dev/null @@ -1,22 +0,0 @@ -FROM arm32v7/ubuntu:jammy - -ENV TARGET=embedded -ENV DISTRO=jammy - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.armhf.noble b/Dockerfile.armhf.noble deleted file mode 100644 index 9cf0642..0000000 --- a/Dockerfile.armhf.noble +++ /dev/null @@ -1,22 +0,0 @@ -FROM arm32v7/ubuntu:noble - -ENV TARGET=embedded -ENV DISTRO=noble - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.armhf.trixie b/Dockerfile.armhf.trixie deleted file mode 100644 index 98e1d19..0000000 --- a/Dockerfile.armhf.trixie +++ /dev/null @@ -1,22 +0,0 @@ -FROM arm32v7/debian:trixie - -ENV TARGET=embedded -ENV DISTRO=trixie - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.l4t.jammy b/Dockerfile.l4t.jammy deleted file mode 100644 index 4ff24e6..0000000 --- a/Dockerfile.l4t.jammy +++ /dev/null @@ -1,28 +0,0 @@ -FROM arm64v8/ubuntu:jammy - -ENV TARGET=l4t -ENV DISTRO=jammy - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - echo "deb https://theofficialgman.github.io/l4t-debs/ l4t $DISTRO" >> /etc/apt/sources.list && \ - apt-key adv --fetch-key https://theofficialgman.github.io/l4t-debs/pgp-key.public && \ - mkdir -p /opt/nvidia/l4t-packages/ && \ - echo >> /opt/nvidia/l4t-packages/.nv-l4t-disable-boot-fw-update-in-preinstall && \ - apt-get update && \ - apt-get install -y -o Dpkg::Options::="--force-confold" libv4l-dev nvidia-bsp-32-3 nvidia-l4t-multimedia-utils && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg-l4t-new /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.l4t.noble b/Dockerfile.l4t.noble deleted file mode 100644 index a40c190..0000000 --- a/Dockerfile.l4t.noble +++ /dev/null @@ -1,28 +0,0 @@ -FROM arm64v8/ubuntu:noble - -ENV TARGET=l4t -ENV DISTRO=noble - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - echo "deb https://theofficialgman.github.io/l4t-debs/ l4t $DISTRO" >> /etc/apt/sources.list && \ - apt-key adv --fetch-key https://theofficialgman.github.io/l4t-debs/pgp-key.public && \ - mkdir -p /opt/nvidia/l4t-packages/ && \ - echo >> /opt/nvidia/l4t-packages/.nv-l4t-disable-boot-fw-update-in-preinstall && \ - apt-get update && \ - apt-get install -y -o Dpkg::Options::="--force-confold" libv4l-dev nvidia-bsp-32-3 nvidia-l4t-multimedia-utils && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg-l4t-new /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.riscv64.trixie b/Dockerfile.riscv64.trixie deleted file mode 100644 index 6cee0c1..0000000 --- a/Dockerfile.riscv64.trixie +++ /dev/null @@ -1,22 +0,0 @@ -FROM riscv64/debian:trixie - -ENV TARGET=embedded -ENV DISTRO=trixie - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY dav1d /opt/dav1d -COPY FFmpeg /opt/FFmpeg -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.rpi64.bookworm b/Dockerfile.rpi64.bookworm deleted file mode 100644 index d1be741..0000000 --- a/Dockerfile.rpi64.bookworm +++ /dev/null @@ -1,20 +0,0 @@ -FROM arm64v8/debian:bookworm - -ENV TARGET=rpi64 -ENV DISTRO=bookworm - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/Dockerfile.rpi64.trixie b/Dockerfile.rpi64.trixie deleted file mode 100644 index 4c635fb..0000000 --- a/Dockerfile.rpi64.trixie +++ /dev/null @@ -1,20 +0,0 @@ -FROM arm64v8/debian:trixie - -ENV TARGET=rpi64 -ENV DISTRO=trixie - -COPY scripts/install-base-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* - -COPY SDL2 /opt/SDL2 -COPY SDL_ttf /opt/SDL_ttf - -COPY scripts/build-deps.sh /opt/scripts/ -RUN /bin/bash -c /opt/scripts/build-deps.sh - -COPY scripts/build-package.sh /opt/scripts/ - -VOLUME "/out" -ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ] diff --git a/FFmpeg b/FFmpeg deleted file mode 160000 index 598b70d..0000000 --- a/FFmpeg +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 598b70dece4055bdba62e5c64ff9caaa9f42f3ec diff --git a/FFmpeg-l4t-new b/FFmpeg-l4t-new deleted file mode 160000 index 93133c0..0000000 --- a/FFmpeg-l4t-new +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 93133c040cff97b99046612dac7219844a55f3b8 diff --git a/SDL2 b/SDL2 deleted file mode 160000 index 9cc2f24..0000000 --- a/SDL2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9cc2f248f5437daaf090e3ef6afb4f6dc88068ac diff --git a/SDL_ttf b/SDL_ttf deleted file mode 160000 index 4a318f8..0000000 --- a/SDL_ttf +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4a318f8dfaa1bb6f10e0c5e54052e25d3c7f3440 diff --git a/build-image.sh b/build-image.sh index 9e4340b..9a89a6b 100755 --- a/build-image.sh +++ b/build-image.sh @@ -4,13 +4,5 @@ set -e DOCKERFILE="Dockerfile.$1.$2" -EXTRA_ARGS="--pull" -if [ "$1" == "aarch64" ] || [ "$1" == "rpi64" ] || [ "$1" == "l4t" ]; then - EXTRA_ARGS="$EXTRA_ARGS --platform linux/arm64" -elif [ "$1" == "armhf" ] || [ "$1" == "rpi" ]; then - EXTRA_ARGS="$EXTRA_ARGS --platform linux/arm/v7" -elif [ "$1" == "riscv64" ]; then - EXTRA_ARGS="$EXTRA_ARGS --platform linux/riscv64" -fi -docker buildx build $EXTRA_ARGS -f $DOCKERFILE -t cgutman/moonlight-packaging:"$1-$2_$3" . +docker buildx build --platform linux/arm64 -f $DOCKERFILE -t drho1y/moonlight-packaging:"$1-$2_$3" --load . diff --git a/build-single.sh b/build-single.sh index afcc00e..df65369 100755 --- a/build-single.sh +++ b/build-single.sh @@ -1,30 +1,16 @@ #!/usr/bin/env bash -TARGET_NAME="$1-$2" +TARGET_NAME="aarch64-bookworm" TAG_UNIQUE_ID=`(git ls-tree HEAD; git diff-index HEAD) | sha256sum | cut -c-16` TAG_NAME="${TARGET_NAME}_${TAG_UNIQUE_ID}" OUT_DIR="out_$TARGET_NAME" -docker pull cgutman/moonlight-packaging:$TAG_NAME -PULL_EXIT_CODE=$? - rm -rf $OUT_DIR set -e mkdir $OUT_DIR -if [ $PULL_EXIT_CODE -eq 0 ]; then - echo Using pre-built Docker image - cgutman/moonlight-packaging:$TAG_NAME -else - echo Pre-built image not available - building cgutman/moonlight-packaging:$TAG_NAME - ./build-image.sh $1 $2 $TAG_UNIQUE_ID - echo Built Docker image - cgutman/moonlight-packaging:$TAG_NAME -fi +./build-image.sh aarch64 bookworm $TAG_UNIQUE_ID -docker run --rm --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian -e COMMIT="$3" cgutman/moonlight-packaging:$TAG_NAME - -# Push the image now if we're building master in GitHub Actions -if [ $PULL_EXIT_CODE -ne 0 ] && [ "$GITHUB_REF" == "refs/heads/master" ]; then - docker push cgutman/moonlight-packaging:$TAG_NAME -fi \ No newline at end of file +docker run --rm --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian -e COMMIT="$3" drho1y/moonlight-packaging:$TAG_NAME diff --git a/dav1d b/dav1d deleted file mode 160000 index b546257..0000000 --- a/dav1d +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b546257f770768b2c88258c533da38b91a06f737 diff --git a/debian/rules b/debian/rules index 3b0d7d7..815ae04 100755 --- a/debian/rules +++ b/debian/rules @@ -10,6 +10,9 @@ endif %: dh $@ +override_dh_auto_build: + dh_auto_build --max-parallel=1 + override_dh_auto_configure: qmake6 PREFIX=/usr EXTRA_CONFIG moonlight-qt.pro diff --git a/do-release.sh b/do-release.sh deleted file mode 100755 index 55463e3..0000000 --- a/do-release.sh +++ /dev/null @@ -1,65 +0,0 @@ -fail() -{ - echo "$1" 1>&2 - exit 1 -} - -git diff-index --quiet HEAD -- || fail "Release builds must not have unstaged changes!" - -set -e - -# Build the packages -./build-single.sh l4t noble $1 & -./build-single.sh rpi trixie $1 & -./build-single.sh rpi64 trixie $1 & -wait -./build-single.sh aarch64 jammy $1 & -./build-single.sh riscv64 trixie $1 & -./build-single.sh armhf jammy $1 & -wait -./build-single.sh armhf trixie $1 & -./build-single.sh aarch64 trixie $1 & -./build-single.sh armhf noble $1 & -wait -./build-single.sh aarch64 noble $1 & -./build-single.sh rpi bookworm $1 & -./build-single.sh rpi64 bookworm $1 & -wait -./build-single.sh armhf bookworm $1 & -./build-single.sh aarch64 bookworm $1 & -./build-single.sh l4t jammy $1 & -wait - -# Push the moonlight-qt packages to Cloudsmith repos -cloudsmith push deb moonlight-game-streaming/moonlight-l4t/ubuntu/jammy out_l4t-jammy/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-l4t/ubuntu/noble out_l4t-noble/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/raspbian/trixie out_rpi-trixie/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/raspbian/bookworm out_rpi-bookworm/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/raspbian/trixie out_rpi64-trixie/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/raspbian/bookworm out_rpi64-bookworm/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/debian/bookworm out_armhf-bookworm/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/debian/trixie out_armhf-trixie/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/debian/bookworm out_aarch64-bookworm/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/debian/trixie out_aarch64-trixie/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/debian/trixie out_riscv64-trixie/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/ubuntu/jammy out_armhf-jammy/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/ubuntu/noble out_armhf-noble/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/ubuntu/jammy out_aarch64-jammy/moonlight-qt_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/ubuntu/noble out_aarch64-noble/moonlight-qt_*.deb - -# Push the moonlight-qt-dbgsym packages to Cloudsmith repos -cloudsmith push deb moonlight-game-streaming/moonlight-l4t/ubuntu/jammy out_l4t-jammy/moonlight-qt-dbgsym_*.ddeb -cloudsmith push deb moonlight-game-streaming/moonlight-l4t/ubuntu/noble out_l4t-noble/moonlight-qt-dbgsym_*.ddeb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/raspbian/bookworm out_rpi-bookworm/moonlight-qt-dbgsym_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/raspbian/trixie out_rpi-trixie/moonlight-qt-dbgsym_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/raspbian/bookworm out_rpi64-bookworm/moonlight-qt-dbgsym_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/raspbian/trixie out_rpi64-trixie/moonlight-qt-dbgsym_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/debian/bookworm out_armhf-bookworm/moonlight-qt-dbgsym_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/debian/trixie out_armhf-trixie/moonlight-qt-dbgsym_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/debian/bookworm out_aarch64-bookworm/moonlight-qt-dbgsym_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/debian/trixie out_aarch64-trixie/moonlight-qt-dbgsym_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/debian/trixie out_riscv64-trixie/moonlight-qt-dbgsym_*.deb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/ubuntu/jammy out_armhf-jammy/moonlight-qt-dbgsym_*.ddeb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/ubuntu/noble out_armhf-noble/moonlight-qt-dbgsym_*.ddeb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/ubuntu/jammy out_aarch64-jammy/moonlight-qt-dbgsym_*.ddeb -cloudsmith push deb moonlight-game-streaming/moonlight-qt/ubuntu/noble out_aarch64-noble/moonlight-qt-dbgsym_*.ddeb diff --git a/link b/link new file mode 100644 index 0000000..a3bd78c --- /dev/null +++ b/link @@ -0,0 +1 @@ +https://www.reddit.com/r/MoonlightStreaming/comments/1hyjqs7/slow_decoding_on_orange_pi_5/ diff --git a/push-images.sh b/push-images.sh deleted file mode 100755 index ef8369b..0000000 --- a/push-images.sh +++ /dev/null @@ -1,48 +0,0 @@ -fail() -{ - echo "$1" 1>&2 - exit 1 -} - -git diff-index --quiet HEAD -- || fail "Images must not be pushed with uncommitted changes!" - -set -e - -TAG_UNIQUE_ID=`git ls-tree HEAD | sha256sum | cut -c-16` - -./build-image.sh l4t noble $TAG_UNIQUE_ID & -./build-image.sh rpi trixie $TAG_UNIQUE_ID & -./build-image.sh rpi64 trixie $TAG_UNIQUE_ID & -wait -./build-image.sh aarch64 jammy $TAG_UNIQUE_ID & -./build-image.sh riscv64 trixie $TAG_UNIQUE_ID & -./build-image.sh armhf jammy $TAG_UNIQUE_ID & -wait -./build-image.sh armhf trixie $TAG_UNIQUE_ID & -./build-image.sh aarch64 trixie $TAG_UNIQUE_ID & -./build-image.sh armhf noble $TAG_UNIQUE_ID & -wait -./build-image.sh aarch64 noble $TAG_UNIQUE_ID & -./build-image.sh rpi bookworm $TAG_UNIQUE_ID & -./build-image.sh rpi64 bookworm $TAG_UNIQUE_ID & -wait -./build-image.sh armhf bookworm $TAG_UNIQUE_ID & -./build-image.sh aarch64 bookworm $TAG_UNIQUE_ID & -./build-image.sh l4t jammy $TAG_UNIQUE_ID & -wait - -docker push cgutman/moonlight-packaging:rpi-bookworm_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:rpi64-bookworm_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:rpi-trixie_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:rpi64-trixie_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:l4t-jammy_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:l4t-noble_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:armhf-bookworm_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:armhf-trixie_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:aarch64-bookworm_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:aarch64-trixie_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:armhf-jammy_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:armhf-noble_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:aarch64-jammy_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:aarch64-noble_$TAG_UNIQUE_ID -docker push cgutman/moonlight-packaging:riscv64-trixie_$TAG_UNIQUE_ID diff --git a/scripts/build-deps-ffmpeg.sh b/scripts/build-deps-ffmpeg.sh new file mode 100755 index 0000000..8016ef9 --- /dev/null +++ b/scripts/build-deps-ffmpeg.sh @@ -0,0 +1,88 @@ + +set -e + +BASE_FFMPEG_ARGS="--fatal-warnings --enable-pic --enable-static --disable-shared --disable-all --disable-vulkan --enable-avcodec --enable-swscale --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=av1 --enable-libdav1d --enable-decoder=libdav1d --enable-libdrm --enable-decoder=h264_v4l2m2m --enable-decoder=hevc_v4l2m2m --extra-cflags=-I/usr/include/libdrm" +USE_PLATFORM_FFMPEG=0 +RKMPP="--prefix=/usr --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga" + +echo "Building dependencies for $TARGET" + +# Build and install our SDL2 build +# Получаем все нужные пути через pkg-config автоматически +# Это добавит и FreeType, и HarfBuzz, и SDL2 +export CFLAGS="$(pkg-config --cflags freetype2 harfbuzz sdl2) -O2 -g" +export LDFLAGS="$(pkg-config --libs freetype2 harfbuzz sdl2)" +export CXXFLAGS="-O2 -g" + +cd /opt/SDL2 +./configure --enable-static --enable-shared --enable-video-kmsdrm --disable-video-rpi --disable-freetype-builtin --disable-harfbuzz-builtin +make -j8 +cat sdl2.pc +make install + +# Build and install SDL_ttf +# Since we'll be linking statically, we need to use Libs.private instead of Libs, but +# there's no way to tell QMake to use the Libs.private section, so we have to replace +# Libs with Libs.private ourselves prior to installation. + + +export CPPFLAGS="$(pkg-config --cflags freetype2 harfbuzz)" +export LDFLAGS="$(pkg-config --libs-only-L freetype2 harfbuzz)" +export LIBS="$(pkg-config --libs-only-l freetype2 harfbuzz)" + +cd /opt/SDL_ttf +./autogen.sh +./configure --enable-static --disable-shared --disable-freetype-builtin --disable-harfbuzz-builtin +make -j8 +sed -i 's/-lSDL2_ttf/-lSDL2_ttf -lfreetype/g' SDL2_ttf.pc +cat SDL2_ttf.pc +make install + +# Build MPP +cd /opt/rkmpp +mkdir rkmpp_build +cd rkmpp_build +cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TEST=OFF \ + .. +make -j8 +make install + +# Build RGA +cd /opt +meson setup rkrga rkrga_build \ + --prefix=/usr \ + --libdir=lib \ + --buildtype=release \ + --default-library=shared \ + -Dcpp_args=-fpermissive \ + -Dlibdrm=false \ + -Dlibrga_demo=false +meson configure rkrga_build +ninja -C rkrga_build install + +# Build FFmpeg and its dependencies if we're not using the platform version + +# Build and install libdav1d +cd /opt/dav1d +meson setup build -Ddefault_library=static -Dbuildtype=debugoptimized -Denable_tools=false -Denable_tests=false +ninja -C build +ninja install -C build + +# FFmpeg's architecture detection uses 'uname -m' which will be incorrect when +# natively executing a different hardware-compatible ABI (like armhf on aarch64 +# or i686 on x86_64). We have to override that detection ourselves here. +FFMPEG_ARCH=$(dpkg --print-architecture) +if [ "$FFMPEG_ARCH" == "armhf" ]; then + # Most dpkg architectures are handled by FFmpeg, but armhf is a special case + FFMPEG_ARCH=arm +fi + +# Build and install FFmpeg +cd /opt/ffmpeg +./configure --arch=$FFMPEG_ARCH $RKMPP $BASE_FFMPEG_ARGS $DAV1D_FFMPEG_ARGS #$EXTRA_FFMPEG_ARGS +make -j8 +make install diff --git a/scripts/build-deps.sh b/scripts/build-deps.sh index 7a23d5e..b3e1ea8 100755 --- a/scripts/build-deps.sh +++ b/scripts/build-deps.sh @@ -1,65 +1,40 @@ + set -e -BASE_FFMPEG_ARGS="--fatal-warnings --enable-pic --enable-static --disable-shared --disable-all --disable-vulkan --enable-avcodec --enable-swscale --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=av1 --enable-libdav1d --enable-decoder=libdav1d --enable-libdrm --enable-decoder=h264_v4l2m2m --enable-decoder=hevc_v4l2m2m --extra-cflags=-I/usr/include/libdrm" -USE_PLATFORM_FFMPEG=0 - -echo "Building dependencies for $TARGET" -if [ "$TARGET" == "rpi" ] || [ "$TARGET" == "rpi64" ]; then - # Use the platform-provided FFmpeg version on Raspberry Pi OS - USE_PLATFORM_FFMPEG=1 -elif [ "$TARGET" == "l4t" ]; then - # Enable NVV4L2 decoders (and VP9 decoder to work around compilation error in NVV4L2 fallback code) - EXTRA_FFMPEG_ARGS="--enable-nvv4l2 --enable-decoder=h264_nvv4l2 --enable-decoder=hevc_nvv4l2 --enable-decoder=vp9" -elif [ "$TARGET" == "desktop" ]; then - # Enable VAAPI and VDPAU decoders (TODO: Add Vulkan Video if we ever actually ship this for desktop platforms) - EXTRA_FFMPEG_ARGS="--enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-hwaccel=av1_vaapi --enable-hwaccel=h264_vdpau --enable-hwaccel=hevc_vdpau --enable-hwaccel=av1_vdpau" -elif [ "$TARGET" == "embedded" ]; then - # Enable stateless V4L2 support - EXTRA_FFMPEG_ARGS="--enable-v4l2-request --enable-hwaccel=h264_v4l2request --enable-hwaccel=hevc_v4l2request --enable-hwaccel=av1_v4l2request" -else - echo "Unrecognized target: $TARGET" - exit 1 -fi - # Build and install our SDL2 build cd /opt/SDL2 -./configure --enable-static --disable-shared --enable-video-kmsdrm --disable-video-rpi -make -j$(nproc) + +#export CFLAGS="-I/usr/include/freetype2 -O2 -g" +#export LDFLAGS="-L/usr/local/lib" +# Получаем все нужные пути через pkg-config автоматически +# Это добавит и FreeType, и HarfBuzz, и SDL2 +export CFLAGS="$(pkg-config --cflags freetype2 harfbuzz sdl2) -O2 -g" +export LDFLAGS="$(pkg-config --libs freetype2 harfbuzz sdl2)" +export CXXFLAGS="-O2 -g" + +./configure --enable-static --enable-shared --enable-video-kmsdrm --disable-video-rpi --disable-freetype-builtin --disable-harfbuzz-builtin +make -j8 cat sdl2.pc make install +export CPPFLAGS="$(pkg-config --cflags freetype2 harfbuzz)" +export LDFLAGS="$(pkg-config --libs-only-L freetype2 harfbuzz)" +export LIBS="$(pkg-config --libs-only-l freetype2 harfbuzz)" + # Build and install SDL_ttf # Since we'll be linking statically, we need to use Libs.private instead of Libs, but # there's no way to tell QMake to use the Libs.private section, so we have to replace # Libs with Libs.private ourselves prior to installation. cd /opt/SDL_ttf ./autogen.sh -./configure --enable-static --disable-shared -make -j$(nproc) +./configure --enable-static --disable-shared --disable-freetype-builtin --disable-harfbuzz-builtin +make -j8 sed -i 's/-lSDL2_ttf/-lSDL2_ttf -lfreetype/g' SDL2_ttf.pc cat SDL2_ttf.pc make install -# Build FFmpeg and its dependencies if we're not using the platform version -if [ "$USE_PLATFORM_FFMPEG" == "0" ]; then - # Build and install libdav1d - cd /opt/dav1d - meson setup build -Ddefault_library=static -Dbuildtype=debugoptimized -Denable_tools=false -Denable_tests=false - ninja -C build - ninja install -C build - - # FFmpeg's architecture detection uses 'uname -m' which will be incorrect when - # natively executing a different hardware-compatible ABI (like armhf on aarch64 - # or i686 on x86_64). We have to override that detection ourselves here. - FFMPEG_ARCH=$(dpkg --print-architecture) - if [ "$FFMPEG_ARCH" == "armhf" ]; then - # Most dpkg architectures are handled by FFmpeg, but armhf is a special case - FFMPEG_ARCH=arm - fi - - # Build and install FFmpeg - cd /opt/FFmpeg - ./configure --arch=$FFMPEG_ARCH $BASE_FFMPEG_ARGS $EXTRA_FFMPEG_ARGS $DAV1D_FFMPEG_ARGS - make -j$(nproc) - make install -fi +# Build and install libdav1d +cd /opt/dav1d +meson setup build -Ddefault_library=static -Dbuildtype=debugoptimized -Denable_tools=false -Denable_tests=false +ninja -C build +ninja install -C build diff --git a/scripts/build-package.sh b/scripts/build-package.sh index e506da8..cb79d38 100755 --- a/scripts/build-package.sh +++ b/scripts/build-package.sh @@ -1,31 +1,21 @@ + set -e # Check out the source without the Windows/Mac prebuilts -[[ ! -z "$COMMIT" ]] || COMMIT="master" +COMMIT="master" echo "Checking out $COMMIT" -git clone https://github.com/moonlight-stream/moonlight-qt.git -cd moonlight-qt -git checkout $COMMIT -git log -1 -git -c submodule.libs.update=none submodule update --init --recursive +#git clone https://git.byte-mate.ru/drholy/moonlight-qt.git +cd /opt/moonlight-qt +#git checkout $COMMIT +#git log -1 +#git -c submodule.libs.update=none submodule update --init --recursive + +ldconfig # Grab the verson metadata VERSION=`cat app/version.txt` -# Determine extra target-specific dependencies -if [ "$TARGET" == "rpi" ] || [ "$TARGET" == "rpi64" ]; then - EXTRA_CONFIG="CONFIG+=gpuslow CONFIG+=disable-mmal" - EXTRA_BUILD_DEPS="libavcodec-dev, libavformat-dev, libswscale-dev," -elif [ "$TARGET" == "l4t" ]; then - : -elif [ "$TARGET" == "desktop" ]; then - EXTRA_BUILD_DEPS="libva-dev, libvdpau-dev," -elif [ "$TARGET" == "embedded" ]; then - EXTRA_CONFIG="CONFIG+=gpuslow" -else - echo "Unrecognized target: $TARGET" - exit 1 -fi +EXTRA_CONFIG="CONFIG+=gpuslow" # Jammy requires libqt6opengl6-dev to use Qt Quick Controls if [ "$DISTRO" == "jammy" ]; then @@ -65,6 +55,16 @@ sed -i "s/EXTRA_CONFIG/$EXTRA_CONFIG/g" debian/rules cat debian/rules # Build the package +export DEB_BUILD_OPTIONS="parallel=1" +export DEB_CFLAGS_APPEND="-O1" +export DEB_CXXFLAGS_APPEND="-O1" +# Указываем pkg-config искать библиотеки в папках, куда мы их ставили +export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/aarch64-linux-gnu/pkgconfig +# Помогаем линковщику найти сами файлы .a / .so +export LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib $LDFLAGS" +export LIBS="-lharfbuzz $LIBS" +export CPPFLAGS="-I/usr/local/include $CPPFLAGS" +ldconfig debuild -us -uc # Copy the output to the out directory diff --git a/scripts/install-base-deps.sh b/scripts/install-base-deps.sh index e87391c..2b6b554 100755 --- a/scripts/install-base-deps.sh +++ b/scripts/install-base-deps.sh @@ -3,8 +3,12 @@ set -e export DEBIAN_FRONTEND=noninteractive apt-get update -apt-get install -y curl g++ make ninja-build devscripts fakeroot debhelper git nasm libgbm-dev libdrm-dev libasound2-dev libdbus-1-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libibus-1.0-dev libpulse-dev libudev-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev cmake libgl-dev meson wayland-protocols libwayland-dev libdecor-0-dev libfreetype-dev libpipewire-0.3-dev -apt-get install -y --no-install-recommends libssl-dev qt6-base-dev qt6-declarative-dev libqt6svg6-dev libopus-dev gnupg +apt-get install -y --no-install-recommends \ +python3-requests python3-urllib3 libgdk-pixbuf-2.0-0 && \ +apt-get install -f -y && \ +dpkg --configure -a +apt-get install -f -y autoconf curl g++ make ninja-build devscripts fakeroot debhelper git nasm libgbm-dev libdrm-dev libasound2-dev libdbus-1-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libibus-1.0-dev libpulse-dev libudev-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev cmake libgl-dev meson wayland-protocols libwayland-dev libdecor-0-dev libfreetype-dev libfreetype6-dev libharfbuzz-dev libpipewire-0.3-dev +apt-get install -f -y --no-install-recommends libssl-dev qt6-base-dev qt6-declarative-dev libqt6svg6-dev libopus-dev gnupg # Install FFmpeg if we're using the OS-provided version if [ "$TARGET" == "rpi" ] || [ "$TARGET" == "rpi64" ]; then