diff --git a/.github/stale.yml b/.github/stale.yml
index 2c77dc1c0..e50822a1b 100644
--- a/.github/stale.yml
+++ b/.github/stale.yml
@@ -34,9 +34,10 @@ staleLabel: wontfix
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
- This issue has been automatically marked as stale because it has not had
- recent activity. It will be closed if no further activity occurs. Thank you
- for your contributions.
+ This issue has been automatically marked as stale because it has not had recent activity. The resources of the VCLab team are limited, and so we are asking for your help.
+ If this is a bug and you can still reproduce this error on the last release of MeshLab, please reply with all of the information you have about it in order to keep the issue open.
+ If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
+ This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml
index e3efc79eb..71feb6740 100644
--- a/.github/workflows/CreateRelease.yml
+++ b/.github/workflows/CreateRelease.yml
@@ -8,10 +8,6 @@ on:
description: 'New MeshLab Version'
required: true
default: 'YYYY.MM'
- release_candidate:
- description: 'Is release candidate'
- required: true
- default: 'false'
jobs:
@@ -40,7 +36,7 @@ jobs:
linux_build:
needs: [update_ml_version]
name: Build MeshLab (Linux)
- runs-on: ubuntu-16.04 #in order to deploy, need to use oldest supported version
+ runs-on: ubuntu-18.04 #in order to deploy, need to use oldest supported version
strategy:
matrix:
precision: [single_precision, double_precision]
@@ -54,7 +50,7 @@ jobs:
uses: jurplel/install-qt-action@v2
- name: Install dependencies
run: |
- sudo apt-get install -y mesa-common-dev libglu1-mesa-dev libgmp-dev
+ 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
- name: Setup env variables
@@ -66,15 +62,10 @@ jobs:
else
echo ::set-output name=artifact_suffix::""
fi
- if [ "${{ github.event.inputs.release_candidate }}" == "true" ]; then
- echo ::set-output name=rc_option::"-rc"
- else
- echo ::set-output name=rc_option::""
- fi
- name: Configure and Build
shell: bash
run: |
- bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }} ${{steps.envs.outputs.rc_option}}
+ bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
- name: Deploy
shell: bash
run: |
@@ -109,7 +100,7 @@ jobs:
submodules: true
- name: Install dependencies
run: |
- brew install libomp xerces-c
+ brew install libomp cgal xerces-c
npm install -g appdmg
- name: Install Qt
uses: jurplel/install-qt-action@v2
@@ -122,19 +113,32 @@ jobs:
else
echo ::set-output name=artifact_suffix::""
fi
- if [ "${{ github.event.inputs.release_candidate }}" == "true" ]; then
- echo ::set-output name=rc_option::"-rc"
- else
- echo ::set-output name=rc_option::""
- fi
- name: Configure and Build
shell: bash
run: |
- bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }} ${{steps.envs.outputs.rc_option}}
+ bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
- name: Deploy
shell: bash
run: |
bash scripts/${{ runner.os }}/2_deploy.sh
+ - name: Import Cert and Key
+ uses: apple-actions/import-codesign-certs@v1
+ with:
+ p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
+ p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
+ - name: Sign
+ run: |
+ codesign --options "runtime" --timestamp --force --deep --sign ${{ secrets.MACOS_CERT_ID }} src/install/meshlab.app
+ - name: Notarize
+ uses: devbotsxyz/xcode-notarize@v1
+ with:
+ product-path: "src/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"
- name: Create MeshLab DMG
shell: bash
run: |
@@ -176,16 +180,26 @@ jobs:
else
echo ::set-output name=artifact_suffix::""
fi
- if [ "${{ github.event.inputs.release_candidate }}" == "true" ]; then
- echo ::set-output name=rc_option::"-rc"
- else
- echo ::set-output name=rc_option::""
- fi
echo "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC" >> $GITHUB_ENV
+ - name: Expand PATH for wget
+ run: |
+ echo "C:\msys64\usr\bin\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+ - name: Set Certificate
+ run: |
+ New-Item -ItemType directory -Path certificate
+ Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_CERTIFICATE }}'
+ certutil -decode certificate\certificate.txt certificate\certificate.pfx
+ - name: Download external libraries
+ shell: bash
+ run: |
+ bash scripts/${{ runner.os }}/0_download_ext.sh
- name: Configure and Build
shell: bash
run: |
- bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }} ${{steps.envs.outputs.rc_option}}
+ bash scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }}
+ - name: Sign Portable content
+ run: |
+ .\scripts\Windows\resources\windows_sign_dlls.ps1 -pssw '${{ secrets.WIN_CERTIFICATE_PWD }}' -path 'src\install\'
- name: Deploy
shell: bash
run: |
@@ -201,7 +215,11 @@ jobs:
- name: Move Installer
shell: bash
run: |
- mv src/install/MeshLab*-windows.exe src/
+ mkdir src/installer
+ mv src/install/MeshLab*-windows.exe src/installer
+ - name: Sign Installer
+ run: |
+ .\scripts\Windows\resources\windows_sign_dlls.ps1 -pssw '${{ secrets.WIN_CERTIFICATE_PWD }}' -path 'src\installer\'
- name: Uploading MeshLab Portable
uses: actions/upload-artifact@v2
with:
@@ -211,7 +229,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: meshlab_windows_installer${{steps.envs.outputs.artifact_suffix}}
- path: src/MeshLab*-windows.exe
+ path: src/installer/MeshLab*-windows.exe
#after building MeshLab for the three platforms, we create a release in github
create_release:
@@ -259,10 +277,11 @@ jobs:
chmod +x meshlab_linux_portable_double/AppRun
- name: Create MeshLab Portable Linux Archive
run: |
- mv meshlab_linux_portable MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}
- tar -cvzf MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-linux.tar.gz MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}/
- mv meshlab_linux_portable_double MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}
- tar -cvzf MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-linux.tar.gz MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}/
+ cd meshlab_linux_portable
+ tar -cvzf ../MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-linux.tar.gz *
+ cd ../meshlab_linux_portable_double
+ tar -cvzf ../MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-linux.tar.gz *
+ cd ..
#Download MacOS Package
- name: Download MacOS DMG
@@ -285,13 +304,17 @@ jobs:
with:
name: meshlab_macos_portable_double
path: meshlab_macos_portable_double
+ - name: Change Permissions
+ run: |
+ chmod +x meshlab_macos_portable/MeshLab*.app/Contents/MacOS/meshlab
+ chmod +x meshlab_macos_portable_double/MeshLab*.app/Contents/MacOS/meshlab
- name: Create MeshLab Portable MacOS
run: |
- mv meshlab_macos_portable MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}.app
- zip -r MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.zip MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}.app/
- rm -r MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}.app
- mv meshlab_macos_portable_double MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}.app
- zip -r MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.zip MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}.app/
+ cd meshlab_macos_portable
+ tar -cvzf ../MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.tar.gz *
+ cd ../meshlab_macos_portable_double
+ tar -cvzf ../MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.tar.gz *
+ cd ..
#Download Windows Packages
- name: Download Windows ZIP
@@ -316,10 +339,11 @@ jobs:
path: meshlab_windows_installer_double
- name: Create MeshLab Portable Windows Archive
run: |
- mv meshlab_windows_portable MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}
- zip -r MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-windows.zip MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}/
- mv meshlab_windows_portable_double MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}
- zip -r MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-windows.zip MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}/
+ cd meshlab_windows_portable
+ zip -r ../MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-windows.zip *
+ cd ../meshlab_windows_portable_double
+ zip -r ../MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-windows.zip *
+ cd ..
#Create release and upload
@@ -402,8 +426,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.zip
- asset_name: MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.zip
+ asset_path: MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.tar.gz
+ asset_name: MeshLab${{ github.event.inputs.version }}${{steps.envs.outputs.rc_suffix}}-macos.tar.gz
asset_content_type: MeshLab Portable for MacOS
- name: Upload ReleaseMacOSPortable-d
id: upload-release-macos-portable-d
@@ -412,8 +436,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.zip
- asset_name: MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.zip
+ asset_path: MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.tar.gz
+ asset_name: MeshLab${{ github.event.inputs.version }}d${{steps.envs.outputs.rc_suffix}}-macos.tar.gz
asset_content_type: MeshLab Portable for MacOS
#Windows
- name: Upload ReleaseWindowsPortable
diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml
index e929adcc6..388ea30d7 100644
--- a/.github/workflows/Linux.yml
+++ b/.github/workflows/Linux.yml
@@ -6,7 +6,7 @@ on:
jobs:
linux_build:
name: Build MeshLab (Linux)
- runs-on: ubuntu-16.04 #in order to deploy, need to use oldest supported version
+ runs-on: ubuntu-18.04 #in order to deploy, need to use oldest supported version
strategy:
matrix:
precision: [single_precision, double_precision]
@@ -19,7 +19,7 @@ jobs:
uses: jurplel/install-qt-action@v2
- name: Install dependencies
run: |
- sudo apt-get install -y mesa-common-dev libglu1-mesa-dev libgmp-dev
+ 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
- name: Setup env variables
diff --git a/.github/workflows/MacOS.yml b/.github/workflows/MacOS.yml
index 396dd8386..8d3414754 100644
--- a/.github/workflows/MacOS.yml
+++ b/.github/workflows/MacOS.yml
@@ -17,7 +17,7 @@ jobs:
submodules: true
- name: Install dependencies
run: |
- brew install libomp xerces-c
+ brew install libomp cgal xerces-c
npm install -g appdmg
- name: Install Qt
uses: jurplel/install-qt-action@v2
diff --git a/.github/workflows/QmakeBuilds.yml b/.github/workflows/QmakeBuilds.yml
index f4e22cf21..959c1505d 100644
--- a/.github/workflows/QmakeBuilds.yml
+++ b/.github/workflows/QmakeBuilds.yml
@@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
ubuntu_build:
name: Build MeshLab (Ubuntu - QMake)
- runs-on: ubuntu-16.04 #in order to deploy, need to use oldest supported version
+ runs-on: ubuntu-18.04 #in order to deploy, need to use oldest supported version
steps:
- uses: actions/checkout@v2
diff --git a/.github/workflows/Windows.yml b/.github/workflows/Windows.yml
index 517d948cd..aad3ede70 100644
--- a/.github/workflows/Windows.yml
+++ b/.github/workflows/Windows.yml
@@ -28,6 +28,13 @@ jobs:
echo ::set-output name=artifact_suffix::""
fi
echo "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC" >> $GITHUB_ENV
+ - name: Expand PATH for wget
+ run: |
+ echo "C:\msys64\usr\bin\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+ - name: Download external libraries
+ shell: bash
+ run: |
+ bash scripts/${{ runner.os }}/0_download_ext.sh
- name: Configure and Build
shell: bash
run: |
@@ -47,7 +54,8 @@ jobs:
- name: Move Installer
shell: bash
run: |
- mv src/install/MeshLab*-windows.exe src/
+ mkdir src/installer
+ mv src/install/MeshLab*-windows.exe src/installer/
- name: Uploading MeshLab Portable
uses: actions/upload-artifact@v2
with:
@@ -57,4 +65,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: meshlab_windows_installer${{steps.envs.outputs.artifact_suffix}}
- path: src/MeshLab*-windows.exe
+ path: src/installer/MeshLab*-windows.exe
diff --git a/.gitignore b/.gitignore
index c2b4b17fb..efbed3b20 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,8 @@
distrib*
src/build/*
src/install/*
+src/external/boost_1_75_0
+src/external/CGAL-5.2.1
install/macos/resources/meshlab_dmg_final.json
install/windows/resources/meshlab_final.nsi
install/windows/resources/MeshLab*.exe
diff --git a/ML_VERSION b/ML_VERSION
index ee102115d..70814c3c6 100644
--- a/ML_VERSION
+++ b/ML_VERSION
@@ -1 +1 @@
-2020.12
\ No newline at end of file
+2021.05
\ No newline at end of file
diff --git a/scripts/Linux/1_build.sh b/scripts/Linux/1_build.sh
index fe733c245..3ee569bd7 100644
--- a/scripts/Linux/1_build.sh
+++ b/scripts/Linux/1_build.sh
@@ -19,7 +19,6 @@ INSTALL_PATH=$SOURCE_PATH/install/usr/
CORES="-j4"
DOUBLE_PRECISION_OPTION=""
NIGHTLY_OPTION=""
-RC_OPTION=""
#check parameters
for i in "$@"
@@ -45,10 +44,6 @@ case $i in
NIGHTLY_OPTION="-DMESHLAB_IS_NIGHTLY_VERSION=ON"
shift # past argument=value
;;
- -rc|--release_candidate)
- RC_OPTION="-DMESHLAB_IS_RELEASE_CANDIDATE_VERSION=ON"
- shift # past argument=value
- ;;
*)
# unknown option
;;
@@ -71,6 +66,6 @@ BUILD_PATH=$(realpath $BUILD_PATH)
INSTALL_PATH=$(realpath $INSTALL_PATH)
cd $BUILD_PATH
-cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $RC_OPTION $SOURCE_PATH
+cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $SOURCE_PATH
make $CORES
make install
diff --git a/scripts/Linux/2_deploy.sh b/scripts/Linux/2_deploy.sh
index cc876c949..a0f61fb6a 100644
--- a/scripts/Linux/2_deploy.sh
+++ b/scripts/Linux/2_deploy.sh
@@ -35,6 +35,7 @@ $SCRIPTS_PATH/resources/linuxdeployqt $INSTALL_PATH/usr/share/applications/meshl
-executable=$INSTALL_PATH/usr/lib/meshlab/plugins/libfilter_sketchfab.so \
-executable=$INSTALL_PATH/usr/lib/meshlab/plugins/libio_3ds.so \
-executable=$INSTALL_PATH/usr/lib/meshlab/plugins/libio_ctm.so \
+ -executable=$INSTALL_PATH/usr/lib/meshlab/plugins/libfilter_mesh_booleans.so \
-executable=$INSTALL_PATH/usr/lib/meshlab/plugins/libio_e57.so
diff --git a/scripts/Linux/resources/linuxdeployqt b/scripts/Linux/resources/linuxdeployqt
index 917645b94..b719d214d 100755
Binary files a/scripts/Linux/resources/linuxdeployqt and b/scripts/Linux/resources/linuxdeployqt differ
diff --git a/scripts/Linux/resources/make_bundle.sh b/scripts/Linux/resources/make_bundle.sh
index 7dafa6980..ac8ce4d8d 100644
--- a/scripts/Linux/resources/make_bundle.sh
+++ b/scripts/Linux/resources/make_bundle.sh
@@ -25,16 +25,14 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_PATH
#check if we have an exec in distrib
if ! [ -f $INSTALL_PATH/usr/bin/meshlab ]
then
- echo "ERROR: meshlab bin not found inside $INSTALL_PATH/usr/bin/"
- exit 1
+ echo "ERROR: meshlab bin not found inside $INSTALL_PATH/usr/bin/"
+ exit 1
fi
mkdir -p $INSTALL_PATH/usr/share/doc/meshlab
-mkdir -p $INSTALL_PATH/usr/share/icons/hicolor/512x512/apps/
mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/512x512/apps/
cp $SCRIPTS_PATH/resources/meshlab_appimage.desktop $INSTALL_PATH/usr/share/applications/meshlab.desktop
-cp $DISTRIB_PATH/meshlab.png $INSTALL_PATH/usr/share/icons/hicolor/512x512/apps/meshlab.png
cp $DISTRIB_PATH/meshlab.png $INSTALL_PATH/usr/share/icons/Yaru/512x512/apps/meshlab.png
cp $DISTRIB_PATH/LICENSE.txt $INSTALL_PATH/usr/share/doc/meshlab/
cp $DISTRIB_PATH/privacy.txt $INSTALL_PATH/usr/share/doc/meshlab/
diff --git a/scripts/Linux/resources/meshlab.desktop b/scripts/Linux/resources/meshlab.desktop
index 44b5a09d7..253a6403b 100644
--- a/scripts/Linux/resources/meshlab.desktop
+++ b/scripts/Linux/resources/meshlab.desktop
@@ -7,7 +7,7 @@ GenericName[en_GB]=Mesh processing
Comment=View and process meshes
Type=Application
Exec=meshlab %F
-Icon=/usr/share/pixmaps/meshlab.png
+Icon=meshlab
Terminal=false
MimeType=model/mesh;application/x-3ds;image/x-3ds;model/x-ply;application/sla;model/x-quad-object;model/x-geomview-off;application/x-cyclone-ptx;application/x-vmi;application/x-bre;model/vnd.collada+xml;model/openctm;application/x-expe-binary;application/x-expe-ascii;application/x-xyz;application/x-gts;chemical/x-pdb;application/x-tri;application/x-asc;model/x3d+xml;model/x3d+vrml;model/vrml;model/u3d;model/idtf;
Categories=Graphics;3DGraphics;Viewer;Qt;
diff --git a/scripts/Linux/resources/snap/snap_noversion.yaml b/scripts/Linux/resources/snap/snap_noversion.yaml
index 014fd9b3b..b5e163922 100644
--- a/scripts/Linux/resources/snap/snap_noversion.yaml
+++ b/scripts/Linux/resources/snap/snap_noversion.yaml
@@ -18,9 +18,14 @@ apps:
meshlab:
command: AppRun
extensions: [kde-neon]
- plugs: [home, opengl, removable-media]
desktop: usr/share/applications/meshlab.desktop
-
+ environment:
+ DISABLE_WAYLAND: 1
+ plugs:
+ - home
+ - opengl
+ - removable-media
+ - mount-observe
parts:
meshlab:
@@ -43,6 +48,8 @@ parts:
- patchelf
- rsync
- libqt5opengl5-dev
+ - libcgal-dev
+ - libboost-all-dev
stage-packages:
- lib3ds-1-3
- libgomp1
diff --git a/scripts/Windows/0_download_ext.sh b/scripts/Windows/0_download_ext.sh
new file mode 100644
index 000000000..aad08b5cd
--- /dev/null
+++ b/scripts/Windows/0_download_ext.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#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
+
+wget https://github.com/CGAL/cgal/releases/download/v5.2.1/CGAL-5.2.1-win64-auxiliary-libraries-gmp-mpfr.zip
+unzip -o CGAL-5.2.1-win64-auxiliary-libraries-gmp-mpfr.zip -d CGAL-5.2.1/
+rm CGAL-5.2.1-win64-auxiliary-libraries-gmp-mpfr.zip
diff --git a/scripts/Windows/1_build.sh b/scripts/Windows/1_build.sh
index e9faa9aab..1b9ff4857 100644
--- a/scripts/Windows/1_build.sh
+++ b/scripts/Windows/1_build.sh
@@ -18,7 +18,6 @@ BUILD_PATH=$SOURCE_PATH/build
INSTALL_PATH=$SOURCE_PATH/install
DOUBLE_PRECISION_OPTION=""
NIGHTLY_OPTION=""
-RC_OPTION=""
#check parameters
for i in "$@"
@@ -40,10 +39,6 @@ case $i in
NIGHTLY_OPTION="-DMESHLAB_IS_NIGHTLY_VERSION=ON"
shift # past argument=value
;;
- -rc|--release_candidate)
- RC_OPTION="-DMESHLAB_IS_RELEASE_CANDIDATE_VERSION=ON"
- shift # past argument=value
- ;;
*)
# unknown option
;;
@@ -70,6 +65,6 @@ echo "INSTALL PATH: "$INSTALL_PATH
echo "SCRIPTS PATH: "$SCRIPTS_PATH
cd $BUILD_PATH
-cmake -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $RC_OPTION $SOURCE_PATH
+cmake -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $SOURCE_PATH
ninja
ninja install
diff --git a/scripts/Windows/resources/windows_sign_dlls.ps1 b/scripts/Windows/resources/windows_sign_dlls.ps1
new file mode 100644
index 000000000..e54fc05aa
--- /dev/null
+++ b/scripts/Windows/resources/windows_sign_dlls.ps1
@@ -0,0 +1,12 @@
+param($pssw, $path, $cert_path="")
+
+if ([string]::IsNullOrEmpty($cert_path)) {
+ $cert_path = Join-Path $PSScriptRoot ..\..\..\certificate\certificate.pfx
+}
+
+$files = Get-ChildItem $path -include ('*.exe', '*.dll') -Recurse
+
+for ($i=0; $i -lt $files.Count; $i++) {
+ $file = $files[$i].FullName
+ signtool.exe sign /f $cert_path /p $pssw /t http://timestamp.comodoca.com/authenticode $file
+}
diff --git a/scripts/macOS/1_build.sh b/scripts/macOS/1_build.sh
index e0342cc52..d00193ee1 100644
--- a/scripts/macOS/1_build.sh
+++ b/scripts/macOS/1_build.sh
@@ -24,7 +24,6 @@ INSTALL_PATH=$SOURCE_PATH/install
CORES="-j4"
DOUBLE_PRECISION_OPTION=""
NIGHTLY_OPTION=""
-RC_OPTION=""
#check parameters
for i in "$@"
@@ -50,10 +49,6 @@ case $i in
NIGHTLY_OPTION="-DMESHLAB_IS_NIGHTLY_VERSION=ON"
shift # past argument=value
;;
- -rc|--release_candidate)
- RC_OPTION="-DMESHLAB_IS_RELEASE_CANDIDATE_VERSION=ON"
- shift # past argument=value
- ;;
*)
# unknown option
;;
@@ -73,6 +68,6 @@ then
fi
cd $BUILD_PATH
-cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $RC_OPTION $SOURCE_PATH
+cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $SOURCE_PATH
make $CORES
make install
diff --git a/scripts/macOS/2_deploy.sh b/scripts/macOS/2_deploy.sh
index aadea6e33..3082eccda 100755
--- a/scripts/macOS/2_deploy.sh
+++ b/scripts/macOS/2_deploy.sh
@@ -47,4 +47,11 @@ else
MACDEPLOYQT_EXE=macdeployqt
fi
-${MACDEPLOYQT_EXE} $INSTALL_PATH/$APPNAME -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libedit_align.so -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_csg.so -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_isoparametrization.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
+${MACDEPLOYQT_EXE} $INSTALL_PATH/$APPNAME \
+ -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libedit_align.so \
+ -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_csg.so \
+ -executable=$INSTALL_PATH/$APPNAME/Contents/PlugIns/libfilter_isoparametrization.so \
+ -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
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 53e7ff4e1..623eaf61d 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,7 +1,7 @@
# Known to build in Ubuntu 18.04, 20.04
name: meshlab
base: core18
-version: '2020.12'
+version: '2021.05'
summary: MeshLab
description: |
The open source system for processing and editing 3D triangular meshes.
@@ -18,9 +18,14 @@ apps:
meshlab:
command: AppRun
extensions: [kde-neon]
- plugs: [home, opengl, removable-media]
desktop: usr/share/applications/meshlab.desktop
-
+ environment:
+ DISABLE_WAYLAND: 1
+ plugs:
+ - home
+ - opengl
+ - removable-media
+ - mount-observe
parts:
meshlab:
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 10bd4847e..0fbd03138 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,24 +2,18 @@
# Copyright 2019, 2021, Visual Computing Lab, ISTI - Italian National Research Council
# SPDX-License-Identifier: BSL-1.0
-cmake_minimum_required(VERSION 3.13)
+cmake_minimum_required(VERSION 3.10)
project(MeshLab)
-set(CMAKE_CXX_STANDARD 11)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
### Build options
-option(ALLOW_BUNDLED_EXTERNAL_MESHLAB_LIBRARIES "Allow to build bundled external libraries sources" ON)
option(BUILD_MINI "Build only a minimal set of plugins" OFF)
-option(BUILD_SERVER "Build a command-line server application" OFF)
option(BUILD_STRICT "Strictly enforce resolution of all symbols" ON)
option(BUILD_WITH_DOUBLE_SCALAR "Use double type instead of float type for scalars" OFF)
option(BUILD_ONLY_MESHLAB_LIBRARIES "Build only meshlab-common and plugins" OFF)
option(USE_DEFAULT_BUILD_AND_INSTALL_DIRS "If set to OFF, it expects that you set manually the binary and install directories" ON)
-option(MESHLAB_IS_RELEASE_CANDIDATE_VERSION "" OFF)
-option(MESHLAB_IS_NIGHTLY_VERSION "" OFF)
+option(MESHLAB_IS_NIGHTLY_VERSION "Nightly version of meshlab will be used instead of ML_VERSION" OFF)
### Dependencies
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
@@ -112,18 +106,12 @@ endif()
# External
set(EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external)
-include(${EXTERNAL_DIR}/external_common.cmake)
-if((NOT BUILD_MINI) AND (ALLOW_BUNDLED_EXTERNAL_MESHLAB_LIBRARIES))
- add_subdirectory(${EXTERNAL_DIR})
-endif()
+add_subdirectory(${EXTERNAL_DIR})
add_subdirectory(common)
if (NOT BUILD_ONLY_MESHLAB_LIBRARIES)
add_subdirectory(meshlab)
- if(BUILD_SERVER)
- add_subdirectory(meshlabserver)
- endif()
if(WIN32 AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/use_cpu_opengl")
add_subdirectory(use_cpu_opengl)
endif()
@@ -172,7 +160,6 @@ if(NOT DEFINED MESHLAB_PLUGINS) # it may be already defined in parent directory
meshlabplugins/filter_color_projection
meshlabplugins/filter_colorproc
meshlabplugins/filter_create
- meshlabplugins/filter_csg
meshlabplugins/filter_dirt
meshlabplugins/filter_fractal
meshlabplugins/filter_func
@@ -180,6 +167,7 @@ if(NOT DEFINED MESHLAB_PLUGINS) # it may be already defined in parent directory
meshlabplugins/filter_isoparametrization
meshlabplugins/filter_layer
meshlabplugins/filter_measure
+ meshlabplugins/filter_mesh_booleans
meshlabplugins/filter_meshing
meshlabplugins/filter_mls
meshlabplugins/filter_mutualglobal
@@ -194,6 +182,7 @@ if(NOT DEFINED MESHLAB_PLUGINS) # it may be already defined in parent directory
meshlabplugins/filter_sketchfab
meshlabplugins/filter_ssynth
meshlabplugins/filter_texture
+ meshlabplugins/filter_texture_defragmentation
meshlabplugins/filter_trioptimize
meshlabplugins/filter_unsharp
meshlabplugins/filter_voronoi
@@ -279,7 +268,7 @@ if (NOT BUILD_ONLY_MESHLAB_LIBRARIES)
if(NOT WIN32 AND NOT APPLE)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/Linux/resources/meshlab.desktop" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/meshlab.png" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps)
+ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/meshlab.png" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps)
endif()
endif()
diff --git a/src/README.md b/src/README.md
index 9810e861a..7dad58ffb 100644
--- a/src/README.md
+++ b/src/README.md
@@ -8,7 +8,6 @@ The source code of MeshLab is structured in the following directories:
* [external](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/external): it contains a series of external libraries needed by several plugins. Some of these libraries are compiled before the compilation of meshlab, if a corresponding system library is not found and then linked; other are header-only libraries that are just included;
* [common](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/common): a series of utility classes and functions used by MeshLab and its plugins;
* [meshlab](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/meshlab): GUI and core of MeshLab;
- * [meshlabserver](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/meshlabserver): a tool that allows to compute mesh operations through command line;
* [meshlabplugins](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/meshlabplugins): all the plugins that can be added to MeshLab;
* [use_cpu_opengl](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/use_cpu_opengl): a tool compiled only under windows that allows to use non-GPU accelerated OpenGL calls;
* [vcglib](https://github.com/cnr-isti-vclab/meshlab/tree/master/src/vcglib): submodule containing the vcglib.
diff --git a/src/cmake/meshlab_global_settings.cmake b/src/cmake/meshlab_global_settings.cmake
index 7c593f57f..0aa198c00 100644
--- a/src/cmake/meshlab_global_settings.cmake
+++ b/src/cmake/meshlab_global_settings.cmake
@@ -2,14 +2,15 @@
# Copyright 2019, 2020, Visual Computing Lab, ISTI - Italian National Research Council
# SPDX-License-Identifier: BSL-1.0
-# Prefer GLVND
+# Prefer OpenGL GLVND
if(POLICY CMP0072)
cmake_policy(SET CMP0072 NEW)
endif()
### Build settings
set(CMAKE_C_STANDARD 99)
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X deployment version" FORCE)
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index b1f377488..ccafc27ff 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -1,15 +1,13 @@
#version management
string(TIMESTAMP MESHLAB_VERSION "%Y.%m")
-if (MESHLAB_IS_RELEASE_CANDIDATE_VERSION AND MESHLAB_IS_NIGHTLY_VERSION)
- message(FATAL_ERROR "Both nightly and release candidate options are set to ON. Choose one.")
-endif()
+
if (MESHLAB_IS_NIGHTLY_VERSION)
# nightly version is in the form:
# YYYY.mm[d]_nightly_GIT_SHA1
# YYYY and mm are computed by cmake and not read from file
find_package(Git)
execute_process(COMMAND
- "${GIT_EXECUTABLE}" describe --match=NeVeRmAtCh --always --abbrev=6
+ "${GIT_EXECUTABLE}" describe --match=NeVeRmAtCh --always --abbrev=7
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_SHA1
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -23,13 +21,9 @@ else()
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../../ML_VERSION" MESHLAB_VERSION)
endif()
# if double precision version, "d" is appended
- # if release candidate, "_rc" is appended
if (BUILD_WITH_DOUBLE_SCALAR)
set(MESHLAB_VERSION "${MESHLAB_VERSION}d")
endif()
- if (MESHLAB_IS_RELEASE_CANDIDATE_VERSION)
- set(MESHLAB_VERSION "${MESHLAB_VERSION}_rc")
- endif()
endif()
message(STATUS "MeshLab version: ${MESHLAB_VERSION}")
@@ -82,9 +76,6 @@ set(HEADERS
GLExtensionsManager.h
GLLogStream.h
filterscript.h
- mainwindow_interface.h
- meshlabdocumentbundler.h
- meshlabdocumentxml.h
ml_selection_buffers.h
ml_thread_safe_memory_info.h
mlapplication.h
@@ -125,13 +116,12 @@ set(SOURCES
GLExtensionsManager.cpp
GLLogStream.cpp
filterscript.cpp
- meshlabdocumentbundler.cpp
- meshlabdocumentxml.cpp
ml_selection_buffers.cpp
ml_thread_safe_memory_info.cpp
mlapplication.cpp
- searcher.cpp
- ${EXTERNAL_DIR}/easyexif/exif.cpp)
+ searcher.cpp)
+
+set(RESOURCES meshlab-common.qrc)
set(TARGET_TYPE SHARED)
if(WIN32)
@@ -145,8 +135,6 @@ target_compile_definitions(meshlab-common
MESHLAB_SCALAR=${MESHLAB_SCALAR})
target_include_directories(meshlab-common
- PRIVATE
- ${EXTERNAL_DIR}/easyexif/
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/..)
@@ -160,6 +148,7 @@ target_link_libraries(
Qt5::Network
vcglib
external-glew
+ external-exif
)
set_property(TARGET meshlab-common PROPERTY FOLDER Core)
diff --git a/src/common/GLExtensionsManager.cpp b/src/common/GLExtensionsManager.cpp
index 985260d56..e9aa7134e 100644
--- a/src/common/GLExtensionsManager.cpp
+++ b/src/common/GLExtensionsManager.cpp
@@ -61,7 +61,7 @@ void GLExtensionsManager::initializeGLextensions()
if (!glewInitialized) {
glewExperimental = GL_TRUE;
GLenum err = glewInit();
- if (err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY) {
+ if (err != GLEW_OK) {
throw MLException(QString("GLEW initialization failed: %1\n")
.arg((const char *)glewGetErrorString(err)));
}
diff --git a/src/common/common.pro b/src/common/common.pro
index 2a8346c3a..b80f4f6dd 100644
--- a/src/common/common.pro
+++ b/src/common/common.pro
@@ -75,12 +75,10 @@ HEADERS += \
GLExtensionsManager.h \
filterscript.h \
GLLogStream.h \
- mainwindow_interface.h \
mlexception.h \
mlapplication.h \
- meshlabdocumentxml.h \
- ml_selection_buffers.h \
- meshlabdocumentxml.h
+ ml_selection_buffers.h
+
SOURCES += \
globals.cpp \
@@ -118,11 +116,12 @@ SOURCES += \
GLLogStream.cpp \
mlapplication.cpp \
searcher.cpp \
- meshlabdocumentxml.cpp \
- meshlabdocumentbundler.cpp \
ml_selection_buffers.cpp \
$$MESHLAB_EXTERNAL_DIRECTORY/easyexif/exif.cpp
+RESOURCES += \
+ meshlab-common.qrc
+
macx:QMAKE_POST_LINK = "\
if [ -d $$MESHLAB_DISTRIB_DIRECTORY/meshlab.app/Contents/Frameworks/ ]; \
then \
diff --git a/src/common/img/dummy.png b/src/common/img/dummy.png
new file mode 100644
index 000000000..03c4c8d2c
Binary files /dev/null and b/src/common/img/dummy.png differ
diff --git a/src/common/meshlab-common.qrc b/src/common/meshlab-common.qrc
new file mode 100644
index 000000000..e7301593c
--- /dev/null
+++ b/src/common/meshlab-common.qrc
@@ -0,0 +1,5 @@
+
+
+ img/dummy.png
+
+
diff --git a/src/common/meshlabdocumentbundler.cpp b/src/common/meshlabdocumentbundler.cpp
deleted file mode 100644
index 6244c706b..000000000
--- a/src/common/meshlabdocumentbundler.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "ml_document/mesh_document.h"
-#include
-#include "meshlabdocumentbundler.h"
-
-#include
-
-#include
-#include
-
-bool MeshDocumentFromBundler(MeshDocument &md, QString filename_out,QString image_list_filename, QString model_filename)
-{
- md.addNewMesh(model_filename,QString("model"));
- std::vector shots;
- const QString path = QFileInfo(filename_out).absolutePath();
- const QString path_im = QFileInfo(image_list_filename).absolutePath()+QString("/");
-
- std::vector image_filenames;
- vcg::tri::io::ImporterOUT::Open(md.mm()->cm,shots,image_filenames, qUtf8Printable(filename_out), qUtf8Printable(image_list_filename));
- md.mm()->updateDataMask(MeshModel::MM_VERTCOLOR);
-
- QString curr_path = QDir::currentPath();
- QFileInfo imi(image_list_filename);
-
- //
- QStringList image_filenames_q;
- for(unsigned int i = 0; i < image_filenames.size(); ++i)
- {
- QImageReader sizeImg(QString::fromStdString(image_filenames[i]));
- if(sizeImg.size()==QSize(-1,-1))
- image_filenames_q.push_back(path_im+QString::fromStdString(image_filenames[i]));
- else
- image_filenames_q.push_back(QString::fromStdString(image_filenames[i]));
- }
- QDir::setCurrent(imi.absoluteDir().absolutePath());
-
- for(size_t i=0 ; iaddPlane(new RasterPlane(fullpath_image_filename,RasterPlane::RGBA));
- int count=fullpath_image_filename.count('\\');
- if (count==0)
- {
- count=fullpath_image_filename.count('/');
- md.rm()->setLabel(fullpath_image_filename.section('/',count,1));
- }
- else
- md.rm()->setLabel(fullpath_image_filename.section('\\',count,1));
- md.rm()->shot = shots[i];
- }
- QDir::setCurrent(curr_path);
-
- return true;
-}
-
-bool MeshDocumentFromNvm(MeshDocument &md, QString filename_nvm, QString model_filename)
-{
- md.addNewMesh(model_filename,QString("model"));
- std::vector shots;
- const QString path = QFileInfo(filename_nvm).absolutePath();
- //const QString path_im = QFileInfo(image_list_filename).absolutePath()+QString("/");
-
- std::vector image_filenames;
- vcg::tri::io::ImporterNVM::Open(md.mm()->cm,shots,image_filenames, qUtf8Printable(filename_nvm));
- md.mm()->updateDataMask(MeshModel::MM_VERTCOLOR);
-
- QString curr_path = QDir::currentPath();
- //QFileInfo imi(image_list_filename);
-
- //QDir::setCurrent(imi.absoluteDir().absolutePath());
- QStringList image_filenames_q;
- for(size_t i = 0; i < image_filenames.size(); ++i)
- image_filenames_q.push_back(QString::fromStdString(image_filenames[int(i)]));
-
- for(size_t i=0 ; iaddPlane(new RasterPlane(fullpath_image_filename,RasterPlane::RGBA));
- md.rm()->setLabel(image_filenames_q[int(i)].section('/',1,2));
- md.rm()->shot = shots[int(i)];
- /*md.rm()->shot.Intrinsics.ViewportPx[0]=md.rm()->currentPlane->image.width();
- md.rm()->shot.Intrinsics.ViewportPx[1]=md.rm()->currentPlane->image.height();
- md.rm()->shot.Intrinsics.CenterPx[0]=(int)((double)md.rm()->shot.Intrinsics.ViewportPx[0]/2.0f);
- md.rm()->shot.Intrinsics.CenterPx[1]=(int)((double)md.rm()->shot.Intrinsics.ViewportPx[1]/2.0f);*/
-
- }
- QDir::setCurrent(curr_path);
-
- return true;
-}
diff --git a/src/common/meshlabdocumentbundler.h b/src/common/meshlabdocumentbundler.h
deleted file mode 100644
index 5d0db63b2..000000000
--- a/src/common/meshlabdocumentbundler.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __MESHLABDOC_BUNDLER_H
-#define __MESHLABDOC_BUNDLER_H
-
-#include "ml_document/mesh_model.h"
-
-bool MeshDocumentFromBundler(MeshDocument &md, QString filename_out, QString image_list_filename, QString model_filename);
-bool MeshDocumentFromNvm(MeshDocument &md, QString filename_nvm, QString model_filename);
-
-#endif // __MESHLABDOC_BUNDLER_H
diff --git a/src/common/meshlabdocumentxml.cpp b/src/common/meshlabdocumentxml.cpp
deleted file mode 100644
index 5594542df..000000000
--- a/src/common/meshlabdocumentxml.cpp
+++ /dev/null
@@ -1,297 +0,0 @@
-#include
-#include
-#include
-#include
-
-#include "meshlabdocumentxml.h"
-#include
-
-bool MeshDocumentToXMLFile(MeshDocument &md, QString filename, bool onlyVisibleLayers, bool saveViewState, bool binary, const std::map& rendOpt)
-{
- md.setFileName(filename);
- QFileInfo fi(filename);
- QDir tmpDir = QDir::current();
- QDir::setCurrent(fi.absoluteDir().absolutePath());
- QDomDocument doc = MeshDocumentToXML(md, onlyVisibleLayers, saveViewState, binary, rendOpt);
- QFile file(filename);
- file.open(QIODevice::WriteOnly);
- QTextStream qstream(&file);
- doc.save(qstream, 1);
- file.close();
- QDir::setCurrent(tmpDir.absolutePath());
- return true;
-}
-
-QDomElement Matrix44mToXML(Matrix44m &m, QDomDocument &doc)
-{
- QDomElement matrixElem = doc.createElement("MLMatrix44");
- QString Row[4];
- for (int i = 0; i < 4; ++i)
- Row[i] = QString("%1 %2 %3 %4 \n").arg(m[i][0]).arg(m[i][1]).arg(m[i][2]).arg(m[i][3]);
-
- QDomText nd = doc.createTextNode("\n" + Row[0] + Row[1] + Row[2] + Row[3]);
- matrixElem.appendChild(nd);
-
- return matrixElem;
-}
-
-QDomElement Matrix44mToBinaryXML(Matrix44m &m, QDomDocument &doc)
-{
- QDomElement matrixElem = doc.createElement("MLMatrix44");
- QByteArray value = QByteArray::fromRawData((char *)m.V(), sizeof(Matrix44m::ScalarType) * 16).toBase64();
- QDomText nd = doc.createTextNode(QString(value));
- matrixElem.appendChild(nd);
- return matrixElem;
-}
-
-bool MeshDocumentFromXML(MeshDocument &md, QString filename, bool binary, std::map& rendOpt)
-{
- QFile qf(filename);
- QFileInfo qfInfo(filename);
- QDir tmpDir = QDir::current();
- QDir::setCurrent(qfInfo.absoluteDir().absolutePath());
- if (!qf.open(QIODevice::ReadOnly))
- return false;
-
- QString project_path = qfInfo.absoluteFilePath();
-
- QDomDocument doc("MeshLabDocument"); //It represents the XML document
- if (!doc.setContent(&qf))
- return false;
-
- QDomElement root = doc.documentElement();
-
- QDomNode node;
-
- node = root.firstChild();
-
- //Devices
- while (!node.isNull()) {
- if (QString::compare(node.nodeName(), "MeshGroup") == 0)
- {
- QDomNode mesh; QString filen, label;
- mesh = node.firstChild();
- while (!mesh.isNull()) {
- //return true;
- filen = mesh.attributes().namedItem("filename").nodeValue();
- label = mesh.attributes().namedItem("label").nodeValue();
- bool visible = true;
- if (mesh.attributes().contains("visible"))
- visible = (mesh.attributes().namedItem("visible").nodeValue().toInt() == 1);
- MeshModel* mm = md.addNewMesh(filen, label);
- mm->visible = visible;
-
- if (mesh.attributes().contains("idInFile"))
- mm->setIdInFile(mesh.attributes().namedItem("idInFile").nodeValue().toInt());
-
- QDomNode tr = mesh.firstChildElement("MLMatrix44");
-
- if (!tr.isNull())
- {
- vcg::Matrix44f trm;
- if (tr.childNodes().size() == 1)
- {
- if (!binary)
- {
- QStringList rows = tr.firstChild().nodeValue().split("\n", QString::SkipEmptyParts);
- int i = 0;
- for (const QString& row : qAsConst(rows)){
- if (rows.size() > 0) {
- QStringList values = row.split(" ", QString::SkipEmptyParts);
- int j = 0;
- for (const QString& value : qAsConst(values)) {
- if (i < 4 && j < 4) {
- md.mm()->cm.Tr[i][j] = value.toFloat();
- j++;
- }
- }
- i++;
- }
- }
- }
- else
- {
- QString str = tr.firstChild().nodeValue();
- QByteArray value = QByteArray::fromBase64(str.toLocal8Bit());
- memcpy(md.mm()->cm.Tr.V(), value.data(), sizeof(Matrix44m::ScalarType) * 16);
- }
- }
- }
-
- QDomNode renderingOpt = mesh.firstChildElement("RenderingOption");
- if (!renderingOpt.isNull())
- {
- QString value = renderingOpt.firstChild().nodeValue();
- MLRenderingData::GLOptionsType opt;
- if (renderingOpt.attributes().contains("pointSize"))
- opt._perpoint_pointsize = renderingOpt.attributes().namedItem("pointSize").nodeValue().toFloat();
- if (renderingOpt.attributes().contains("wireWidth"))
- opt._perwire_wirewidth = renderingOpt.attributes().namedItem("wireWidth").nodeValue().toFloat();
- if (renderingOpt.attributes().contains("boxColor"))
- {
- QStringList values = renderingOpt.attributes().namedItem("boxColor").nodeValue().split(" ", QString::SkipEmptyParts);
- opt._perbbox_fixed_color = vcg::Color4b(values[0].toInt(), values[1].toInt(), values[2].toInt(), values[3].toInt());
- }
- if (renderingOpt.attributes().contains("pointColor"))
- {
- QStringList values = renderingOpt.attributes().namedItem("pointColor").nodeValue().split(" ", QString::SkipEmptyParts);
- opt._perpoint_fixed_color = vcg::Color4b(values[0].toInt(), values[1].toInt(), values[2].toInt(), values[3].toInt());
- }
- if (renderingOpt.attributes().contains("wireColor"))
- {
- QStringList values = renderingOpt.attributes().namedItem("wireColor").nodeValue().split(" ", QString::SkipEmptyParts);
- opt._perwire_fixed_color = vcg::Color4b(values[0].toInt(), values[1].toInt(), values[2].toInt(), values[3].toInt());
- }
- if (renderingOpt.attributes().contains("solidColor"))
- {
- QStringList values = renderingOpt.attributes().namedItem("solidColor").nodeValue().split(" ", QString::SkipEmptyParts);
- opt._persolid_fixed_color = vcg::Color4b(values[0].toInt(), values[1].toInt(), values[2].toInt(), values[3].toInt());
- }
- MLRenderingData data;
- data.set(opt);
- if (data.deserialize(value.toStdString()))
- rendOpt.insert(std::pair(mm->id(), data));
- }
-
- mesh = mesh.nextSibling();
- }
- }
- // READ IN POINT CORRESPONDECES INCOMPLETO!!
- else if (QString::compare(node.nodeName(), "RasterGroup") == 0)
- {
- QDomNode raster; QString filen, label;
- raster = node.firstChild();
- while (!raster.isNull())
- {
- //return true;
- md.addNewRaster();
- QString labelRaster = raster.attributes().namedItem("label").nodeValue();
- md.rm()->setLabel(labelRaster);
- QDomNode sh = raster.firstChild();
- ReadShotFromQDomNode(md.rm()->shot, sh);
-
- QDomElement el = raster.firstChildElement("Plane");
- while (!el.isNull())
- {
- QString filen = el.attribute("fileName");
- QFileInfo fi(filen);
- QString sem = el.attribute("semantic");
- QString nm = fi.absoluteFilePath();
- md.rm()->addPlane(new RasterPlane(fi.absoluteFilePath(), RasterPlane::RGBA));
- el = node.nextSiblingElement("Plane");
- }
- raster = raster.nextSibling();
- }
- }
- node = node.nextSibling();
- }
-
- QDir::setCurrent(tmpDir.absolutePath());
- qf.close();
- return true;
-}
-
-QDomElement MeshModelToXML(MeshModel *mp, QDomDocument &doc, bool binary, bool saveViewState, const MLRenderingData& rendOpt = MLRenderingData())
-{
- QDomElement meshElem = doc.createElement("MLMesh");
- meshElem.setAttribute("label", mp->label());
- meshElem.setAttribute("filename", mp->relativePathName());
- meshElem.setAttribute("visible", saveViewState?mp->isVisible():true);
- meshElem.setAttribute("idInFile", mp->idInFile());
- if (binary)
- meshElem.appendChild(Matrix44mToBinaryXML(mp->cm.Tr, doc));
- else
- meshElem.appendChild(Matrix44mToXML(mp->cm.Tr, doc));
-
- if (saveViewState)
- {
- QDomElement renderingElem = doc.createElement("RenderingOption");
- std::string text;
- rendOpt.serialize(text);
- QDomText nd = doc.createTextNode(QString(text.c_str()));
- renderingElem.appendChild(nd);
- MLRenderingData::GLOptionsType opt;
- if (rendOpt.get(opt))
- {
- renderingElem.setAttribute("boxColor", QString("%1 %2 %3 %4").arg(opt._perbbox_fixed_color[0]).arg(opt._perbbox_fixed_color[1]).arg(opt._perbbox_fixed_color[2]).arg(opt._perbbox_fixed_color[3]));
- renderingElem.setAttribute("pointColor", QString("%1 %2 %3 %4").arg(opt._perpoint_fixed_color[0]).arg(opt._perpoint_fixed_color[1]).arg(opt._perpoint_fixed_color[2]).arg(opt._perpoint_fixed_color[3]));
- renderingElem.setAttribute("wireColor", QString("%1 %2 %3 %4").arg(opt._perwire_fixed_color[0]).arg(opt._perwire_fixed_color[1]).arg(opt._perwire_fixed_color[2]).arg(opt._perwire_fixed_color[3]));
- renderingElem.setAttribute("solidColor", QString("%1 %2 %3 %4").arg(opt._persolid_fixed_color[0]).arg(opt._persolid_fixed_color[1]).arg(opt._persolid_fixed_color[2]).arg(opt._persolid_fixed_color[3]));
- renderingElem.setAttribute("pointSize", opt._perpoint_pointsize);
- renderingElem.setAttribute("wireWidth", opt._perwire_wirewidth);
- }
- meshElem.appendChild(renderingElem);
- }
-
- return meshElem;
-}
-
-QDomElement RasterModelToXML(RasterModel *mp, QDomDocument &doc, bool binary)
-{
- QDomElement rasterElem = doc.createElement("MLRaster");
- rasterElem.setAttribute("label", mp->label());
- if (binary)
- rasterElem.appendChild(WriteShotToQDomNodeBinary(mp->shot, doc));
- else
- rasterElem.appendChild(WriteShotToQDomNode(mp->shot, doc));
- for (int ii = 0; ii < mp->planeList.size(); ++ii)
- rasterElem.appendChild(PlaneToXML(mp->planeList[ii], mp->par->pathName(), doc));
- return rasterElem;
-}
-
-QDomElement PlaneToXML(RasterPlane* pl, const QString& basePath, QDomDocument& doc)
-{
- QDomElement planeElem = doc.createElement("Plane");
- QDir dir(basePath);
- planeElem.setAttribute("fileName", dir.relativeFilePath(pl->fullPathFileName));
- planeElem.setAttribute("semantic", pl->semantic);
- return planeElem;
-}
-
-QDomDocument MeshDocumentToXML(MeshDocument &md, bool onlyVisibleLayers, bool saveViewState, bool binary, const std::map& rendOpt)
-{
- QDomDocument ddoc("MeshLabDocument");
-
- QDomElement root = ddoc.createElement("MeshLabProject");
- ddoc.appendChild(root);
- QDomElement mgroot = ddoc.createElement("MeshGroup");
-
- for(MeshModel *mmp : md.meshList)
- {
- if ((!onlyVisibleLayers) || (mmp->visible))
- {
- QDomElement meshElem;
- if (rendOpt.find(mmp->id()) != rendOpt.end())
- meshElem = MeshModelToXML(mmp, ddoc, binary, saveViewState, rendOpt.at(mmp->id()));
- else
- meshElem = MeshModelToXML(mmp, ddoc, binary, saveViewState);
- mgroot.appendChild(meshElem);
- }
- }
- root.appendChild(mgroot);
-
- QDomElement rgroot = ddoc.createElement("RasterGroup");
-
- foreach(RasterModel *rmp, md.rasterList)
- {
- QDomElement rasterElem = RasterModelToXML(rmp, ddoc, binary);
- rgroot.appendChild(rasterElem);
- }
-
- root.appendChild(rgroot);
-
- // tag.setAttribute(QString("name"),(*ii).first);
- // RichParameterSet &par=(*ii).second;
- // QList::iterator jj;
- // RichParameterXMLVisitor v(doc);
- // for(jj=par.paramList.begin();jj!=par.paramList.end();++jj)
- // {
- // (*jj)->accept(v);
- // tag.appendChild(v.parElem);
- // }
- // root.appendChild(tag);
- // }
- //
- return ddoc;
-}
-
diff --git a/src/common/meshlabdocumentxml.h b/src/common/meshlabdocumentxml.h
deleted file mode 100644
index 19af062d7..000000000
--- a/src/common/meshlabdocumentxml.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef __MESHLABDOC_XML_H
-#define __MESHLABDOC_XML_H
-
-#include
-
-#include "ml_shared_data_context/ml_shared_data_context.h"
-#include "ml_document/mesh_document.h"
-#include