@@ -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
@@ -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
@@ -707,7 +710,9 @@ if [ $LIBSSH -eq 1 ]; then
707710 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 [ ! 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 \
@@ -725,7 +730,9 @@ if [ $FREERDP -eq 1 ]; then
725730 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 [ ! 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 \
@@ -752,7 +759,9 @@ if [ $TIGERVNC -eq 1 ]; then
752759 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 \
@@ -771,7 +780,9 @@ if [ $PCAPPLUSPLUS -eq 1 ]; then
771780 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+ git clone -b v25.05 --depth=1 https://github.com/seladb/PcapPlusPlus.git
785+ fi
775786 cmake -E make_directory $BUILD_DEPEND_DIR /PcapPlusPlus
776787 pushd $BUILD_DEPEND_DIR /PcapPlusPlus
777788 cmake -S $SOURCE_DIR /PcapPlusPlus -DCMAKE_BUILD_TYPE=Release \
@@ -791,7 +802,9 @@ if [ $libdatachannel -eq 1 ]; then
791802 echo " Install libdatachannel ......"
792803 pushd " $SOURCE_DIR "
793804 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/LibDataChannel ]; then
794- git clone -b v0.17.8 --depth=1 https://github.com/paullouisageneau/libdatachannel.git
805+ if [ ! libdatachannel ]; then
806+ git clone -b v0.17.8 --depth=1 https://github.com/paullouisageneau/libdatachannel.git
807+ fi
795808 cd libdatachannel
796809 git submodule update --init --recursive
797810 cmake -E make_directory $BUILD_DEPEND_DIR /libdatachannel
@@ -810,7 +823,9 @@ if [ $QtService -eq 1 ]; then
810823 echo " Install QtService ......"
811824 pushd " $SOURCE_DIR "
812825 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/QtService ]; then
813- git clone --depth=1 https://github.com/KangLin/qt-solutions.git
826+ if [ ! qt-solutions ]; then
827+ git clone --depth=1 https://github.com/KangLin/qt-solutions.git
828+ fi
814829 cd qt-solutions/qtservice
815830 git submodule update --init --recursive
816831 cmake -E make_directory $BUILD_DEPEND_DIR /qtservice
@@ -874,7 +889,9 @@ if [ $QTKEYCHAIN -eq 1 ]; then
874889 echo " Install QtKeyChain ......"
875890 pushd " $SOURCE_DIR "
876891 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/Qt6Keychain ]; then
877- git clone -b 0.15.0 --depth=1 https://github.com/frankosterfeld/qtkeychain.git
892+ if [ ! qtkeychain ]; then
893+ git clone -b 0.15.0 --depth=1 https://github.com/frankosterfeld/qtkeychain.git
894+ fi
878895 cmake -E make_directory $BUILD_DEPEND_DIR /qtkeychain
879896 pushd $BUILD_DEPEND_DIR /qtkeychain
880897 cmake -S $SOURCE_DIR /qtkeychain -DCMAKE_BUILD_TYPE=Release \
@@ -892,7 +909,9 @@ if [ $QFtpServer -eq 1 ]; then
892909 echo " Install QFtpServer ......"
893910 pushd " $SOURCE_DIR "
894911 if [ ! -d ${INSTALL_DIR} /${LIB_PATH} /cmake/QFtpServerLib/QFtpServerLib ]; then
895- git clone --depth=1 https://github.com/KangLin/QFtpServer.git
912+ if [ ! QFtpServer ]; then
913+ git clone --depth=1 https://github.com/KangLin/QFtpServer.git
914+ fi
896915 cmake -E make_directory $BUILD_DEPEND_DIR /QFtpServer
897916 pushd $BUILD_DEPEND_DIR /QFtpServer
898917 cmake -S $SOURCE_DIR /QFtpServer -DCMAKE_BUILD_TYPE=Release \
0 commit comments