diff --git a/.gitignore b/.gitignore index eb9bbb565..61dfa394f 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,7 @@ src/distrib/common.lib src/distrib/meshlab.exe src/distrib/meshlabserver.exe src/distrib/MeshLabBundle +src/distrib/snap20????/prime +src/distrib/snap20????/parts +src/distrib/snap20????/stage +src/distrib/snap20????/*.snap diff --git a/src/install/snap/README.md b/src/install/snap201612/README.md similarity index 100% rename from src/install/snap/README.md rename to src/install/snap201612/README.md diff --git a/src/install/snap/gui/meshlab.desktop b/src/install/snap201612/gui/meshlab.desktop similarity index 100% rename from src/install/snap/gui/meshlab.desktop rename to src/install/snap201612/gui/meshlab.desktop diff --git a/src/install/snap/gui/meshlab.png b/src/install/snap201612/gui/meshlab.png similarity index 100% rename from src/install/snap/gui/meshlab.png rename to src/install/snap201612/gui/meshlab.png diff --git a/src/install/snap201612/snapcraft.yaml b/src/install/snap201612/snapcraft.yaml new file mode 100644 index 000000000..98cda7a0e --- /dev/null +++ b/src/install/snap201612/snapcraft.yaml @@ -0,0 +1,70 @@ +# Known to build in Ubuntu 17.04 +name: meshlab +version: '2016.12-2' +summary: MeshLab +description: | + The open source system for processing and editing 3D triangular meshes. + It provides a set of tools for editing, cleaning, healing, inspecting, + rendering, texturing and converting meshes. It offers features for processing + raw data produced by 3D digitization tools/devices and for preparing models + for 3D printing. +icon: gui/meshlab.png + +grade: stable +confinement: strict + +apps: + meshlab: + command: desktop-launch meshlab + plugs: [home, x11, mir, opengl, unity7] + meshlabserver: + command: desktop-launch meshlabserver + plugs: [home, x11, opengl] + + +parts: + meshlab: + after: [desktop-qt5,vcglib] + plugin: qmake + qt-version: qt5 + source: https://github.com/cnr-isti-vclab/meshlab.git + source-tag: v2016.12 + build-packages: + - libqt5opengl5-dev + - libqt5xmlpatterns5-dev + - qt5-default + - qtscript5-dev + prepare: | + ln -sf ../vcglib/install ../vcglib + sed -i '/filter_csg/d' src/meshlab_full.pro + sed -i '/plugins_experimental\/io_TXT/d' src/meshlab_full.pro + sed -i 's| abs(| qAbs(|' src/meshlabplugins/edit_quality/eqhandle.cpp + sed -i -e '2ilinux:QMAKE_LFLAGS += -fopenmp -lgomp\' src/meshlabplugins/filter_screened_poisson/filter_screened_poisson.pro + sed -i 's|PR_XXXXXX|/tmp/PR_XXXXXX|' src/meshlabplugins/filter_screened_poisson/Src/Geometry.cpp + build: | + cd src/external + qmake external.pro + make -j4 + cd .. + rm -f -r distrib/plugins/U3D_OSX + rm -f -r distrib/plugins/U3D_W32 + qmake meshlab_full.pro + make -j4 + install: | + cp src/meshlabplugins/filter_screened_poisson/filter_screened_poisson.xml \ + src/meshlabplugins/filter_mutualinfoxml/filter_mutualinfo.xml \ + src/meshlabplugins/filter_measure/filter_measure.xml \ + src/distrib/plugins/ + rm -f -r src/distrib/plugins/OSX_U3D + rm -f -r src/distrib/plugins/OSX_W32 + cd src/distrib + mkdir -p $SNAPCRAFT_PART_INSTALL/bin + cp -a meshlab* plugins shaders textures $SNAPCRAFT_PART_INSTALL/bin + mkdir -p $SNAPCRAFT_PART_INSTALL/lib + cp -a lib* $SNAPCRAFT_PART_INSTALL/lib + vcglib: + plugin: dump + source: https://github.com/cnr-isti-vclab/vcglib.git + source-tag: v1.0.1 + prime: [ -* ] + diff --git a/src/install/snap201703/README.md b/src/install/snap201703/README.md new file mode 100644 index 000000000..89f224f6c --- /dev/null +++ b/src/install/snap201703/README.md @@ -0,0 +1,32 @@ +Snap is a cross-distribution packaging format for Linux. See +https://snapcraft.io for more information. + +How to build +------------ +Just type +``` +snapcraft +``` +from the *parent* directory: that is, not from the directory containing this +README file, but from its parent directory. This snap has been successfully +built in Ubuntu 17.04; Ubuntu 16.10 will not work because MeshLab needs Qt 5.7, +which is not available there. It should be possible to build MeshLab as a snap +in older Ubuntu distributions by using the [qt57 +part](https://wiki.ubuntu.com/snapcraft/parts), but no efforts have been taken +in this direction since anyway the generated snap package will work on older +distributions too. + +How to test the snap +-------------------- +The generated snap can be installed by typing +``` +snap install --dangerous ./meshlab*.snap +``` +The `--dangerous` flag is needed because the snap has not been verified by the +store. + +How to upload the snap to the store +----------------------------------- +A thorough guide can be found at the [snapcraft.io +site](https://snapcraft.io/docs/build-snaps/publish). + diff --git a/src/install/snap201703/gui/meshlab.desktop b/src/install/snap201703/gui/meshlab.desktop new file mode 100644 index 000000000..7e18ba811 --- /dev/null +++ b/src/install/snap201703/gui/meshlab.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=MeshLab +Comment=Processor and editor of large 3D triangular meshes +Exec=meshlab.meshlab +Terminal=false +Categories=Graphics; +Icon=${SNAP}/meta/gui/meshlab.png + diff --git a/src/install/snap201703/gui/meshlab.png b/src/install/snap201703/gui/meshlab.png new file mode 100644 index 000000000..c9a9885e2 Binary files /dev/null and b/src/install/snap201703/gui/meshlab.png differ diff --git a/src/install/snap/snapcraft.yaml b/src/install/snap201703/snapcraft.yaml similarity index 93% rename from src/install/snap/snapcraft.yaml rename to src/install/snap201703/snapcraft.yaml index 5da1bbadf..3dd9b802b 100644 --- a/src/install/snap/snapcraft.yaml +++ b/src/install/snap201703/snapcraft.yaml @@ -1,6 +1,6 @@ # Known to build in Ubuntu 17.04 name: meshlab -version: '2016.12-2' +version: '2017.03-1' summary: MeshLab description: | The open source system for processing and editing 3D triangular meshes. @@ -28,7 +28,7 @@ parts: plugin: qmake qt-version: qt5 source: https://github.com/cnr-isti-vclab/meshlab.git - source-tag: v2016.12 +# source-tag: v2017.03 build-packages: - libqt5opengl5-dev - libqt5xmlpatterns5-dev @@ -60,7 +60,9 @@ parts: cp -a lib* $SNAPCRAFT_PART_INSTALL/lib vcglib: plugin: dump +# source: https://github.com/cnr-isti-vclab/vcglib.git +# source-tag: v1.0.2 source: https://github.com/cnr-isti-vclab/vcglib.git - source-tag: v1.0.1 + source-branch: devel prime: [ -* ]