Following directions mostly from: https://github.com/cnr-isti-vclab/meshlab/tree/master/src
Give me your binaries:
sudo apt install \
lib3ds-dev libopenctm-dev libbz2-dev libeigen3-dev \
qt5-default qt5-qmake qtcreator libqt5x11extras5-dev qt5-style-plugins qtscript5-dev libqt5xmlpatterns5-dev \
-y
brew install llvm qt eigen
git clone --depth 1 git@github.com:cnr-isti-vclab/meshlab.git
git clone --depth 1 git@github.com:cnr-isti-vclab/vcglib.git -b devel
cd meshlab
Setup re-usable QMAKE_FLAGS
JOBS=$(nproc)
QMAKE_FLAGS="-spec linux-g++ CONFIG+=release CONFIG+=qml_release CONFIG+=c++11 QMAKE_CXXFLAGS+=-fPIC QMAKE_CXXFLAGS+=-std=c++11 QMAKE_CXXFLAGS+=-fpermissive INCLUDEPATH+=/usr/include/eigen3 LIBS+=-L`pwd`/lib/linux-g++"
JOBS=$(sysctl -a | egrep -i "hw.ncpu" | awk -F ':' '{print $2}')
QMAKE_FLAGS="CONFIG+=release CONFIG+=qml_release CONFIG+=c++11 QMAKE_CXXFLAGS+=-fPIC QMAKE_CXXFLAGS+=-std=c++11 QMAKE_CXXFLAGS+=-fpermissive INCLUDEPATH+=/usr/include/eigen3 LIBS+=-L`pwd` QMAKE_LFLAGS_SONAME=-Wl,-install_name,@executable_path/"
cd src/external/
qmake external.pro $QMAKE_FLAGS
make -j $JOBS
cd ../common/
qmake common.pro $QMAKE_FLAGS
make -j $JOBS
cd ..
qmake meshlab_mini.pro $QMAKE_FLAGS
make -j $JOBS
qmake meshlab_full.pro $QMAKE_FLAGS
make -j $JOBS
sudo mkdir /opt/meshlab
sudo rsync -av distrib/* /opt/meshlab/
Add path to your ~/.bash_profile
echo -e '# add meshlab to PATH\nexport PATH="/opt/meshlab:$PATH"\nexport LD_LIBRARY_PATH="/opt/meshlab:$LD_LIBRARY_PATH"\n' >> $HOME/.bash_profile
source $HOME/.bash_profile
rsync -va distrib/meshlab.app /Applications/meshlab.app
rsync -va distrib/* /Applications/meshlab.app/ --exclude="meshlab.app"
Open the standford bunny in Meshlab!
meshlab /opt/meshlab/sample/bunny10k.ply
open /Applications/meshlab.app /Applications/meshlab.app/sample/bunny70k.ply
Make the .desktop
and shell script file
cd /opt/meshlab/
sudo wget https://gist.github.com/hcwiley/118afeaaba2f88312c3edf4e9d2ed0b1/raw/meshlab.sh -O meshlab.sh
chmod a+x meshlab.sh
sudo wget https://gist.github.com/hcwiley/118afeaaba2f88312c3edf4e9d2ed0b1/raw/meshlab.desktop -O /usr/share/applications/meshlab.desktop
Get the icon from the git repo
cd to your meshlab
git dir
cp src/meshlab/images/eye.ico /opt/meshlab/