From 445f8702151b49142e4a88e253065082e702cf8b Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Tue, 17 May 2022 15:14:45 +0200 Subject: [PATCH] move build and install dirs on macos outside src --- .github/workflows/AutoMergeMainOnDevel.yml | 1 + .github/workflows/CreateRelease.yml | 10 +++--- .github/workflows/MacOS.yml | 4 +-- .gitignore | 5 ++- scripts/macOS/1_build.sh | 8 ++--- scripts/macOS/2_deploy.sh | 12 ++++--- scripts/macOS/3_dmg.sh | 3 +- scripts/macOS/make_it.sh | 38 +++++++++++----------- 8 files changed, 41 insertions(+), 40 deletions(-) diff --git a/.github/workflows/AutoMergeMainOnDevel.yml b/.github/workflows/AutoMergeMainOnDevel.yml index 18965f08f..dcb5f1b77 100644 --- a/.github/workflows/AutoMergeMainOnDevel.yml +++ b/.github/workflows/AutoMergeMainOnDevel.yml @@ -7,6 +7,7 @@ on: jobs: auto_merge: + if: github.repository_owner == 'cnr-isti-vclab' name: Automatic Merge Main On Devel runs-on: ubuntu-latest diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index de784b4ec..179971067 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -117,17 +117,17 @@ jobs: p12-password: ${{ secrets.MACOS_CERTIFICATE_PSSW }} - name: Sign run: | - codesign --options "runtime" --timestamp --force --deep --sign ${{ secrets.MACOS_CERT_ID }} src/install/meshlab.app + codesign --options "runtime" --timestamp --force --deep --sign ${{ secrets.MACOS_CERT_ID }} install/meshlab.app - name: Notarize uses: devbotsxyz/xcode-notarize@v1 with: - product-path: "src/install/meshlab.app" + product-path: "install/meshlab.app" appstore-connect-username: ${{ secrets.MACOS_NOTARIZATION_USER }} appstore-connect-password: ${{ secrets.MACOS_NOTARIZATION_PSSW }} - name: "Staple Release" uses: devbotsxyz/xcode-staple@v1 with: - product-path: "src/install/meshlab.app" + product-path: "install/meshlab.app" - name: Create MeshLab DMG shell: bash run: | @@ -136,12 +136,12 @@ jobs: uses: actions/upload-artifact@v2 with: name: meshlab_macos_portable${{steps.envs.outputs.artifact_suffix}} - path: src/install/MeshLab*.app + path: install/MeshLab*.app - name: Upload DMG uses: actions/upload-artifact@v2 with: name: meshlab_macos_dmg${{steps.envs.outputs.artifact_suffix}} - path: src/install/MeshLab*-macos.dmg + path: install/MeshLab*-macos.dmg windows_build: needs: [update_ml_version] diff --git a/.github/workflows/MacOS.yml b/.github/workflows/MacOS.yml index 0745c809d..b5eecbcea 100644 --- a/.github/workflows/MacOS.yml +++ b/.github/workflows/MacOS.yml @@ -46,9 +46,9 @@ jobs: uses: actions/upload-artifact@v2 with: name: meshlab_macos_portable${{steps.envs.outputs.artifact_suffix}} - path: src/install/MeshLab*.app + path: install/MeshLab*.app - name: Upload DMG uses: actions/upload-artifact@v2 with: name: meshlab_macos_dmg${{steps.envs.outputs.artifact_suffix}} - path: src/install/MeshLab*.dmg + path: install/MeshLab*.dmg diff --git a/.gitignore b/.gitignore index 72649ea4e..deab9ddc8 100644 --- a/.gitignore +++ b/.gitignore @@ -17,9 +17,8 @@ *.db-wal *.AppImage .DS_Store -distrib* -src/build/* -src/install/* +build/* +install/* src/external/boost_1_75_0 src/external/CGAL-5.2.1 install/macos/resources/meshlab_dmg_final.json diff --git a/scripts/macOS/1_build.sh b/scripts/macOS/1_build.sh index c2d1e7163..77e61be18 100644 --- a/scripts/macOS/1_build.sh +++ b/scripts/macOS/1_build.sh @@ -3,8 +3,8 @@ # Requires a Qt environment which is set-up properly, and an accessible # cmake binary. # -# Without given arguments, MeshLab will be built in the meshlab/src/build -# directory, and installed in $BUILD_PATH/../install. +# Without given arguments, MeshLab will be built in the meshlab/build +# directory, and installed in meshlab/install. # # You can give as argument the BUILD_PATH and the INSTALL_PATH in the # following way: @@ -15,8 +15,8 @@ SCRIPTS_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) SOURCE_PATH=$SCRIPTS_PATH/../../src RESOURCES_PATH=$SCRIPTS_PATH/../../resources -BUILD_PATH=$SOURCE_PATH/build -INSTALL_PATH=$SOURCE_PATH/install +BUILD_PATH=$SOURCE_PATH/../build +INSTALL_PATH=$SOURCE_PATH/../install CORES="-j4" DOUBLE_PRECISION_OPTION="" NIGHTLY_OPTION="" diff --git a/scripts/macOS/2_deploy.sh b/scripts/macOS/2_deploy.sh index a204f400f..273a9a1b6 100755 --- a/scripts/macOS/2_deploy.sh +++ b/scripts/macOS/2_deploy.sh @@ -2,14 +2,16 @@ # this is a script shell for deploying a meshlab-portable app. # Requires a properly built meshlab. # -# Without given arguments, the folder that will be deployed is meshlab/distrib. +# Without given arguments, the folder that will be deployed is meshlab/install. # -# You can give as argument the DISTRIB_PATH. +# You can give as argument the INSTALL_PATH in the following way: +# bash 2_deploy.sh --install_path=/path/to/install +# -i argument is also supported. # -# After running this script, $DISTRIB_PATH/meshlab.app will be a portable meshlab application. +# After running this script, $INSTALL_PATH/meshlab.app will be a portable meshlab application. SCRIPTS_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -INSTALL_PATH=$SCRIPTS_PATH/../../src/install +INSTALL_PATH=$SCRIPTS_PATH/../../install APPNAME="meshlab.app" #checking for parameters @@ -49,4 +51,4 @@ ${MACDEPLOYQT_EXE} $INSTALL_PATH/$APPNAME \ -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_mesh_booleans.so \ -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_screened_poisson.so \ -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_sketchfab.so \ - -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libio_e57.so + -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libio_e57.so diff --git a/scripts/macOS/3_dmg.sh b/scripts/macOS/3_dmg.sh index f9809c6e2..15c84a5e0 100755 --- a/scripts/macOS/3_dmg.sh +++ b/scripts/macOS/3_dmg.sh @@ -11,8 +11,7 @@ SCRIPTS_PATH=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) RESOURCES_PATH=$SCRIPTS_PATH/../../resources -INSTALL_PATH=$SCRIPTS_PATH/../../src/install -ML_VERSION=$(cat $SCRIPTS_PATH/../../ML_VERSION) +INSTALL_PATH=$SCRIPTS_PATH/../../install #checking for parameters for i in "$@" diff --git a/scripts/macOS/make_it.sh b/scripts/macOS/make_it.sh index 3311f222f..d420f788e 100644 --- a/scripts/macOS/make_it.sh +++ b/scripts/macOS/make_it.sh @@ -4,9 +4,9 @@ # Requires a Qt environment which is set-up properly, and an accessible # cmake binary. # -# Without given arguments, MeshLab will be built in the meshlab/src/build, -# the folder meshlab/src/install will contain meshlab.app and -# the DMG will be placed in meshlab/src. +# Without given arguments, MeshLab will be built in the meshlab/build, +# the folder meshlab/install will contain meshlab.app and +# the DMG will be placed in the meshlab directory. # # You can give as argument the build path, the install path (that will contain # the portable version of MeshLab), and the number of cores to use to build MeshLab @@ -18,8 +18,8 @@ SCRIPTS_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) SOURCE_PATH=$SCRIPTS_PATH/../../src -BUILD_PATH=$SOURCE_PATH/build -INSTALL_PATH=$SOURCE_PATH/install +BUILD_PATH=$SOURCE_PATH/../build +INSTALL_PATH=$SOURCE_PATH/../install CORES="-j4" DOUBLE_PRECISION_OPTION="" @@ -28,24 +28,24 @@ for i in "$@" do case $i in -b=*|--build_path=*) - BUILD_PATH="${i#*=}" - shift # past argument=value - ;; + BUILD_PATH="${i#*=}" + shift # past argument=value + ;; -i=*|--install_path=*) - INSTALL_PATH="${i#*=}"/usr/ - shift # past argument=value - ;; + INSTALL_PATH="${i#*=}"/usr/ + shift # past argument=value + ;; -j*) - CORES=$i - shift # past argument=value - ;; + CORES=$i + shift # past argument=value + ;; --double_precision) - DOUBLE_PRECISION_OPTION="--double_precision" - shift # past argument=value - ;; + DOUBLE_PRECISION_OPTION="--double_precision" + shift # past argument=value + ;; *) - # unknown option - ;; + # unknown option + ;; esac done