diff --git a/README.md b/README.md index 46f495315..30deb5677 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@ # ![MeshLab Logo](src/meshlab/images/eye64.png) MeshLab -![Linux](https://github.com/cnr-isti-vclab/meshlab/workflows/Linux/badge.svg) -![MacOS](https://github.com/cnr-isti-vclab/meshlab/workflows/MacOS/badge.svg) -![Windows](https://github.com/cnr-isti-vclab/meshlab/workflows/Windows/badge.svg) +[![BuildMeshLab](https://github.com/cnr-isti-vclab/meshlab/actions/workflows/BuildMeshLab.yml/badge.svg)](https://github.com/cnr-isti-vclab/meshlab/actions/workflows/BuildMeshLab.yml) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5114037.svg)](https://doi.org/10.5281/zenodo.5114037) @@ -18,19 +16,19 @@ MeshLab is available for Windows, macOS, and Linux. # Releases You can find the last MeshLab release in the [Releases Tab](https://github.com/cnr-isti-vclab/meshlab/releases) for your favourite platform. -You can also test a built version of MeshLab generated by the last commit pushed in this repository, by downloading the artifacts of the last [Github Actions](https://github.com/cnr-isti-vclab/meshlab/actions) workflow. +You can also test the last nightly version of MeshLab, by downloading the artifacts of the last [Github Actions](https://github.com/cnr-isti-vclab/meshlab/actions) workflow. You can find a guide on how to download it [here](https://github.com/cnr-isti-vclab/meshlab/wiki/How-to-install-the-last-nightly-version). # Build instructions -We provide a set of scripts that build and deploy MeshLab automatically. All the scripts can be found in the [scripts](https://github.com/cnr-isti-vclab/meshlab/tree/master/scripts) folder. -For specific build instructions see the [src](https://github.com/cnr-isti-vclab/meshlab/blob/master/src/README.md) folder. +We provide a set of scripts that build and deploy MeshLab automatically. All the scripts can be found in the [scripts](https://github.com/cnr-isti-vclab/meshlab/tree/main/scripts) folder. +For specific build instructions see the [src](https://github.com/cnr-isti-vclab/meshlab/blob/main/src/README.md) folder. -# Branches +# Branches and Pull Requests On this repository, we keep two relevant branches: -- `main`: we keep here the **last release version of MeshLab**, with just bugfixes. In case of bugs caught after a release, this branch is used to publish "post-releases". -- `devel`: we add here new features and functionalities of the software that are going to appear in the next release of MeshLab. Bugfixes pushed in `main` are automatically merged on the `devel` branch. +- `main`: we keep here the **last release version of MeshLab**, with just bugfixes, optimizations and changes that do not affect the last released MeshLab binary. In case of bugs caught after a release, this branch is used to publish "post-releases". +- `devel`: we add here new features and functionalities of the software that are going to appear in the next release of MeshLab. Bugfixes pushed in `main` are automatically merged into the `devel` branch. Before committing a new change, or sending a pull request, please choose the branch that better suits for your change. If it is just a bugfix, or an edit that does not modify the software (e.g. documentation typos, changes to the deploy system, ...), use the `main` branch. @@ -40,11 +38,11 @@ If it is a new feature that will change the behaviour or the usage of the softwa The MeshLab repository is organized as follows: -* `distrib`: this folder contains a set of prebuilt libraries and shaders that will be used by MeshLab once it is compiled. For more details, check the readme [here](https://github.com/cnr-isti-vclab/meshlab/tree/master/distrib/README.md); * `docs`: doxygen scripts for generating MeshLab documentation. For more details, check the readme [here](https://github.com/cnr-isti-vclab/meshlab/tree/master/docs); * `sample` and `textures`: a set of files (meshes, images) used for tests; +* `resources`: contains a set of files used by the software and by the deploy system to produce the final MeshLab binary; * `scripts`: in this folder there is a set of platform-dependent scripts to build and deploy MeshLab. For more details, check the readme [here](https://github.com/cnr-isti-vclab/meshlab/tree/master/scripts/README.md); -* `src`: this folder contains all the source code of MeshLab, its plugins and the external libraries that it requires. For more details, check the readme [here](https://github.com/cnr-isti-vclab/meshlab/blob/master/src/README.md); +* `src`: this folder contains all the source code of MeshLab and its plugins. For more details, check the readme [here](https://github.com/cnr-isti-vclab/meshlab/blob/master/src/README.md); * `unsupported`: this folder contains a set of old and unsupported MeshLab plugins that are no longer included and built under MeshLab. # License diff --git a/resources/README.md b/resources/README.md index def256882..8b30715fe 100644 --- a/resources/README.md +++ b/resources/README.md @@ -1,3 +1,10 @@ -# distrib folder +# MeshLab resources -The distrib folder contains a set of pre-built libraries and shaders that MeshLab needs to properly run, plus some other txt files and icons. \ No newline at end of file +The `resources` folder contains a set of files, binaries and shaders that MeshLab needs to be correctly built, deployed and packaged. + +Examples of contained files: + - icons; + - deployment software binaries; + - configuration files for packaging; + - shaders; + - license, privacy and readme files that are bundled in the final MeshLab packages. \ No newline at end of file diff --git a/scripts/README.md b/scripts/README.md index 3da38854e..64f30cc8e 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,16 +1,93 @@ -#scripts folder +# MeshLab scripts -This folder contains a series of platform-dependent scripts to build and deploy MeshLab. +This folder contains a series of platform-dependent bash scripts to build and deploy MeshLab. 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 --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` +* `0_setup_env.sh`: a script that installs automatically the required dependencies; +* `1_build.sh`: a script that builds MeshLab; +* `2_deploy.sh`: a script that deploys MeshLab; +* `3_pack.sh`: a script that computes a platform-dependent self-contained package/installer of MeshLab; +* `make_it.sh`: a script that computes all the three previous scripts; Note for Windows: scripts are written in bash, therefore they should be run in a linux subsystem environment. + See in each platform subfolder for details and other platform-dependent requirements: -- [Linux](https://github.com/cnr-isti-vclab/meshlab/tree/master/scripts/Linux) -- [MaxOS](https://github.com/cnr-isti-vclab/meshlab/tree/master/scripts/macOS) -- [Windows](https://github.com/cnr-isti-vclab/meshlab/tree/master/scripts/Windows) +- [Linux](https://github.com/cnr-isti-vclab/meshlab/tree/main/scripts/Linux) +- [MaxOS](https://github.com/cnr-isti-vclab/meshlab/tree/main/scripts/macOS) +- [Windows](https://github.com/cnr-isti-vclab/meshlab/tree/main/scripts/Windows) + +## `0_setup_env.sh` + +This script installs automatically the required dependencies of MeshLab. Common dependencies are Qt and `cmake`. + +The script uses a system package manager to install dependencies, which is: + - [`apt-get`](https://linux.die.net/man/8/apt-get) on Linux; + - [`brew`](https://brew.sh/) on macOS; + - [`choco`](https://community.chocolatey.org/) on Windows. + +Please be sure to have these package managers before running this script. + +It takes as input the `--dont_install_qt` option, that allows the user to choose whether to install or not qt using the system package manager. It could be useful if Qt is installed using other sources. For example, in our GitHub actions workflows we use a specific action step to install Qt, in order to choose a specific version of Qt. + +Please see the readme inside the desired platform folder for system dependent additional arguments and further details. + +## `1_build.sh` + +This script builds MeshLab. It assumes that the script `0_setup_env.sh` has been already executed and all the dependencies are correctly installed and accessible by the script. + +It takes the following input arguments: + - `--build_path`: the directory where will be placed the build files; + - default: `[meshlab_repo]/build` + - example: `--build_path=path/to/build` + - `--install_path`: the directory where final MeshLab binaries, libraries and files will be placed; + - default: `[meshlab_repo]/install` + - example: `--install_path=path/to/install` + - `--double_precision`: if present, this argument will tell to build MeshLab with double floating point precision; + - `--nighly`: if present, this argument will tell to build MeshLab with a nightly version; + - `--qt_dir`: the directory where to find Qt, useful when Qt is not in the `PATH`; + - example: `--qt_dir=path/to/qt` + - `--ccache`: if present, this argument will tell to use the `ccache` tool to speed up build time (useful for CI builds, be sure to have `ccache` installed). + +Example of call: +``` +bash 1_build.sh --build_path=path/to/build --install_path=path/to/install --double_precision +``` + +## `2_deploy.sh` + +This script deploys MeshLab, making sure that the folder will be a self-contained MeshLab, without Qt or any other system libraries dependencies. It assumes that the scripts `0_setup_env.sh` and `1_build.sh` have been already executed and there is a directory where all the final MeshLab files are placed. + +It takes the following input arguments: + - `--install_path`: the directory where final MeshLab binaries, libraries and files are placed; this will be the path where MeshLab will be deployed. It should be the same argument given to the `1_build.sh` script; + - default: `[meshlab_repo]/install` + - example: `--install_path=path/to/install` + - `--qt_dir`: the directory where to find Qt, useful when Qt is not in the `PATH`; it should be the same argument given to the `1_build.sh` script; + - example: `--qt_dir=path/to/qt` + +Example of call: +``` +bash 2_deploy.sh --install_path=path/to/install +``` + +## `3_pack.sh` + +This script generates a platform-dependent self-contained package/installer of MeshLab. It assumes that the scripts `0_setup_env.sh`, `1_build.sh` and `2_deploy.sh` have been already executed, and there is a directory where MeshLab has been deployed. + +It takes the following input arguments: + - `--install_path`: the directory containing MeshLab deployed; it should be the same argument given to the `2_deploy.sh` script; + - default: `[meshlab_repo]/install` + - example: `--install_path=path/to/install` + - `--package_path`: the directory where the output package(s) will be placed; + - default: `[meshlab_repo]/packages` + - example: `--package_path=path/to/packages` + +Example of call: +``` +bash 3_pack.sh --install_path=path/to/install --package_path=path/to/packages +``` + +## `make_it.sh` + +This script computes all the three previous scripts: starting from the source code, it will produce a self-contained package/installer of MeshLab. +