Merge remote-tracking branch 'origin/master' into prerelease #149
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: build | |
| on: | |
| push: | |
| branches: | |
| - release | |
| - prerelease | |
| - test | |
| jobs: | |
| build-mac: | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| brew update | |
| brew install ninja mpv qt@5 || true | |
| - name: Release build | |
| run: | | |
| mkdir build | |
| sed -i '' 's|await loadScript('\''qrc:///qtwebchannel/qwebchannel.js'\'');|document.body.style.overscrollBehavior = "none";&|g' native/nativeshell.js | |
| cd build | |
| cmake -GNinja -DQTROOT=/usr/local/opt/qt@5 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output .. | |
| ninja install | |
| - name: Fix library paths and create dmg | |
| run: | | |
| python3 ./scripts/fix-install-names.py ./build/output/Jellyfin\ Media\ Player.app | |
| python3 ./scripts/fix-webengine.py ./build/output/Jellyfin\ Media\ Player.app | |
| codesign --force --deep -s - ./build/output/Jellyfin\ Media\ Player.app/ | |
| brew install create-dmg | |
| attempts=0 | |
| while [[ "$attempts" -lt 10 ]] | |
| do | |
| attempts=$((attempts+1)) | |
| create-dmg --volname "Jellyfin Media Player" --no-internet-enable "JellyfinMediaPlayer.dmg" "./build/output/Jellyfin Media Player.app" && break || echo "dmg create failed, retrying..." | |
| sleep 5 | |
| done | |
| if ! [[ -e JellyfinMediaPlayer.dmg ]] | |
| then | |
| echo "Failed to create dmg after 10 attempts" | |
| exit 1 | |
| fi | |
| - name: Archive production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos | |
| path: ${{ github.workspace }}/JellyfinMediaPlayer.dmg | |
| build-macarm64: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| brew update | |
| brew install ninja mpv qt@5 || true | |
| - name: Release build | |
| run: | | |
| mkdir build | |
| sed -i '' 's|await loadScript('\''qrc:///qtwebchannel/qwebchannel.js'\'');|document.body.style.overscrollBehavior = "none";&|g' native/nativeshell.js | |
| cd build | |
| cmake -GNinja -DQTROOT=/opt/homebrew/opt/qt@5 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output .. | |
| ninja install | |
| - name: Fix library paths and create dmg | |
| run: | | |
| python3 ./scripts/fix-install-names.py ./build/output/Jellyfin\ Media\ Player.app | |
| python3 ./scripts/fix-webengine.py ./build/output/Jellyfin\ Media\ Player.app | |
| codesign --force --deep -s - ./build/output/Jellyfin\ Media\ Player.app/ | |
| brew install create-dmg | |
| create-dmg --volname "Jellyfin Media Player" --no-internet-enable "JellyfinMediaPlayer.dmg" "./build/output/Jellyfin Media Player.app" | |
| - name: Archive production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-arm64 | |
| path: ${{ github.workspace }}/JellyfinMediaPlayer.dmg | |
| build-win64-legacy: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Qt 5.15.2 | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: "5.15.2" | |
| arch: "win64_msvc2019_64" | |
| modules: "qtwebengine" | |
| - name: Install dependencies | |
| run: | | |
| mkdir build | |
| curl -L https://aka.ms/vs/17/release/vc_redist.x64.exe > vc_redist.x64.exe | |
| sed -i 's#C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Redist\\MSVC\\v142\\vcredist_x64.exe#'"$(readlink -f vc_redist.x64.exe | sed 's#/\([a-z]\)/#\1:\\#g' | tr '/' '\\' | sed 's/\\/\\\\/g')#g" bundle/win/Bundle.wxs | |
| curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip > ninja.zip | |
| unzip ninja.zip | |
| mv ninja.exe build/ | |
| curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20240304-git-9ac791c.7z/download > mpv.7z | |
| 7z x mpv.7z | |
| mkdir mpv | |
| mv include mpv | |
| gendef libmpv-2.dll | |
| mv libmpv-2.dll mpv/libmpv-2.dll | |
| mv libmpv-2.def mpv.def | |
| mv mpv.def libmpv.dll.a mpv/ | |
| mv mpv build/ | |
| shell: bash | |
| - name: Build | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
| cd build | |
| set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD% | |
| cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt5_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output .. | |
| lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X64 | |
| ninja | |
| ninja windows_package | |
| shell: cmd | |
| - name: Archive production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-legacy64 | |
| path: ${{ github.workspace }}/build/JellyfinMediaPlayer-*.exe | |
| build-win64: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Qt 5.15.2 | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: "5.15.2" | |
| arch: "win64_msvc2019_64" | |
| modules: "qtwebengine" | |
| - name: Install dependencies | |
| run: | | |
| mkdir build | |
| curl -L https://aka.ms/vs/17/release/vc_redist.x64.exe > vc_redist.x64.exe | |
| sed -i 's#C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Redist\\MSVC\\v142\\vcredist_x64.exe#'"$(readlink -f vc_redist.x64.exe | sed 's#/\([a-z]\)/#\1:\\#g' | tr '/' '\\' | sed 's/\\/\\\\/g')#g" bundle/win/Bundle.wxs | |
| curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip > ninja.zip | |
| unzip ninja.zip | |
| mv ninja.exe build/ | |
| curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-v3-20240304-git-9ac791c.7z/download > mpv.7z | |
| 7z x mpv.7z | |
| mkdir mpv | |
| mv include mpv | |
| gendef libmpv-2.dll | |
| mv libmpv-2.dll mpv/libmpv-2.dll | |
| mv libmpv-2.def mpv.def | |
| mv mpv.def libmpv.dll.a mpv/ | |
| mv mpv build/ | |
| shell: bash | |
| - name: Build | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
| cd build | |
| set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD% | |
| cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt5_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output .. | |
| lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X64 | |
| ninja | |
| ninja windows_package | |
| shell: cmd | |
| - name: Archive production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows | |
| path: ${{ github.workspace }}/build/JellyfinMediaPlayer-*.exe | |
| build-win32: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Qt 5.15.2 | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: "5.15.2" | |
| arch: "win32_msvc2019" | |
| modules: "qtwebengine" | |
| - name: Install dependencies | |
| run: | | |
| mkdir build | |
| curl -L https://aka.ms/vs/17/release/vc_redist.x86.exe > vc_redist.x86.exe | |
| sed -i 's#C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Redist\\MSVC\\v142\\vcredist_x64.exe#'"$(readlink -f vc_redist.x86.exe | sed 's#/\([a-z]\)/#\1:\\#g' | tr '/' '\\' | sed 's/\\/\\\\/g')#g" bundle/win/Bundle.wxs | |
| curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip > ninja.zip | |
| unzip ninja.zip | |
| mv ninja.exe build/ | |
| curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-i686-20240304-git-9ac791c.7z/download > mpv.7z | |
| 7z x mpv.7z | |
| mkdir mpv | |
| mv include mpv | |
| gendef libmpv-2.dll | |
| mv libmpv-2.dll mpv/libmpv-2.dll | |
| mv libmpv-2.def mpv.def | |
| mv mpv.def libmpv.dll.a mpv/ | |
| mv mpv build/ | |
| shell: bash | |
| - name: Build | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat" | |
| cd build | |
| set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD% | |
| cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt5_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output .. | |
| lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X86 | |
| ninja | |
| ninja windows_package | |
| shell: cmd | |
| - name: Archive production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-legacy32 | |
| path: ${{ github.workspace }}/build/JellyfinMediaPlayer-*.exe | |
| build-ubuntu: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| tag: [oracular, noble, jammy] | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --yes gnupg debsigs devscripts | |
| - name: Docker Build | |
| run: | | |
| docker build -f deployment/Dockerfile.debian -t builddeb --build-arg TAG=${{ matrix.tag }} --build-arg IMG=ubuntu deployment | |
| docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e TAG=${{ matrix.tag }} -e IMG=ubuntu builddeb | |
| sudo chown --recursive $USER $(pwd)/deployment/dist | |
| - name: Archive production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ubuntu-${{ matrix.tag }} | |
| path: ${{ github.workspace }}/deployment/dist/* | |
| build-debian: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| tag: [bookworm, trixie] | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --yes gnupg debsigs devscripts | |
| - name: Docker Build | |
| run: | | |
| docker build -f deployment/Dockerfile.debian -t builddeb --build-arg TAG=${{ matrix.tag }} --build-arg IMG=debian deployment | |
| docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e TAG=${{ matrix.tag }} -e IMG=debian builddeb | |
| sudo chown --recursive $USER $(pwd)/deployment/dist | |
| - name: Archive production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: debian-${{ matrix.tag }} | |
| path: ${{ github.workspace }}/deployment/dist/* |