|
35 | 35 | - name: Install dependencies |
36 | 36 | run: yarn --frozen-lockfile |
37 | 37 |
|
| 38 | + ###################### |
| 39 | + # Patch SnoreToast to fix App ID - see https://github.com/th-ch/youtube-music/issues/479#issuecomment-965473559 |
| 40 | + - name: SnoreToast - parameters |
| 41 | + id: snoretoast-params |
| 42 | + if: startsWith(matrix.os, 'windows') |
| 43 | + shell: bash |
| 44 | + run: | |
| 45 | + echo "::set-output name=version::v0.8.0" |
| 46 | + echo "::set-output name=path::./vendor/snoretoast" |
| 47 | +
|
| 48 | + - name: SnoreToast - cache |
| 49 | + id: snoretoast-cache |
| 50 | + uses: actions/cache@v2 |
| 51 | + if: startsWith(matrix.os, 'windows') |
| 52 | + with: |
| 53 | + path: ${{ steps.snoretoast-params.outputs.path }} |
| 54 | + key: snoretoast-${{ steps.snoretoast-params.outputs.version }} |
| 55 | + |
| 56 | + - name: SnoreToast - compile |
| 57 | + if: | |
| 58 | + startsWith(matrix.os, 'windows') && |
| 59 | + steps.snoretoast-cache.outputs.cache-hit != 'true' |
| 60 | + shell: bash |
| 61 | + run: | |
| 62 | + SNORETOAST_TAG="${{ steps.snoretoast-params.outputs.version }}" |
| 63 | + echo "Compiling SnoreToast $SNORETOAST_TAG" |
| 64 | +
|
| 65 | + git config --global user.email "th-ch@users.noreply.github.com" |
| 66 | + git config --global user.name "YouTube Music" |
| 67 | + git clone -c advice.detachedHead=false --branch $SNORETOAST_TAG --depth 1 https://github.com/KDE/snoretoast.git ${{ steps.snoretoast-params.outputs.path }} |
| 68 | + cd ${{ steps.snoretoast-params.outputs.path }} |
| 69 | +
|
| 70 | + # Apply https://github.com/KDE/snoretoast/pull/15/commits/c5faeceaf36f4b9fb27e5269990b716a25ecbe43 |
| 71 | + # Patch generated with `git format-patch -1 c5faeceaf36f4b9fb27e5269990b716a25ecbe43` |
| 72 | + git am < ../snoretoast-patch/0001-Fix-activation-not-writing-to-pipe.patch |
| 73 | +
|
| 74 | + # Compile for win32 |
| 75 | + cmake -A Win32 -B build32 |
| 76 | + cmake --build build32 --config Release |
| 77 | +
|
| 78 | + # Compile for x64 |
| 79 | + cmake -A x64 -B build64 |
| 80 | + cmake --build build64 --config Release |
| 81 | +
|
| 82 | + - name: SnoreToast - overwrite with custom build |
| 83 | + if: startsWith(matrix.os, 'windows') |
| 84 | + shell: bash |
| 85 | + run: | |
| 86 | + # Override SnoreToast with the patched versions |
| 87 | + cp ${{ steps.snoretoast-params.outputs.path }}/build32/bin/Release/snoretoast.exe ./node_modules/node-notifier/vendor/snoreToast/snoretoast-x86.exe |
| 88 | + cp ${{ steps.snoretoast-params.outputs.path }}/build64/bin/Release/snoretoast.exe ./node_modules/node-notifier/vendor/snoreToast/snoretoast-x64.exe |
| 89 | + # End of SnoreToast patch |
| 90 | + ###################### |
| 91 | + |
38 | 92 | - name: Test |
39 | 93 | uses: GabrielBB/xvfb-action@v1 |
40 | 94 | with: |
|
0 commit comments