|
| 1 | +name: Build Windows Package - noyt |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + release: |
| 6 | + types: [published] |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + strategy: |
| 11 | + fail-fast: false |
| 12 | + matrix: |
| 13 | + config: |
| 14 | + - { arch: 'x64', 'portable': false } |
| 15 | + |
| 16 | + runs-on: windows-latest |
| 17 | + env: |
| 18 | + PORTABLE: ${{ matrix.config.portable }} |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Checkout |
| 22 | + run: git clone https://github.com/smplayer-dev/smplayer-build.git . |
| 23 | + |
| 24 | + - name: Install sources (normal) |
| 25 | + uses: actions/checkout@v4 |
| 26 | + with: |
| 27 | + path: packages/smplayer |
| 28 | + fetch-depth: 0 |
| 29 | + |
| 30 | + - name: Patch |
| 31 | + shell: bash |
| 32 | + run: sed -i 's/^DEFINES += YOUTUBE_SUPPORT$/#DEFINES += YOUTUBE_SUPPORT/' packages/smplayer/src/smplayer.pro |
| 33 | + |
| 34 | + - name: Install themes |
| 35 | + run: | |
| 36 | + git clone --depth 1 https://github.com/smplayer-dev/smplayer-themes.git packages\smplayer-themes |
| 37 | + git clone --depth 1 https://github.com/smplayer-dev/smplayer-skins.git packages\smplayer-skins |
| 38 | +
|
| 39 | + - name: Install mplayer and mpv |
| 40 | + run: .\uncompress_players.cmd |
| 41 | + |
| 42 | + - name: Install Qt (64 bit) |
| 43 | + uses: jurplel/install-qt-action@v3 |
| 44 | + with: |
| 45 | + version: '5.15.2' |
| 46 | + arch: 'win64_mingw81' |
| 47 | + #tools: 'tools_mingw,8.1.0-1,qt.tools.win64_mingw810' |
| 48 | + tools: 'tools_mingw,qt.tools.win64_mingw810' |
| 49 | + |
| 50 | + - name: Set mingw32 path (64 bit) |
| 51 | + run: echo "$env:IQTA_TOOLS\mingw810_64\bin\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| 52 | + |
| 53 | + - name: Compile themes |
| 54 | + run: .\compile_themes.cmd |
| 55 | + |
| 56 | + - name: Compile smplayer |
| 57 | + run: .\compile_smplayer.cmd |
| 58 | + |
| 59 | + - name: Install |
| 60 | + run: .\install.cmd |
| 61 | + |
| 62 | + - name: Create installer |
| 63 | + run: | |
| 64 | + .\nsis.cmd |
| 65 | + $filename = Get-Content packages\BUILD\installer_filename.txt -TotalCount 1 |
| 66 | + echo "PACKAGEFILENAME=$filename" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
| 67 | +
|
| 68 | + - name: Rename installer |
| 69 | + shell: bash |
| 70 | + run: | |
| 71 | + installer=${{env.PACKAGEFILENAME}} |
| 72 | + filename=${installer/.exe/-noyt.exe} |
| 73 | + mv packages/BUILD/output/$installer packages/BUILD/output/$filename |
| 74 | + echo "PACKAGEFILENAME=$filename" >> $GITHUB_ENV |
| 75 | +
|
| 76 | + - name: Create artifact |
| 77 | + if: github.event_name != 'release' |
| 78 | + uses: actions/upload-artifact@v4 |
| 79 | + with: |
| 80 | + name: ${{ env.PACKAGEFILENAME }} |
| 81 | + path: packages\BUILD\output\${{ env.PACKAGEFILENAME }} |
| 82 | + |
| 83 | + - name: Upload package to release |
| 84 | + if: github.event_name == 'release' |
| 85 | + uses: svenstaro/upload-release-action@v2 |
| 86 | + with: |
| 87 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 88 | + file: packages/BUILD/output/${{ env.PACKAGEFILENAME }} |
| 89 | + tag: ${{ github.ref }} |
| 90 | + overwrite: true |
| 91 | + file_glob: true |
0 commit comments