diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index f0d08d1ab..e8d467e7e 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -46,9 +46,10 @@ jobs: uses: jurplel/install-qt-action@v2 - name: Install dependencies run: | - sudo apt-get install -y mesa-common-dev libglu1-mesa-dev libgmp-dev libcgal-dev libboost-all-dev - #needed by qt 5.15 on linux - sudo apt-get install libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-xinerama0-dev + sudo apt-get update && sudo apt-get dist-upgrade + bash scripts/${{ runner.os }}/0_setup_env_ubuntu.sh --dont_install_qt --dowload_cgal_and_boost_src + #needed by qt 5.15 on linux + sudo apt-get install libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-xinerama0-dev - name: Setup env variables id: envs shell: bash diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml index 54cb2e678..550c9ba3f 100644 --- a/.github/workflows/Linux.yml +++ b/.github/workflows/Linux.yml @@ -19,9 +19,10 @@ jobs: uses: jurplel/install-qt-action@v2 - name: Install dependencies run: | - sudo apt-get install -y mesa-common-dev libglu1-mesa-dev libgmp-dev libcgal-dev libboost-all-dev - #needed by qt 5.15 on linux - sudo apt-get install libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-xinerama0-dev + sudo apt-get update && sudo apt-get dist-upgrade + bash scripts/${{ runner.os }}/0_setup_env_ubuntu.sh --dont_install_qt --dowload_cgal_and_boost_src + #needed by qt 5.15 on linux + sudo apt-get install libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev libxcb-xinerama0-dev - name: Setup env variables id: envs shell: bash diff --git a/scripts/Linux/0_setup_env_ubuntu.sh b/scripts/Linux/0_setup_env_ubuntu.sh index 5a607928f..697ad3c67 100644 --- a/scripts/Linux/0_setup_env_ubuntu.sh +++ b/scripts/Linux/0_setup_env_ubuntu.sh @@ -1,10 +1,60 @@ #!/bin/bash -# this is a script shell sets up an ubuntu (16.04, 18.04, 20.04) environment where +# this is a script shell sets up an ubuntu (18.04, 20.04 and 22.04) environment where # MeshLab can be compiled. # # Run this script if you never installed any of the MeshLab dependencies. +DONT_INSTALL_QT=false +DOWNLOAD_CGAL_BOOST_SRC=false + +#checking for parameters +for i in "$@" +do +case $i in + --dont_install_qt) + DONT_INSTALL_QT=true + shift # past argument=value + ;; + --dowload_cgal_and_boost_src) + DOWNLOAD_CGAL_BOOST_SRC=true + shift # past argument=value + ;; + *) + # unknown option + ;; +esac +done + sudo apt-get update -sudo apt-get install -y qt5-default qttools5-dev-tools qtdeclarative5-dev +echo "=== installing mesa packages..." sudo apt-get install -y mesa-common-dev libglu1-mesa-dev -sudo apt-get install -y libgmp-dev libcgal-dev libboost-all-dev patchelf cmake + +if [ "$DONT_INSTALL_QT" = false ] ; then + echo "=== installing qt packages..." + sudo apt-get install -y qt5-default qttools5-dev-tools qtdeclarative5-dev +else + echo "=== jumping installation of qt packages..." +fi + +echo "=== installing gmp, patchelf and cmake..." +sudo apt-get install -y libgmp-dev patchelf cmake + +if [ "$DOWNLOAD_CGAL_BOOST_SRC" = false ] ; then + echo "=== installing cgal and boost..." + sudo apt-get install -y libcgal-dev libboost-all-dev +else + echo "=== downloading cgal and boost sources..." + #default paths wrt the script folder + SCRIPTS_PATH="$(dirname "$(realpath "$0")")" + EXTERNAL_PATH=$SCRIPTS_PATH/../../src/external + + cd $EXTERNAL_PATH + + wget https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.zip + unzip boost_1_75_0.zip + rm boost_1_75_0.zip + + wget https://github.com/CGAL/cgal/releases/download/v5.2.1/CGAL-5.2.1.zip + unzip CGAL-5.2.1.zip + rm CGAL-5.2.1.zip +fi diff --git a/scripts/Linux/2_deploy_and_appimage.sh b/scripts/Linux/2_deploy_and_appimage.sh index 5c96c7ff8..de588e4d4 100644 --- a/scripts/Linux/2_deploy_and_appimage.sh +++ b/scripts/Linux/2_deploy_and_appimage.sh @@ -45,8 +45,7 @@ chmod +x $INSTALL_PATH/usr/bin/meshlab export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_PATH/usr/lib/meshlab $SCRIPTS_PATH/resources/linuxdeploy --appdir=$INSTALL_PATH \ --plugin qt --output appimage \ - --library=$INSTALL_PATH/usr/lib/meshlab/plugins/libio_e57.so \ - --library=$INSTALL_PATH/usr/lib/meshlab/plugins/libfilter_mesh_booleans.so + --library=$INSTALL_PATH/usr/lib/meshlab/plugins/libio_e57.so #get version IFS=' ' #space delimiter