fix all scripts

This commit is contained in:
alemuntoni 2020-11-18 14:24:20 +01:00
parent a7abb93c2a
commit 3529dafd8d
9 changed files with 77 additions and 46 deletions

View File

@ -20,6 +20,7 @@ case $i in
-i=*|--install_path=*)
INSTALL_PATH="${i#*=}"
shift # past argument=value
;;
*)
# unknown option
;;

View File

@ -9,8 +9,10 @@ This folder contains a series of scripts to build and deploy MeshLab under a Lin
* the build directory (default: `src/build`): `--build_path=path/to/build`
* the install directory (default: `src/install`): `--install_path=path/to/install`
* the number of cores used to build MeshLab (default: `-j4`)`
* `2_deploy.sh`: this script makes the given path a portable version of MeshLab. Takes as argument the path where the output install path of the `1_build.sh` script is placed (default: `src/install`);
* `3_appimage.sh`: this script computes, starting from the portable folder of MeshLab, an [AppImage](https://appimage.org/) that can be run in a Linux Environment without dependencies. Takes as argument the path where the output install path of the `2_deploy.sh` script is placed (default: `src/install`);
* `2_deploy.sh`: this script makes the given path a portable version of MeshLab. Takes as arguments:
* the path where the output install path of the `1_build.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
* `3_appimage.sh`: this script computes, starting from the portable folder of MeshLab, an [AppImage](https://appimage.org/) that can be run in a Linux Environment without dependencies. Takes as arguments:
* the path where the output install path of the `2_deploy.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
* `make_it.sh`: this script builds, deploys and generates an [AppImage](https://appimage.org/) that can be run in a Linux Environment without dependencies. Arguments are the same of the `1_build.sh` script.
__NOTE__: `linux_deploy.sh`and `linux_make_it.sh` use [LinuxDeployQt](https://github.com/probonopd/linuxdeployqt), which allows to deploy applications **only running the oldest supported linux distro** (see [this](https://github.com/probonopd/linuxdeployqt/issues/340)) in order to guarantee the largest support possible. Therefore, before running these scripts, be sure that your Linux distribution is the oldest supported one.

View File

@ -5,7 +5,7 @@ This folder contains a series of platform-dependent scripts to build and deploy
Every platform folder contains:
* `1_build.sh`: a script that builds MeshLab. Requires a Qt environment properly set, with `cmake` accessible. Takes as inputh the build directory (default: `src/build`), the install directory (default: `src/install`) and the number of cores used to build MeshLab (default: `-j4`). Example of call: `bash 1_build.sh --build_path=path/to/build --install_path=path/to/install -j8`
* `2_deploy.sh`: a script that deploys MeshLab, making sure that the folder will be a self-contained MeshLab, without Qt library dependencies. Requires a properly built MeshLab in the directory passed as an argument (default: `src/install`). Example of call: `bash 2_deploy.sh path/to/deploy`
* `2_deploy.sh`: a script that deploys MeshLab, making sure that the folder will be a self-contained MeshLab, without Qt library dependencies. Requires a properly built MeshLab in the directory passed as an argument (default: `src/install`). Example of call: `bash 2_deploy.sh --install_path=path/to/deploy`
* `3_$installer$.sh`: a script that computes a platform-dependent self-contained package/installer of MeshLab. Requires a properly deployed MeshLab in the directory passed as an argument (default: `src/install`). The result will be saved in the parent directory of the given argument.
* `make_it.sh`: a script that computes all the three previous scripts: starting from the source code, it will produce a self-contained package/installer of MeshLab (arguments are the same of `1_build.sh`). Example of call: `bash makeit.sh --build_path=path/to/build --install_path=path/to/install -j8`

View File

@ -8,23 +8,30 @@
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
DISTRIB_PATH=$SCRIPTS_PATH/../../distrib
INSTALL_PATH=$SCRIPTS_PATH/../../src/install
#checking for parameters
if [ "$#" -eq 0 ]
then
BUNDLE_PATH=$SCRIPTS_PATH/../../src/install
else
BUNDLE_PATH=$(realpath $1)
fi
for i in "$@"
do
case $i in
-i=*|--install_path=*)
INSTALL_PATH="${i#*=}"
shift # past argument=value
;;
*)
# unknown option
;;
esac
done
windeployqt $BUNDLE_PATH/meshlab.exe
windeployqt $INSTALL_PATH/meshlab.exe
windeployqt $BUNDLE_PATH/plugins/filter_sketchfab.dll --libdir $BUNDLE_PATH/
windeployqt $INSTALL_PATH/plugins/filter_sketchfab.dll --libdir $INSTALL_PATH/
mv $BUNDLE_PATH/lib/meshlab/IFX* $BUNDLE_PATH
cp $BUNDLE_PATH/IFXCoreStatic.lib $BUNDLE_PATH/lib/meshlab/
cp $DISTRIB_PATH/LICENSE.txt $BUNDLE_PATH/
cp $DISTRIB_PATH/privacy.txt $BUNDLE_PATH/
mv $INSTALL_PATH/lib/meshlab/IFX* $INSTALL_PATH
cp $INSTALL_PATH/IFXCoreStatic.lib $INSTALL_PATH/lib/meshlab/
cp $DISTRIB_PATH/LICENSE.txt $INSTALL_PATH/
cp $DISTRIB_PATH/privacy.txt $INSTALL_PATH/
#at this point, distrib folder contains all the files necessary to execute meshlab
echo "$BUNDLE_PATH is now a self contained meshlab application"
echo "$INSTALL_PATH is now a self contained meshlab application"

View File

@ -10,16 +10,29 @@
# After running this script, the installer can be found inside the resources folder.
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
INSTALL_PATH=$SCRIPTS_PATH/../../src/install
DOUBLE_PRECISION_OPTION=""
#checking for parameters
if [ "$#" -eq 0 ]
then
BUNDLE_PATH=$SCRIPTS_PATH/../../src/install
else
BUNDLE_PATH=$(realpath $1)
fi
for i in "$@"
do
case $i in
-i=*|--install_path=*)
INSTALL_PATH="${i#*=}"
shift # past argument=value
;;
--double_precision)
DOUBLE_PRECISION_OPTION="--double_precision"
shift # past argument=value
;;
*)
# unknown option
;;
esac
done
sh $SCRIPTS_PATH/resources/nsis_script.sh $BUNDLE_PATH
sh $SCRIPTS_PATH/resources/nsis_script.sh -i=$INSTALL_PATH $DOUBLE_PRECISION_OPTION
makensis.exe $SCRIPTS_PATH/resources/meshlab_final.nsi

View File

@ -1,7 +1,5 @@
# Windows Scripts
**WORK IN PROGRESS**
This folder contains a series of scripts to build and deploy MeshLab under a Windows environment.
**Note**: scripts are written in bash, therefore they should be run in a linux subsystem environment.
@ -13,8 +11,10 @@ This folder contains a series of scripts to build and deploy MeshLab under a Win
* the build directory (default: `src/build`): `--build_path=path/to/build`
* the install directory (default: `src/install`): `--install_path=path/to/install`
* the number of cores used to build MeshLab (default: `-j4`)`
* `2_deploy.sh`: this script makes the given path a portable version of MeshLab. Takes as argument the path where the output install path of the `1_build.sh` script is placed (default: `src/install`);
* `3_installer.sh`: this script computes, starting from the portable folder of MeshLab, an NSIS installer. Takes as argument the path where the output install path of the `2_deploy.sh` script is placed (default: `src/install`);
* `2_deploy.sh`: this script makes the given path a portable version of MeshLab. Takes as arguments:
* the path where the output install path of the `1_build.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
* `3_installer.sh`: this script computes, starting from the portable folder of MeshLab, an NSIS installer. Takes as arguments:
* the path where the output install path of the `2_deploy.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
* it requires `makensis.exe` in the PATH env variable.

View File

@ -11,25 +11,30 @@
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
SOURCE_PATH=$SCRIPTS_PATH/../../src
#checking for parameters
if [ "$#" -eq 0 ]
then
BUNDLE_PATH=$SOURCE_PATH/install
else
BUNDLE_PATH=$(realpath $1)
fi
#if(! (Test-Path meshlab.exe)){ #meshlab.exe not found inside $DISTRIB_PATH
# cd $DIR
# throw 'meshlab.exe not found in ' + ($BUNDLE_PATH) + '. Exiting.'
#}
VERSION=$(cat $SOURCE_PATH/../ML_VERSION)
INSTALL_PATH=$SOURCE_PATH/install
#check parameters
for i in "$@"
do
case $i in
-i=*|--install_path=*)
INSTALL_PATH="${i#*=}"
shift # past argument=value
;;
--double_precision)
VERSION=$VERSIONd
shift # past argument=value
;;
*)
# unknown option
;;
esac
done
sed "s%MESHLAB_VERSION%$VERSION%g" $SCRIPTS_PATH/resources/meshlab.nsi > $SCRIPTS_PATH/resources/meshlab_final.nsi
sed -i "s%DISTRIB_PATH%.%g" $SCRIPTS_PATH/resources/meshlab_final.nsi
mv $SCRIPTS_PATH/resources/meshlab_final.nsi $BUNDLE_PATH/
cp $SCRIPTS_PATH/resources/ExecWaitJob.nsh $BUNDLE_PATH/
cp $SCRIPTS_PATH/resources/FileAssociation.nsh $BUNDLE_PATH/
mv $SCRIPTS_PATH/resources/meshlab_final.nsi $INSTALL_PATH/
cp $SCRIPTS_PATH/resources/ExecWaitJob.nsh $INSTALL_PATH/
cp $SCRIPTS_PATH/resources/FileAssociation.nsh $INSTALL_PATH/

