-
-
Notifications
You must be signed in to change notification settings - Fork 79
484 lines (449 loc) · 22.4 KB
/
msvc.yml
File metadata and controls
484 lines (449 loc) · 22.4 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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# Author: Kang Lin <kl222@126.com>
name: msvc
on:
workflow_call:
outputs:
name:
description: "The artifact name"
value: ${{ jobs.build_msvc.outputs.name }}
jobs:
build_msvc:
strategy:
matrix:
BUILD_TYPE: [Release, Debug]
qt_version: [6.9.1, 5.15.2, 5.12.12]
include:
- qt_version: 6.9.1
qt_arch: win64_msvc2022_64
qt_modules: qtscxml qtmultimedia qtimageformats qtserialport qt5compat qtwebsockets
CMAKE_GENERATOR_PLATFORM: x64
VCPKG_TARGET_TRIPLET: x64-windows
VCPKG_PLATFORM_TOOLSET: v143
- qt_version: 5.15.2
qt_arch: win64_msvc2019_64
CMAKE_GENERATOR_PLATFORM: x64
VCPKG_TARGET_TRIPLET: x64-windows
VCPKG_PLATFORM_TOOLSET: v143
VCPKG_OVERLAY_PORTS: "vcpkg/ports"
- qt_version: 5.12.12
qt_arch: win32_msvc2017
CMAKE_GENERATOR_PLATFORM: Win32
VCPKG_TARGET_TRIPLET: x86-windows
VCPKG_PLATFORM_TOOLSET: v143
VCPKG_OVERLAY_PORTS: "vcpkg/ports"
# 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_DIR: ${{github.workspace}}/build
SOURCE_DIR: ${{github.workspace}}\.cache\source
TOOLS_DIR: ${{github.workspace}}\.cache\tools
INSTALL_DIR: ${{github.workspace}}\.cache\install
VCPKGGITCOMMITID: 0cf34c184ce990471435b5b9c92edcf7424930b1
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
VCPKG_OVERLAY_PORTS: "${{github.workspace}}/${{matrix.VCPKG_OVERLAY_PORTS}}"
VCPKG_MANIFEST_FEATURES: "freerdp;vnc"
CMAKE_GENERATOR: "Visual Studio 17 2022"
CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}}
qt_modules: ${{matrix.qt_modules}}
artifact_name: build_msvc
RabbitRemoteControl_VERSION: v0.0.36
# Map the job outputs to step outputs
outputs:
name: ${{ env.artifact_name }}
defaults:
run:
shell: cmd
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
# fetch-depth: 0
- name: run depley.sh
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
shell: bash
run: |
echo "RabbitRemoteControl_VERSION=`git describe --tags --match "v*"`" >> $GITHUB_ENV
./depley.sh
- name: Make directories
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@v4
id: cache-installed
with:
path: |
${{env.INSTALL_DIR}}
key: install_msvc_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}}
- name: run-vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
vcpkgDirectory: ${{env.SOURCE_DIR}}/vcpkg
- name: run vcpkg
if: false
working-directory: ${{github.workspace}}
run: |
vcpkg install --triplet ${{matrix.VCPKG_TARGET_TRIPLET}} --x-feature=vnc
- name: build npcap
working-directory: ${{env.SOURCE_DIR}}
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\npcap (
C:\msys64\usr\bin\pacman.exe -S --noconfirm unzip
C:\msys64\usr\bin\wget https://npcap.com/dist/npcap-sdk-1.13.zip
C:\msys64\usr\bin\unzip -d ${{env.INSTALL_DIR}}\npcap npcap-sdk-1.13.zip
)
# 因为 vcpkg 中 PcapPlusPlus 依赖 winpcap , winpcap 不能在 windows 10 上工作,
# 所以编译依赖于 npcap
- name: build PcapPlusPlus
working-directory: ${{env.SOURCE_DIR}}
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\pcapplusplus (
git clone --recursive https://github.com/seladb/PcapPlusPlus.git
cd PcapPlusPlus
git checkout -b v24.09 v24.09
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^
-T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
-DCMAKE_INSTALL_PREFIX="${{env.INSTALL_DIR}}" ^
-DPCAP_ROOT=${{env.INSTALL_DIR}}/npcap ^
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" ^
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
)
# - name: build libdatachannel
# working-directory: ${{env.SOURCE_DIR}}
# run: |
# IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\LibDataChannel (
# git clone -b v0.22.2 https://github.com/paullouisageneau/libdatachannel.git
# cd libdatachannel
# git submodule update --init --recursive
# cmake -E make_directory build
# cd build
# cmake .. ^
# -A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^
# -T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
# -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
# -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} ^
# -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake"
# cmake --build . --config ${{matrix.BUILD_TYPE}}
# cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
# )
# - name: Build FreeRDP
# working-directory: ${{env.SOURCE_DIR}}
# 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 04fa5b3033722df4fba45c02056be8e7cb45d7c6 04fa5b3033722df4fba45c02056be8e7cb45d7c6
# git submodule update --init --recursive
# cmake -E make_directory build
# cd build
# cmake .. ^
# -A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^
# -T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
# -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
# -DCMAKE_INSTALL_PREFIX="${{env.INSTALL_DIR}}" ^
# -DWITH_SERVER=ON ^
# -DWITH_CLIENT_SDL=OFF ^
# -DWITH_KRB5=OFF ^
# -DWITH_MANPAGES=OFF ^
# -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake"
# cmake --build . --config ${{matrix.BUILD_TYPE}}
# cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
# )
- name: build RabbitVNC
if: false
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 .. ^
-A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^
-T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" ^
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF ^
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" ^
-DVCPKG_VERBOSE=ON ^
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/RabbitVNC/vcpkg_installed ^
-DVCPKG_TRACE_FIND_PACKAGE=ON ^
-DBUILD_VIEWER=OFF ^
-DBUILD_TESTS=OFF ^
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
)
- name: build tigervnc
#if: ${{ matrix.BUILD_TYPE == 'Debug'}}
working-directory: ${{env.SOURCE_DIR}}
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 .. ^
-A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^
-T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" ^
-DCMAKE_FIND_ROOT_PATH=${{env.INSTALL_DIR}} ^
-DBUILD_TESTS=OFF -DBUILD_VIEWER=OFF ^
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" ^
-DVCPKG_VERBOSE=ON ^
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/tigervnc/vcpkg_installed ^
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^
-DVCPKG_TRACE_FIND_PACKAGE=ON ^
-DBUILD_VIEWER=OFF ^
-DBUILD_TESTS=OFF ^
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
)
- name: Build libvncserver
#if: ${{ matrix.BUILD_TYPE == 'Debug'}}
working-directory: ${{env.SOURCE_DIR}}
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\LibVNCServer (
git clone --depth=1 https://github.com/KangLin/libvncserver.git
#git clone https://github.com/LibVNC/libvncserver.git
cd libvncserver
cmake -E make_directory build
cd build
cmake .. ^
-A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^
-T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DWITH_OPENSSL=ON -DWITH_GCRYPT=OFF -DBUILD_TESTS=OFF ^
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" ^
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" ^
-DVCPKG_VERBOSE=ON ^
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/libvncserver/vcpkg_installed ^
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^
-DVCPKG_TRACE_FIND_PACKAGE=ON ^
-DWITH_EXAMPLES=OFF ^
-DWITH_TESTS=OFF ^
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
)
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
dir: '${{env.TOOLS_DIR}}/qt' # optional
version: '${{matrix.qt_version}}' # optional, default is 5.15.2
arch: '${{matrix.qt_arch}}' # optional
modules: '${{env.qt_modules}}' # optional. see: https://ddalcino.github.io/aqt-list-server/
cache: true
cache-key-prefix: cached-qt_${{matrix.qt_version}}_${{matrix.qt_arch}}
- name: build qxmpp
if: false
working-directory: ${{env.SOURCE_DIR}}
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\qxmpp (
git clone https://invent.kde.org/libraries/qxmpp.git
cd qxmpp
git checkout -b v1.10.3 v1.10.3
cmake -E make_directory build
cd build
cmake .. ^
-A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^
-T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF ^
-DBUILD_DOCUMENTATION=OFF ^
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} ^
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake ^
-DVCPKG_VERBOSE=ON ^
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/qxmpp/vcpkg_installed ^
-DVCPKG_TRACE_FIND_PACKAGE=ON
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
)
- name: build QtService
if: false
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 .. ^
-A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^
-T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
-DBUILD_EXAMPLES=OFF ^
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} ^
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake ^
-DVCPKG_VERBOSE=ON ^
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^
-DVCPKG_TRACE_FIND_PACKAGE=ON
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/QtService/vcpkg_installed
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --install . --config ${{matrix.BUILD_TYPE}} --strip
)
- name: lxqt-build-tools
working-directory: ${{env.SOURCE_DIR}}
if: ${{ matrix.qt_version == '6.9.1' }}
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\share\cmake\lxqt2-build-tools (
git clone -b 2.2.0 --depth=1 "https://github.com/lxqt/lxqt-build-tools.git"
cd lxqt-build-tools
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 --build . --config ${{matrix.BUILD_TYPE}} --target install
)
- name: qtermwidget6
working-directory: ${{env.SOURCE_DIR}}
if: ${{ matrix.qt_version == '6.9.1' }}
run: |
IF NOT EXIST ${{env.INSTALL_DIR}}\lib\cmake\qtermwidget6 (
git clone --depth=1 "https://github.com/KangLin/qtermwidget.git"
cd qtermwidget
cmake -E make_directory build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} ^
-Dlxqt2-build-tools_DIR=${{env.INSTALL_DIR}}\share\cmake\lxqt2-build-tools
cmake --build . --config ${{matrix.BUILD_TYPE}}
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
)
- name: RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
run: git clone https://github.com/KangLin/RabbitCommon.git
- name: Build RabbitRemoteControl with cmake preset
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.1' && startsWith(github.ref, 'refs/heads/master')}}
working-directory: ${{github.workspace}}
env:
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon
run: |
cmake --workflow --preset "msvc-x64-qt6"
- name: Build RabbitRemoteControl
working-directory: ${{github.workspace}}\build
env:
RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon
run: |
IF /i "${{matrix.BUILD_TYPE}}" == "Release" (
echo "Build Release ......"
set BUILD_RABBITVNC=OFF
set BUILD_SERVICE=OFF
) else (
echo "Build Debug ......"
set BUILD_SERVICE=ON
)
cd ${{env.BUILD_DIR}}
cmake ${{github.workspace}} ^
-A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^
-T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^
-DCMARK_SHARED=OFF ^
-DCMARK_TESTS=OFF ^
-DCMARK_STATIC=ON ^
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{env.BUILD_DIR}}/install ^
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake ^
-DVCPKG_VERBOSE=ON ^
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=OFF ^
-DVCPKG_APPLOCAL_DEPS=OFF ^
-DVCPKG_TRACE_FIND_PACKAGE=ON ^
-DBUILD_QUIWidget=OFF ^
-DBUILD_APP=ON ^
-DRABBIT_ENABLE_INSTALL_DEPENDENT=OFF ^
-DRABBIT_ENABLE_INSTALL_QT=ON ^
-DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=OFF ^
-DBUILD_FREERDP=ON ^
-DLibVNCServer_DIR="${{env.INSTALL_DIR}}/lib/cmake/LibVNCServer" ^
-DRabbitVNC_DIR=${{env.INSTALL_DIR}}/lib/cmake/RabbitVNC ^
-Dtigervnc_DIR=${{env.INSTALL_DIR}}/lib/cmake/tigervnc ^
-DQXmpp_DIR=${{env.INSTALL_DIR}}/lib/cmake/qxmpp ^
-DQtService_DIR=${{env.INSTALL_DIR}}/lib/cmake/QtService ^
-DQtService_DIR=${{env.INSTALL_DIR}}/lib/cmake/QtService ^
-DPcapPlusPlus_DIR=${{env.INSTALL_DIR}}/lib/cmake/pcapplusplus ^
-DPCAP_ROOT=${{env.INSTALL_DIR}}/npcap ^
-DPacket_ROOT=${{env.INSTALL_DIR}}/npcap ^
-Dqtermwidget6_DIR=${{env.INSTALL_DIR}}/lib/cmake/qtermwidget6
cmake --build . --config ${{matrix.BUILD_TYPE}}
IF "${{matrix.BUILD_TYPE}}" == "Release" (
echo "cmake install config: ${{matrix.BUILD_TYPE}} component: DependLibraries"
cmake --install . --config ${{matrix.BUILD_TYPE}} --component DependLibraries --strip
echo "cmake install config: ${{matrix.BUILD_TYPE}} component: Runtime"
cmake --install . --config ${{matrix.BUILD_TYPE}} --component Runtime --strip
echo "cmake install config: ${{matrix.BUILD_TYPE}} component: Application"
cmake --install . --config ${{matrix.BUILD_TYPE}} --component Application --strip
echo "cmake install config: ${{matrix.BUILD_TYPE}} component: Plugin"
cmake --install . --config ${{matrix.BUILD_TYPE}} --component Plugin --strip
) else (
echo "cmake install config: ${{matrix.BUILD_TYPE}} component: Runtime Application Plugin"
cmake --install . --config ${{matrix.BUILD_TYPE}} --component Runtime
cmake --install . --config ${{matrix.BUILD_TYPE}} --component Application
cmake --install . --config ${{matrix.BUILD_TYPE}} --component Plugin
cmake --install . --config ${{matrix.BUILD_TYPE}} --component DependLibraries
)
- name: Package
if: ${{ matrix.BUILD_TYPE == 'Release' }}
working-directory: ${{github.workspace}}\build
run: |
copy /Y ${{env.INSTALL_DIR}}\bin\*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\lib\*.dll install\bin
copy /Y vcpkg_installed\${{matrix.VCPKG_TARGET_TRIPLET}}\bin\*.dll install\bin
IF EXIST "${{env.INSTALL_DIR}}\share\qtermwidget6" (
xcopy "${{env.INSTALL_DIR}}\share\qtermwidget6" install\share\qtermwidget6 /Y /S /I
)
C:\msys64\usr\bin\wget https://npcap.com/dist/npcap-1.80.exe
copy npcap-1.80.exe install\bin
7z a RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Portable.zip .\install\*
makensis Windows.nsi
copy /Y RabbitRemoteControl_Setup_${{env.RabbitRemoteControl_VERSION}}.exe RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe
- name: Update configure file
if: ${{ matrix.BUILD_TYPE == 'Release' }}
working-directory: ${{github.workspace}}\build
run: |
install\bin\RabbitRemoteControlApp.exe ^
-f "update_msvc_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json" ^
--foc 1 ^
-u https://github.com/KangLin/RabbitRemoteControl/releases/download/${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe;https://master.dl.sourceforge.net/project/rabbitremotecontrol/${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe?viasf=1 ^
--pf RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe ^
-m "${{env.RabbitRemoteControl_VERSION}}"
RENAME update_msvc_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json.xml update_windows.xml
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version != '5.15.2' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}
path: |
${{github.workspace}}\build\RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe
${{github.workspace}}\build\update_msvc_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json
${{github.workspace}}\build\RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Portable.zip
- name: Update artifact update_windows.xml
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.1' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}_xml
path: |
${{github.workspace}}\build\update_windows.xml