Repository navigation
230 lines (209 loc) · 8.71 KB
/
Copy pathmingw.yml
File metadata and controls
230 lines (209 loc) · 8.71 KB
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# Author: Kang Lin <kl222@126.com>
name: mingw
on:
workflow_call:
outputs:
name:
description: "The artifact name"
value: ${{ jobs.build_mingw.outputs.name }}
jobs:
build_mingw:
strategy:
matrix:
BUILD_TYPE: [Release]
defaults:
run:
shell: cmd
# See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)
# See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job)
# See: https://github.com/actions/runner-images/
runs-on: windows-latest
env:
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
BUILD_DIR: ${{github.workspace}}/build
SOURCE_DIR: ${{github.workspace}}\.cache\source
TOOLS_DIR: ${{github.workspace}}\.cache\tools
INSTALL_DIR: ${{github.workspace}}\.cache\install
RabbitRemoteControl_VERSION: v0.1.0-dev
artifact_name: build_mingw
MSYSTEM: CLANG64
MSYSTEM_PREFIX: C:\msys64\clang64
# Map the job outputs to step outputs
outputs:
name: ${{ env.artifact_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: pacman
run: |
C:\msys64\usr\bin\pacman.exe -Syu --noconfirm
C:\msys64\usr\bin\pacman.exe -S --noconfirm ^
mingw-w64-clang-x86_64-cmake ^
mingw-w64-clang-x86_64-ninja ^
mingw-w64-clang-x86_64-nsis ^
mingw-w64-clang-x86_64-gcc ^
mingw-w64-clang-x86_64-qt6 ^
mingw-w64-clang-x86_64-zlib ^
mingw-w64-clang-x86_64-openssl ^
mingw-w64-clang-x86_64-libvncserver ^
mingw-w64-clang-x86_64-cyrus-sasl ^
mingw-w64-clang-x86_64-pixman ^
mingw-w64-clang-x86_64-libjpeg-turbo ^
mingw-w64-clang-x86_64-libpng ^
mingw-w64-clang-x86_64-yasm ^
mingw-w64-clang-x86_64-openh264 ^
mingw-w64-clang-x86_64-freerdp ^
mingw-w64-clang-x86_64-qxmpp ^
mingw-w64-clang-x86_64-cmark ^
mingw-w64-clang-x86_64-git base-devel
- name: make_directory
run: |
cmake -E make_directory ${{env.BUILD_DIR}}
cmake -E make_directory ${{env.SOURCE_DIR}}
cmake -E make_directory ${{env.TOOLS_DIR}}
cmake -E make_directory ${{env.INSTALL_DIR}}
- name: Cache installed
uses: actions/cache@v5
id: cache-installed
with:
path: |
${{env.INSTALL_DIR}}
key: install_mingw_${{matrix.BUILD_TYPE}}
- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
run: |
git clone https://github.com/KangLin/RabbitCommon.git
# - name: Build FreeRDP
# working-directory: ${{env.SOURCE_DIR}}
# env:
# MSYSTEM: MINGW64
# PATH: C:\msys64\clang64\bin;C:\msys64\usr\bin
# run: |
# IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\FreeRDP3 (
# git clone https://github.com/FreeRDP/FreeRDP.git
# ;git clone https://github.com/KangLin/FreeRDP.git
# cd FreeRDP
# ;git checkout -b 0b16fcef18c9ec0f5ffb14c3d9357fe8acdf7658 0b16fcef18c9ec0f5ffb14c3d9357fe8acdf7658
# git submodule update --init --recursive
# cmake -E make_directory build
# cd build
# cmake .. ^
# -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
# -DCMAKE_INSTALL_PREFIX="${{env.INSTALL_DIR}}" ^
# -DWITH_SERVER=ON ^
# -DCHANNEL_URBDRC=OFF ^
# -DUSE_UNWIND=OFF
# cmake --build . --config ${{matrix.BUILD_TYPE}}
# cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
# )
- name: build RabbitVNC
if: false
env:
PATH: C:\msys64\clang64\bin;C:\msys64\usr\bin
working-directory: ${{env.SOURCE_DIR}}
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\RabbitVNC (
git clone --depth=1 https://github.com/KangLin/RabbitVNC.git
cd RabbitVNC
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} ^
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
)
- name: build tigervnc
working-directory: ${{env.SOURCE_DIR}}
env:
PATH: C:\msys64\clang64\bin;C:\msys64\usr\bin
if: false
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\tigervnc (
git clone --depth=1 https://github.com/KangLin/tigervnc.git
cd tigervnc
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} ^
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF ^
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
)
- name: build libdatachannel
if: false
env:
PATH: C:\msys64\clang64\bin;C:\msys64\usr\bin
working-directory: ${{env.SOURCE_DIR}}
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\LibDataChannel (
git clone -b v0.21.1 --depth=1 https://github.com/paullouisageneau/libdatachannel.git
cd libdatachannel
git submodule update --init --recursive
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} ^
-DNO_EXAMPLES=ON -DNO_TESTS=ON -DNO_WEBSOCKET=ON
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
)
- name: build QtService
if: false
env:
PATH: C:\msys64\clang64\bin;C:\msys64\usr\bin
working-directory: ${{env.SOURCE_DIR}}
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}/lib/cmake/QtService (
git clone --depth=1 "https://github.com/KangLin/qt-solutions.git"
cd qt-solutions/qtservice
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}}
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
)
- name: build RabbitRemoteControl
working-directory: ${{env.BUILD_DIR}}
env:
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon
PATH: C:\msys64\clang64\bin;C:\msys64\usr\bin
run: |
cmake ${{github.workspace}} ^
-DCMARK_SHARED=OFF ^
-DCMARK_TESTS=OFF ^
-DCMARK_STATIC=ON ^
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{env.BUILD_DIR}}/install ^
-DBUILD_FREERDP=ON ^
-DBUILD_LibVNCServer=ON ^
-DBUILD_RABBITVNC=OFF ^
-DRabbitVNC_DIR=${{env.INSTALL_DIR}}/lib/cmake/RabbitVNC ^
-Dtigervnc_DIR=${{env.INSTALL_DIR}}/lib/cmake ^
-DBUILD_SERVICE=OFF ^
-DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}}
cmake --build . --config ${{ matrix.BUILD_TYPE }}
- name: Package
if: false # ${{ matrix.BUILD_TYPE == 'Release' }}
working-directory: ${{env.BUILD_DIR}}
run: |
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
move /Y install\plugins\*crypto*.dll install\bin
move /Y install\plugins\*ssl*.dll install\bin
copy /Y C:\msys64\clang64\bin\*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\bin\*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\lib\*.dll install\bin
makensis ${{env.BUILD_DIR}}/Windows.nsi
md5sum RabbitRemoteControl_setup_${{env.RabbitRemoteControl_VERSION}}.exe > RabbitRemoteControl_setup_${{env.RabbitRemoteControl_VERSION}}.exe.md5
# - name: Update artifact
# if: ${{ matrix.BUILD_TYPE == 'Release' }}
# uses: actions/upload-artifact@v4
# with:
# name: ${{ env.artifact_name }}
# path: |
# ${{github.workspace}}/build/RabbitRemoteControl_Setup_${{env.RabbitRemoteControl_VERSION}}.exe