@@ -12,11 +12,10 @@ if [ -z "$BUILD_VERBOSE" ]; then
1212fi
1313
1414source $( dirname $( readlink -f $0 ) ) /common.sh
15-
1615detect_os_info
1716
1817install_gnu_getopt
19- if [ " $OS " = " macOS" ]; then
18+ if [ " $DISTRO " = " macOS" ]; then
2019 MACOS=1
2120 setup_macos
2221else
512511
513512
514513if [ $SYSTEM_UPDATE -eq 1 ]; then
515- echo " System update ......"
514+ echo " == System update ......"
516515 case " $PACKAGE_TOOL " in
517516 brew)
518517 brew update -q
@@ -531,12 +530,12 @@ if [ $SYSTEM_UPDATE -eq 1 ]; then
531530fi
532531
533532if [ -n " $PACKAGE " ]; then
534- echo " Install package: $PACKAGE "
533+ echo " == Install package: $PACKAGE "
535534 package_install $PACKAGE
536535fi
537536
538537if [ $BASE_LIBS -eq 1 ]; then
539- echo " Install base libraries ......"
538+ echo " == Install base libraries ......"
540539 if [ " $PACKAGE_TOOL " = " apt" ]; then
541540 # Build tools
542541 package_install build-essential devscripts equivs debhelper \
@@ -558,11 +557,8 @@ if [ $BASE_LIBS -eq 1 ]; then
558557 libxcb-cursor-dev libxcb-xkb-dev libxcb-keysyms1-dev \
559558 libxcb-* libxcb-cursor0 \
560559 libxkbcommon-dev
561- if ! [[ $DISTRO_VERSION =~ 26\. [0-9]+ ]]; then
562- package_install xserver-xorg-input-kbd xserver-xorg-input-mouse
563- fi
564560 # Base dependency
565- package_install liblzo2-dev libssl-dev libcrypt-dev libicu-dev zlib1g-dev libtelnet-dev
561+ package_install liblzo2-dev libssl-dev libcrypt-dev libicu-dev zlib1g-dev
566562 # RabbitCommon dependency
567563 package_install libcmark-dev cmark
568564 # VNC dependency
@@ -573,7 +569,15 @@ if [ $BASE_LIBS -eq 1 ]; then
573569 # PcapPlusPlus dependency
574570 package_install libpcap-dev
575571 # FFmpeg needed by QtMultimedia and freerdp
576- package_install libavcodec-dev libavformat-dev libresample1-dev libswscale-dev
572+ package_install libavcodec-dev libavformat-dev libswscale-dev
573+ case " $DISTRO " in
574+ ubuntu|debian)
575+ package_install libresample1-dev
576+ ;;
577+ deepin)
578+ package_install libswresample-dev
579+ ;;
580+ esac
577581 package_install libx264-dev libx265-dev
578582 # Needed by QtMultimedia
579583 package_install pipewire
@@ -582,11 +586,10 @@ if [ $BASE_LIBS -eq 1 ]; then
582586 # Needed by AppImage and FreeRDP
583587 package_install libfuse-dev libfuse3-dev fuse
584588 # Other
585-
586- if [ " $OS " = " ubuntu" ]; then
589+ if [ " $DISTRO " = " ubuntu" ]; then
587590 package_install libmysqlclient-dev
588591 fi
589- if [ " $OS " = " debian" ]; then
592+ if [ " $DISTRO " = " debian" ]; then
590593 # libmysqlclient
591594 package_install libmariadb-dev libmariadb-dev-compat
592595 fi
@@ -622,7 +625,7 @@ if [ $BASE_LIBS -eq 1 ]; then
622625fi
623626
624627if [ $DEFAULT_LIBS -eq 1 ]; then
625- echo " Install default dependency libraries ......"
628+ echo " == Install default dependency libraries ......"
626629 if [ " $PACKAGE_TOOL " = " apt" ]; then
627630 package_install libvncserver-dev
628631 if [ $FREERDP -ne 1 ]; then
@@ -665,7 +668,7 @@ if [ $DEFAULT_LIBS -eq 1 ]; then
665668fi
666669
667670if [ $QT -eq 1 ]; then
668- echo " Install qt ${QT_VERSION} ......"
671+ echo " == Install qt ${QT_VERSION} ......"
669672 pushd " $TOOLS_DIR "
670673 if [ ! -d qt_` uname -m` ]; then
671674 # See: https://ddalcino.github.io/aqt-list-server/
@@ -691,7 +694,7 @@ if [ $QT -eq 1 ]; then
691694fi
692695
693696if [ $RabbitCommon -eq 1 ]; then
694- echo " Install RabbitCommon ......"
697+ echo " == Install RabbitCommon ......"
695698 pushd " $SOURCE_DIR "
696699 if [ ! -d RabbitCommon ]; then
697700 git clone https://github.com/KangLin/RabbitCommon.git
@@ -704,10 +707,12 @@ if [ $RabbitCommon -eq 1 ]; then
704707fi
705708
706709if [ $LIBSSH -eq 1 ]; then
707- echo " Install libssh ......"
710+ echo " == Install libssh ......"
708711 pushd " $SOURCE_DIR "
709712 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/libssh ]; then
710- git clone -b libssh-0.11.3 --depth=1 https://git.libssh.org/projects/libssh.git
713+ if [ ! -d libssh ]; then
714+ git clone -b libssh-0.11.3 --depth=1 https://git.libssh.org/projects/libssh.git
715+ fi
711716 cmake -E make_directory $BUILD_DEPEND_DIR /libssh
712717 pushd $BUILD_DEPEND_DIR /libssh
713718 cmake -S $SOURCE_DIR /libssh -DCMAKE_BUILD_TYPE=Release \
@@ -722,10 +727,12 @@ if [ $LIBSSH -eq 1 ]; then
722727fi
723728
724729if [ $FREERDP -eq 1 ]; then
725- echo " Install FreeRDP ......"
730+ echo " == Install FreeRDP ......"
726731 pushd " $SOURCE_DIR "
727732 if [ ! -d ${INSTALL_DIR} /lib/cmake/FreeRDP3 ]; then
728- git clone -b 3.24.1 --depth=1 https://github.com/FreeRDP/FreeRDP.git
733+ if [ ! -d FreeRDP ]; then
734+ git clone -b 3.24.1 --depth=1 https://github.com/FreeRDP/FreeRDP.git
735+ fi
729736 cmake -E make_directory $BUILD_DEPEND_DIR /FreeRDP
730737 pushd $BUILD_DEPEND_DIR /FreeRDP
731738 cmake -S $SOURCE_DIR /FreeRDP \
@@ -749,10 +756,12 @@ if [ $FREERDP -eq 1 ]; then
749756fi
750757
751758if [ $TIGERVNC -eq 1 ]; then
752- echo " Install tigervnc ......"
759+ echo " == Install tigervnc ......"
753760 pushd " $SOURCE_DIR "
754761 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/tigervnc ]; then
755- git clone --depth=1 https://github.com/KangLin/tigervnc.git
762+ if [ ! -d tigervnc ]; then
763+ git clone --depth=1 https://github.com/KangLin/tigervnc.git
764+ fi
756765 cmake -E make_directory $BUILD_DEPEND_DIR /tigervnc
757766 pushd $BUILD_DEPEND_DIR /tigervnc
758767 cmake -S $SOURCE_DIR /tigervnc -DCMAKE_BUILD_TYPE=Release \
@@ -768,10 +777,17 @@ if [ $TIGERVNC -eq 1 ]; then
768777fi
769778
770779if [ $PCAPPLUSPLUS -eq 1 ]; then
771- echo " Install PcapPlusPlus ......"
780+ echo " == Install PcapPlusPlus ......"
772781 pushd " $SOURCE_DIR "
773782 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/pcapplusplus ]; then
774- git clone -b v25.05 --depth=1 https://github.com/seladb/PcapPlusPlus.git
783+ if [ ! -d PcapPlusPlus ]; then
784+ # TODO: modify it
785+ if [ " $DISTRO " = " deepin" ]; then
786+ git clone --depth=1 https://github.com/KangLin/PcapPlusPlus.git
787+ else
788+ git clone -b v25.05 --depth=1 https://github.com/seladb/PcapPlusPlus.git
789+ fi
790+ fi
775791 cmake -E make_directory $BUILD_DEPEND_DIR /PcapPlusPlus
776792 pushd $BUILD_DEPEND_DIR /PcapPlusPlus
777793 cmake -S $SOURCE_DIR /PcapPlusPlus -DCMAKE_BUILD_TYPE=Release \
@@ -788,10 +804,12 @@ if [ $PCAPPLUSPLUS -eq 1 ]; then
788804fi
789805
790806if [ $libdatachannel -eq 1 ]; then
791- echo " Install libdatachannel ......"
807+ echo " == Install libdatachannel ......"
792808 pushd " $SOURCE_DIR "
793809 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/LibDataChannel ]; then
794- git clone -b v0.17.8 --depth=1 https://github.com/paullouisageneau/libdatachannel.git
810+ if [ ! -d libdatachannel ]; then
811+ git clone -b v0.17.8 --depth=1 https://github.com/paullouisageneau/libdatachannel.git
812+ fi
795813 cd libdatachannel
796814 git submodule update --init --recursive
797815 cmake -E make_directory $BUILD_DEPEND_DIR /libdatachannel
@@ -807,10 +825,12 @@ if [ $libdatachannel -eq 1 ]; then
807825fi
808826
809827if [ $QtService -eq 1 ]; then
810- echo " Install QtService ......"
828+ echo " == Install QtService ......"
811829 pushd " $SOURCE_DIR "
812830 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/QtService ]; then
813- git clone --depth=1 https://github.com/KangLin/qt-solutions.git
831+ if [ ! -d qt-solutions ]; then
832+ git clone --depth=1 https://github.com/KangLin/qt-solutions.git
833+ fi
814834 cd qt-solutions/qtservice
815835 git submodule update --init --recursive
816836 cmake -E make_directory $BUILD_DEPEND_DIR /qtservice
@@ -826,12 +846,12 @@ if [ $QtService -eq 1 ]; then
826846fi
827847
828848if [ $QTERMWIDGET -eq 1 ]; then
829- echo " Install qtermwidget ......"
849+ echo " == Install qtermwidget ......"
830850 pushd " $SOURCE_DIR "
831851 # CMAKE=`/usr/bin/qtpaths6 --query QT_HOST_BINS`/qt-cmake
832852 # echo "CMAKE: $CMAKE"
833853 if [ ! -d ${INSTALL_DIR} /share/cmake/lxqt2-build-tools ]; then
834- echo " Install lxqt-build-tools ......"
854+ echo " == Install lxqt-build-tools ......"
835855 if [ ! -d lxqt-build-tools ]; then
836856 git clone --branch 2.3.0 --depth=1 https://github.com/lxqt/lxqt-build-tools.git
837857 fi
@@ -871,10 +891,12 @@ if [ $QTERMWIDGET -eq 1 ]; then
871891fi
872892
873893if [ $QTKEYCHAIN -eq 1 ]; then
874- echo " Install QtKeyChain ......"
894+ echo " == Install QtKeyChain ......"
875895 pushd " $SOURCE_DIR "
876896 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/Qt6Keychain ]; then
877- git clone -b 0.15.0 --depth=1 https://github.com/frankosterfeld/qtkeychain.git
897+ if [ ! -d qtkeychain ]; then
898+ git clone -b 0.15.0 --depth=1 https://github.com/frankosterfeld/qtkeychain.git
899+ fi
878900 cmake -E make_directory $BUILD_DEPEND_DIR /qtkeychain
879901 pushd $BUILD_DEPEND_DIR /qtkeychain
880902 cmake -S $SOURCE_DIR /qtkeychain -DCMAKE_BUILD_TYPE=Release \
@@ -889,10 +911,12 @@ if [ $QTKEYCHAIN -eq 1 ]; then
889911fi
890912
891913if [ $QFtpServer -eq 1 ]; then
892- echo " Install QFtpServer ......"
914+ echo " == Install QFtpServer ......"
893915 pushd " $SOURCE_DIR "
894916 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/QFtpServerLib/QFtpServerLib ]; then
895- git clone --depth=1 https://github.com/KangLin/QFtpServer.git
917+ if [ ! -d QFtpServer ]; then
918+ git clone --depth=1 https://github.com/KangLin/QFtpServer.git
919+ fi
896920 cmake -E make_directory $BUILD_DEPEND_DIR /QFtpServer
897921 pushd $BUILD_DEPEND_DIR /QFtpServer
898922 cmake -S $SOURCE_DIR /QFtpServer -DCMAKE_BUILD_TYPE=Release \
0 commit comments