aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/windows-msys2.yml
blob: a25fc74fa89299950d6b6592605116cccb2bf06c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Windows MSYS2 Build
on: [push, pull_request]

jobs:
  build:
    runs-on: windows-latest
    defaults:
      run:
        shell: msys2 {0}
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - uses: msys2/setup-msys2@v2
        with:
          msystem: MINGW64
          update: true
          install: >-
            git mingw-w64-x86_64-toolchain mingw-w64-x86_64-ninja mingw-w64-x86_64-cmake tree
            mingw-w64-x86_64-qt5
            mingw-w64-x86_64-glfw mingw-w64-x86_64-glew mingw-w64-x86_64-freetype mingw-w64-x86_64-devil mingw-w64-x86_64-freeglut mingw-w64-x86_64-zlib mingw-w64-x86_64-rtmidi
      - name: Build fluidsynth-sans-glib
        id: build-fluidsynth-sans-glib
        continue-on-error: true
        run: |
          # no longer need mingw-w64-x86_64-fluidsynth and libglib-2.0-0.dll then.
          mkdir dept_workspace && cd dept_workspace
          git clone --depth=1 https://github.com/chirs241097/fluidsynth-sans-glib.git
          cd fluidsynth-sans-glib && mkdir build && cd build
          cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=$MINGW_PREFIX
          cmake --build . --target install
          cd ../../../
      - name: Install mingw-w64-x86_64-fluidsynth if needed
        if: steps.build-fluidsynth-sans-glib.outcome == 'failure'
        run: |
          pacman --noconfirm -S mingw-w64-x86_64-fluidsynth
      - name: Build qmidiplayer
        run: |
          mkdir build && cd build
          cmake .. -G Ninja
          cmake --build .
          tree
          cd ..
      - name: package qmidiplayer
        continue-on-error: true
        run: |
          mkdir package_workspace && cd package_workspace
          cp ../build/qmidiplayer-desktop/qmidiplayer.exe ./
          windeployqt -winextras --no-quick-import --no-translations --no-opengl-sw --no-angle --no-system-d3d-compiler ./qmidiplayer.exe
          # direct depts
          cp $MINGW_PREFIX/bin/libfluidsynth-*.dll ./
          cp $MINGW_PREFIX/bin/librtmidi*.dll ./
          cp $MINGW_PREFIX/bin/libportaudio-2.dll ./
          # standalone visualization renderer
          cp ../build/visualization/renderer/qmpvisrender.exe ./
          # copy plugins
          mkdir plugins
          cp ../build/midifmt-plugin/libmidifmt-plugin.dll ./plugins/
          cp ../build/simple-visualization/libsimple-visualization.dll ./plugins/
          cp ../build/visualization/libvisualization.dll ./plugins/
          cp ../build/sample-plugin/libsampleplugin.dll ./plugins/
          cp ../build/windows-extra/libwindowsextra.dll ./plugins/
          # visualization plugin depts
          cp $MINGW_PREFIX/bin/glfw3.dll ./
          cp $MINGW_PREFIX/bin/glew32.dll ./
          cp $MINGW_PREFIX/bin/zlib1.dll ./
          cp $MINGW_PREFIX/bin/libfreetype-*.dll ./
          cp $MINGW_PREFIX/bin/libdeflate.dll ./
          cp $MINGW_PREFIX/bin/libwebp-*.dll ./
          cp $MINGW_PREFIX/bin/libtiff-*.dll ./
          cp $MINGW_PREFIX/bin/libIL.dll ./
          cp $MINGW_PREFIX/bin/libHalf-*.dll ./
          cp $MINGW_PREFIX/bin/libIlmImf-*.dll ./
          cp $MINGW_PREFIX/bin/libjasper-*.dll ./
          cp $MINGW_PREFIX/bin/libjpeg-*.dll ./
          cp $MINGW_PREFIX/bin/liblcms2-*.dll ./
          cp $MINGW_PREFIX/bin/libsquish.dll ./
          cp $MINGW_PREFIX/bin/libtiff-*.dll ./
          cp $MINGW_PREFIX/bin/libIex-*.dll ./
          cp $MINGW_PREFIX/bin/libIlmThread-*.dll ./
          cp $MINGW_PREFIX/bin/libImath-*.dll ./
          cp $MINGW_PREFIX/bin/libgomp-*.dll ./
          cp $MINGW_PREFIX/bin/liblzma-*.dll ./
          # some other dlls
          cp $MINGW_PREFIX/bin/libgcc_s_seh-1.dll ./
          cp $MINGW_PREFIX/bin/libwinpthread-1.dll ./
          cp $MINGW_PREFIX/bin/libstdc++-*.dll ./
          cp $MINGW_PREFIX/bin/libintl-*.dll ./
          cp $MINGW_PREFIX/bin/libpng16-*.dll ./
          cp $MINGW_PREFIX/bin/libsndfile-1.dll ./
          cp $MINGW_PREFIX/bin/libreadline8.dll ./
          cp $MINGW_PREFIX/bin/libpcre2-16-0.dll ./
          cp $MINGW_PREFIX/bin/libpcre-1.dll ./
          cp $MINGW_PREFIX/bin/libharfbuzz-0.dll ./
          cp $MINGW_PREFIX/bin/libdouble-conversion.dll ./
          cp $MINGW_PREFIX/bin/libicuuc[!d]*.dll ./
          cp $MINGW_PREFIX/bin/libicudt[!d]*.dll ./
          cp $MINGW_PREFIX/bin/libicuin[!d]*.dll ./
          cp $MINGW_PREFIX/bin/libzstd.dll ./
          cp $MINGW_PREFIX/bin/libFLAC-*.dll ./
          cp $MINGW_PREFIX/bin/libogg-0.dll ./
          cp $MINGW_PREFIX/bin/libtermcap-0.dll ./
          cp $MINGW_PREFIX/bin/libopus-0.dll ./
          cp $MINGW_PREFIX/bin/libvorbis-0.dll ./
          cp $MINGW_PREFIX/bin/libvorbis-0.dll ./
          cp $MINGW_PREFIX/bin/libvorbisenc-2.dll ./
          cp $MINGW_PREFIX/bin/libgraphite2.dll ./
          cp $MINGW_PREFIX/bin/libiconv-2.dll ./
          cp $MINGW_PREFIX/bin/libbz2-1.dll ./
          cp $MINGW_PREFIX/bin/libbrotlidec.dll ./
          cp $MINGW_PREFIX/bin/libbrotlicommon.dll ./
          # license file
          cp ../COPYING ./
          # done
          cd ../
      - name: install libglib-2.0-*.dll if needed
        if: steps.build-fluidsynth-sans-glib.outcome == 'failure'
        run: |
          cd package_workspace
          cp $MINGW_PREFIX/bin/libglib-2.0-*.dll ./
      - uses: actions/upload-artifact@v2
        with:
          name: msys2-mingw-w64-x86_64-windows
          path: package_workspace/*