Skip to content

Commit e85565f

Browse files
committed
CI: add build QFtpServer
1 parent 4e4d1b0 commit e85565f

File tree

4 files changed

+58
-9
lines changed

4 files changed

+58
-9
lines changed

.github/workflows/msvc.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,25 @@ jobs:
376376
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
377377
)
378378
379+
- name: QFtpServer
380+
working-directory: ${{env.SOURCE_DIR}}
381+
run: |
382+
IF NOT EXIST ${{env.INSTALL_DIR}}/QFtpServerLib/QFtpServerLib (
383+
git clone --depth=1 https://github.com/KangLin/QFtpServer.git
384+
cd QFtpServer
385+
cmake -E make_directory build
386+
cd build
387+
cmake .. -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
388+
-DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}} ^
389+
-DVCPKG_VERBOSE=ON ^
390+
-DVCPKG_TARGET_TRIPLET=${{matrix.VCPKG_TARGET_TRIPLET}} ^
391+
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^
392+
-DVCPKG_APPLOCAL_DEPS=ON ^
393+
-DVCPKG_TRACE_FIND_PACKAGE=ON
394+
cmake --build . --config ${{matrix.BUILD_TYPE}}
395+
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
396+
)
397+
379398
- name: RabbitCommon
380399
working-directory: ${{env.SOURCE_DIR}}
381400
run: git clone https://github.com/KangLin/RabbitCommon.git

Script/build_depend.sh

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ QtService=0
4444
QTERMWIDGET=0
4545
LIBSSH=0
4646
QTKEYCHAIN=0
47+
QFtpServer=0
4748

4849
# Display detailed usage information
4950
usage_long() {
@@ -84,6 +85,7 @@ Component options:
8485
--QtService[=1|0] Install QtService
8586
--qtermwidget[=1|0] Install qtermwidget
8687
--qtkeychain[=1|0] Install qtkeychain
88+
--qftpserver[=1|0] Install QFtpServer
8789
8890
Examples:
8991
$0 --base=1 --qt=1 --install=/opt/local
@@ -117,7 +119,7 @@ parse_with_getopt() {
117119
# 后面没有冒号表示没有参数。后跟有一个冒号表示有参数。跟两个冒号表示有可选参数。
118120
# -l 或 --long 选项后面是可接受的长选项,用逗号分开,冒号的意义同短选项。
119121
# -n 选项后接选项解析错误时提示的脚本名字
120-
OPTS=help,install:,source:,tools:,build:,verbose::,package:,package-tool:,system_update::,system-update::,base::,default::,macos::,qt::,rabbitcommon::,freerdp::,tigervnc::,libssh::,pcapplusplus::,libdatachannel::,QtService::,qtermwidget::,qtkeychain::
122+
OPTS=help,install:,source:,tools:,build:,verbose::,package:,package-tool:,system_update::,system-update::,base::,default::,macos::,qt::,rabbitcommon::,freerdp::,tigervnc::,libssh::,pcapplusplus::,libdatachannel::,QtService::,qtermwidget::,qtkeychain::,qftpserver::
121123

122124
# Parse arguments using getopt
123125
# -o: short options
@@ -334,6 +336,17 @@ parse_with_getopt() {
334336
esac
335337
shift 2
336338
;;
339+
--qftpserver)
340+
case "$2" in
341+
"")
342+
QFtpServer=1
343+
;;
344+
*)
345+
QFtpServer="$2"
346+
;;
347+
esac
348+
shift 2
349+
;;
337350
--) # End of options
338351
shift
339352
break
@@ -851,5 +864,22 @@ if [ $QTKEYCHAIN -eq 1 ]; then
851864
popd
852865
fi
853866

867+
if [ $QFtpServer -eq 1 ]; then
868+
echo "Install QFtpServer ......"
869+
pushd "$SOURCE_DIR"
870+
if [ ! -d ${INSTALL_DIR}/lib/cmake/QFtpServerLib/QFtpServerLib ]; then
871+
git clone --depth=1 https://github.com/KangLin/QFtpServer.git
872+
cmake -E make_directory $BUILD_DEPEND_DIR/QFtpServer
873+
pushd $BUILD_DEPEND_DIR/QFtpServer
874+
cmake -S $SOURCE_DIR/QFtpServer -DCMAKE_BUILD_TYPE=Release \
875+
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
876+
-DCMAKE_VERBOSE_MAKEFILE=${BUILD_VERBOSE}
877+
cmake --build . --config Release --parallel $(nproc)
878+
cmake --build . --config Release --target install
879+
popd
880+
fi
881+
popd
882+
fi
883+
854884
popd
855885
popd