View File

@ -24,6 +24,7 @@ case $i in
-i=*|--install_path=*)
INSTALL_PATH="${i#*=}"
shift # past argument=value
;;
*)
# unknown option
;;

View File

@ -9,8 +9,10 @@ This folder contains a series of scripts to build and deploy MeshLab under a Mac
* the build directory (default: `src/build`): `--build_path=path/to/build`
* the install directory (default: `src/install`): `--install_path=path/to/install`
* the number of cores used to build MeshLab (default: `-j4`)`
* `2_deploy.sh`: this script makes portable a `meshlab.app` appdir. Takes as argument the path where the output install path of the `1_build.sh` script is placed (default: `src/install`);
* `3_dmg.sh`: this script generates a [DMG](https://en.wikipedia.org/wiki/Apple_Disk_Image) that can be used to install MeshLab. Takes as argument the path where the install path of the `2_deploy.sh` script is placed (default: `src/install`);
* `2_deploy.sh`: this script makes portable a `meshlab.app` appdir. Takes as arguments:
* the path where the output install path of the `1_build.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
* `3_dmg.sh`: this script generates a [DMG](https://en.wikipedia.org/wiki/Apple_Disk_Image) that can be used to install MeshLab. Takes as arguments:
* the path where the install path of the `2_deploy.sh` script is placed (default: `src/install`): `--install_path=path/to/install`
* `make_it.sh`: this script builds, deploys and generates a [DMG](https://en.wikipedia.org/wiki/Apple_Disk_Image) that can be used to install MeshLab. Arguments are the same of the `1_build.sh` script.
## Examples