Clean up docs
This commit is contained in:
committed by
wwmayer
parent
a80e1f4cc9
commit
2697ea6588
79
BUILD_OSX.md
79
BUILD_OSX.md
@@ -1,61 +1,38 @@
|
||||
# Building FreeCAD on Mac OS 10.15.x -- Catalina #
|
||||
|
||||
## Obtain Dependencies ##
|
||||
General notes on how the tooling works:
|
||||
|
||||
The [FreeCAD Wiki](https://wiki.freecadweb.org/Third_Party_Libraries) has
|
||||
a list of required deps. They are reproduced here for developers.
|
||||
This setup uses [conda](https://docs.conda.io) for dependency management.
|
||||
Conda is able to pull the deps from a repository called conda-forge and
|
||||
setup an isolated build environment. Not quite as isolated as docker, but
|
||||
it is a good option for Mac and its what the FreeCAD CI system uses.
|
||||
|
||||
| Library Name | Version | Link to Obtain |
|
||||
|:------------:|:----------:|:----------------------:|
|
||||
| Python | >= 3.4 | http://www.python.org/ |
|
||||
| Boost | >= 1.33 | http://www.boost.org/ |
|
||||
| OpenCASCADE | >= 6.7 | http://www.opencascade.org |
|
||||
| Qt | >= 5.6 | https://www.qt.io/ |
|
||||
| Shiboken2 | same as Qt | https://wiki.qt.io/Qt_for_Python/Shiboken |
|
||||
| PySide2 | same as Qt | https://wiki.qt.io/Qt_for_Python/Shiboken |
|
||||
| Coin3D | >= 3.x | https://github.com/coin3d/coin |
|
||||
| *SoQt | >= 1.2 | https://github.com/coin3d/soqt |
|
||||
| Quarter | >= 1.0 | https://github.com/coin3d/quarter |
|
||||
| Pivy | >= 0.6.5 | https://github.com/coin3d/pivy/ |
|
||||
| FreeType | >= XXX | XXX |
|
||||
| PyCXX | >= XXX | XXX |
|
||||
| KDL | >= XXX | XXX |
|
||||
| Point Cloud Library | >= XXX | XXX |
|
||||
| Salome SMESH | >= XXX | XXX |
|
||||
| VTK | >= 6.0 | XXX |
|
||||
| Ply | >= 3.11 | https://www.dabeaz.com/ply/ |
|
||||
| Xerces-C++ | >= 3.0 | https://xerces.apache.org/xerces-c/ |
|
||||
| Eigen3 | >= 3.0 | http://eigen.tuxfamily.org/index.php?title=Main_Page |
|
||||
| Zipios++ | >= 0.1.5 | https://snapwebsites.org/project/zipios, https://github.com/Zipios/Zipios |
|
||||
| Zlib | >= 1.0 | http://www.zlib.net/, https://github.com/madler/zlib |
|
||||
| libarea | >= 0.0.20140514-1 | https://github.com/danielfalck/libarea |
|
||||
Once the dependencies are installed into a conda environment, then the
|
||||
build uses the standard `cmake` configuration process to configure the build
|
||||
and `ninja` to invoke the actual compilation against whatever host compiler
|
||||
(gcc, clang, etc.) was installed by conda's `cxx-compiler` package for
|
||||
that architecture.
|
||||
|
||||
`*`: Deprecated
|
||||
All of this, and some sanity checks, are in a unified shell script. See below.
|
||||
|
||||
The easiest way on Mac to get the Dependencies is homebrew.
|
||||
# Directions #
|
||||
|
||||
### Building MED ###
|
||||
## Install XCode Command line tools ##
|
||||
|
||||
Note that the tests don't compile on GCC 10 or GCC 7. Kind of concerning.
|
||||
Also we end up w/ MED using HDF5 @ 1.10 and VTK using 1.12... does this work?
|
||||
```
|
||||
mkdir build && \
|
||||
pushd build && \
|
||||
cmake -G Ninja \
|
||||
-DMEDFILE_BUILD_TESTS=OFF \
|
||||
-DHDF5_ROOT_DIR=/usr/local/opt/hdf5@1.10 ../ \
|
||||
&& ninja \
|
||||
&& ninja install
|
||||
```
|
||||
Run `xcode-select --install` and click through.
|
||||
|
||||
## Run CMake ##
|
||||
## Install Conda ##
|
||||
|
||||
Refer to [MiniConda Docs](https://docs.conda.io/en/latest/miniconda.html).
|
||||
|
||||
## Run the shell script ##
|
||||
|
||||
Run the `./build_unix_dev_conda.sh` and go get coffee. Builds take
|
||||
an hour+ on a 2012 Retina MacBook.
|
||||
|
||||
Output binaries will be in the `./build/bin/FreeCAD` *and*
|
||||
`${CONDA_PREFIX}/bin/FreeCAD` directories.
|
||||
|
||||
You can code/build/test using the cmake configuration folder `./build` in
|
||||
the standard way *from withing the freecad_dev conda enviroment*.
|
||||
|
||||
```
|
||||
mkdir freecad-build
|
||||
cd freecad-build
|
||||
cmake ../freecad-source \
|
||||
-DBUILD_QT5=ON \
|
||||
-DPYTHON_EXECUTABLE=/usr/local/bin/python3 \
|
||||
-DHOMEBREW_PREFIX=/usr/local
|
||||
make -j$(nproc --ignore=2)
|
||||
```
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
##!/usr/bin/env bash
|
||||
#
|
||||
# MacOS Build Script for FreeCAD using Conda.
|
||||
# This is intended for developer use.
|
||||
#
|
||||
# Copyright (c) 2020 by Jeffrey Zampieron. All rights reserved.
|
||||
#
|
||||
# License: LGPLv2.1
|
||||
#
|
||||
# References:
|
||||
# - Conda: https://conda.io/projects/conda/en/latest/user-guide/install/index.html
|
||||
# - Conda Build: https://docs.conda.io/projects/conda-build/en/latest/install-conda-build.html
|
||||
|
||||
###########################################################################
|
||||
# Script wide setup.
|
||||
###########################################################################
|
||||
# The Conda environment name
|
||||
FCENV=freecad_build
|
||||
# The cmake build directory
|
||||
HOST=$(uname)
|
||||
|
||||
###########################################################################
|
||||
# Env Checks
|
||||
###########################################################################
|
||||
which xcrun
|
||||
if [ $? != 0 ]; then
|
||||
echo "xcrun not found... install XCode command line tools..."
|
||||
echo "using: xcode-select --install"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
###########################################################################
|
||||
# Conda Setup
|
||||
###########################################################################
|
||||
which conda
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to find conda executable. Please install."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
conda activate ${FCENV}
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to activate conda env: ${FCENV} ... creating"
|
||||
|
||||
conda create \
|
||||
--name ${FCENV} \
|
||||
--channel conda-forge \
|
||||
--channel defaults \
|
||||
conda-build \
|
||||
conda-forge-ci-setup=3 \
|
||||
pip
|
||||
|
||||
conda activate ${FCENV}
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to create conda environment and activate it."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
conda build ./conda --channel conda-forge
|
||||
Reference in New Issue
Block a user