Script/build_linux.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -416,13 +416,13 @@ if [ $DEB -eq 1 ]; then
416416
install_debian_depend $REPO_ROOT
417417

418418
./build_depend.sh \
419-
--rabbitcommon --tigervnc --pcapplusplus --qtermwidget \
419+
--rabbitcommon --tigervnc --pcapplusplus --qtermwidget --qftpserver \
420420
--install=${INSTALL_DIR} \
421421
--source=${SOURCE_DIR} \
422422
--tools=${TOOLS_DIR} \
423423
--verbose=${BUILD_VERBOSE}
424424

425-
export CMAKE_CONFIG_PARAS="-DINSTALL_LIBSSH=ON -DRABBIT_ENABLE_INSTALL_TARGETS=ON -DINSTALL_QTERMWIDGET=ON"
425+
export CMAKE_CONFIG_PARAS="-DINSTALL_LIBSSH=ON -DRABBIT_ENABLE_INSTALL_TARGETS=ON -DINSTALL_QTERMWIDGET=ON -DINSTALL_QFtpServer=ON"
426426
./build_debpackage.sh --install=${INSTALL_DIR} \
427427
--rabbitcommon=${SOURCE_DIR}/RabbitCommon \
428428
--verbose=${BUILD_VERBOSE}
@@ -445,7 +445,7 @@ if [ $APPIMAGE -eq 1 ]; then
445445
# export CMAKE_PREFIX_PATH=$QT_ROOT:${INSTALL_DIR}:${CMAKE_PREFIX_PATH}
446446
# ;;
447447
# esac
448-
depend_para="$depend_para --freerdp --libssh --qtermwidget --qtkeychain"
448+
depend_para="$depend_para --freerdp --libssh --qtermwidget --qtkeychain --qftpserver"
449449
;;
450450
fedora)
451451
;;
@@ -459,11 +459,11 @@ if [ $APPIMAGE -eq 1 ]; then
459459
export CMAKE_PREFIX_PATH=${INSTALL_DIR}:${CMAKE_PREFIX_PATH}
460460

461461
./build_depend.sh --system_update --base --default \
462-
--rabbitcommon --tigervnc --pcapplusplus \
462+
--rabbitcommon --tigervnc --pcapplusplus ${depend_para} \
463463
--install=${INSTALL_DIR} \
464464
--source=${SOURCE_DIR} \
465465
--tools=${TOOLS_DIR} \
466-
--verbose=${BUILD_VERBOSE} ${depend_para}
466+
--verbose=${BUILD_VERBOSE}
467467

468468
./build_appimage.sh --install=${INSTALL_DIR} \
469469
--tools=${TOOLS_DIR} \
@@ -474,7 +474,7 @@ if [ $RPM -eq 1 ]; then
474474
echo "build rpm package ......"
475475
dnf builddep -y ${REPO_ROOT}/Package/rpm/rabbitremotecontrol.spec
476476
./build_depend.sh --system_update --base --default --package-tool=dnf \
477-
--rabbitcommon --tigervnc --pcapplusplus \
477+
--rabbitcommon --tigervnc --pcapplusplus --qftpserver \
478478
--install=${INSTALL_DIR} \
479479
--source=${SOURCE_DIR} \
480480
--tools=${TOOLS_DIR} \
@@ -490,7 +490,7 @@ fi
490490
if [ $MACOS -eq 1 ]; then
491491
echo "build macos bundle package ......"
492492
./build_depend.sh --system_update --base --default --macos \
493-
--rabbitcommon --tigervnc --qtermwidget \
493+
--rabbitcommon --tigervnc --qtermwidget --qftpserver \
494494
--install=${INSTALL_DIR} \
495495
--source=${SOURCE_DIR} \
496496
--tools=${TOOLS_DIR} \

Script/build_macos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ cmake "$REPO_ROOT" \
150150
-DBUILD_FREERDP=ON \
151151
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
152152

153-
cmake --build . --config Release --parallel $(nproc)
153+
cmake --build . --config Release #--parallel $(nproc)
154154
cmake --install . --config Release --strip --component DependLibraries
155155
cmake --install . --config Release --strip --component Runtime
156156
cmake --install . --config Release --strip --component Plugin

0 commit comments

Comments
 (0)