Created
April 24, 2019 16:26
-
-
Save joaoantoniocardoso/8c4308e92455d6624eab29e694fd6e68 to your computer and use it in GitHub Desktop.
Script to build freecad at arch-linux from git sources without Ship module.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Defines development directory: | |
FREECAD_DEV_DIR=~/freecad | |
CURRENT_DIR=$(pwd) | |
echo "> Development dir: $FREECAD_DEV_DIR." | |
echo "> Note that you are at: $CURRENT_DIR." | |
# Installing needed packages from a package-manager | |
echo "> Installing needed packages from a package-manager" | |
yay -S --needed boost-libs curl desktop-file-utils glew hicolor-icon-theme jsoncpp libspnav med opencascade shiboken2 xerces-c pyside2 python-matplotlib python-netcdf4 python-pivy qt5-svg qt5-webkit qt5-webengine boost cmake eigen git gcc-fortran pyside2-tools swig qt5-tools pybind11 python36 | |
# Getting the sources from git: | |
echo "> Getting the sources from git" | |
mkdir -p $FREECAD_DEV_DIR && cd $FREECAD_DEV_DIR | |
git clone https://github.com/FreeCAD/FreeCAD.git freecad-code | |
# Preparing the build directory: | |
echo "> Preparing the build directory" | |
mkdir -p $FREECAD_DEV_DIR/freecad-build && cd $FREECAD_DEV_DIR/freecad-build | |
# Building: | |
echo "> Building" | |
PYVER="$(/usr/bin/python3 -c 'import sys; print("{}.{}".format(sys.version_info.major,sys.version_info.minor))')" | |
cmake -D CMAKE_BUILD_TYPE=Release \ | |
-D FREECAD_USE_MP_COMPILE_FLAG=ON \ | |
-D CMAKE_INSTALL_PREFIX=$PREFIX \ | |
-D CMAKE_PREFIX_PATH=$PREFIX \ | |
-D CMAKE_LIBRARY_PATH=$PREFIX/lib \ | |
-D CMAKE_INCLUDE_PATH=$PREFIX/include \ | |
-D BUILD_QT5=ON \ | |
-D FREECAD_USE_OCC_VARIANT="Official Version" \ | |
-D OCC_INCLUDE_DIR=$PREFIX/include \ | |
-D USE_BOOST_PYTHON=ON \ | |
-D FREECAD_USE_PYBIND11=ON \ | |
-D PYBIND11_DIR=/usr/share/cmake/pybind11 \ | |
-D BUILD_ENABLE_CXX11=ON \ | |
-D FREECAD_USE_EXTERNAL_SMESH=OFF \ | |
-D SMESH_INCLUDE_DIR=$PREFIX/include/smesh \ | |
-D BUILD_FLAT_MESH=ON \ | |
-D PYTHON_LIBRARY=/usr/lib/libpython3.7m.so \ | |
-D PYTHON_INCLUDE_DIR=/usr/include/python3.7m \ | |
-D DPYTHON_PACKAGES_PATH=/usr/lib/python3.7/site-packages \ | |
-D PYTHON_EXECUTABLE=/usr/bin/python3.7 \ | |
-D FREECAD_USE_EXTERNAL_PIVY=ON \ | |
-D BUILD_FEM_NETGEN=ON \ | |
-D BUILD_PLOT=OFF \ | |
-D BUILD_SHIP=OFF \ | |
-D OCCT_CMAKE_FALLBACK=OFF \ | |
-D FREECAD_USE_QT_DIALOG=ON \ | |
-D OPENMPI_INCLUDE_DIRS=/usr/include \ | |
-D SHIBOKEN_INCLUDE_DIR=/usr/include/shiboken2 \ | |
-D SHIBOKEN_BINARY=/usr/bin/shiboken2 \ | |
-D SHIBOKEN_LIBRARY="/usr/lib/libshiboken2.cpython-${PYVER//.}m-x86_64-linux-gnu.so" \ | |
-D PYSIDE_INCLUDE_DIR=/usr/include/PySide2 \ | |
-D PYSIDE_LIBRARY="/usr/lib/libpyside2.cpython-${PYVER//.}m-x86_64-linux-gnu.so" \ | |
-D PYSIDE_PYTHONPATH="/usr/lib/python${PYVER}/site-packages/PySide2" \ | |
-D PYSIDE_TYPESYSTEMS=/usr/share/PySide2/typesystems \ | |
$FREECAD_DEV_DIR/freecad-code | |
make | |
cd $CURRENT_DIR | |
echo "DONE!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment