Setup scripts for developer env using conda
This commit is contained in:
committed by
wwmayer
parent
1c6f0cb999
commit
b3588f80c7
68
build_unix_dev_conda.sh
Executable file
68
build_unix_dev_conda.sh
Executable file
@@ -0,0 +1,68 @@
|
||||
##!/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_dev
|
||||
# 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"
|
||||
|
||||
if [[ ${HOST} =~ "Linux" ]]; then
|
||||
echo "Linux"
|
||||
conda env create -f environment-linux.yml
|
||||
elif [[ ${HOST} =~ "Darwin" ]]; then
|
||||
echo "OS X"
|
||||
conda env create -f environment-osx.yml
|
||||
else
|
||||
echo "Unknown Host: ${HOST}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
conda activate ${FCENV}
|
||||
if [ $? != 0 ]; then
|
||||
echo "Failed to create conda environment and activate it."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "${CONDA_PREFIX}" ]; then
|
||||
echo "Failed to find CONDA_PREFIX variable."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PREFIX="${CONDA_PREFIX}" ./conda/build.sh
|
||||
@@ -5,9 +5,9 @@ mkdir -p build
|
||||
cd build
|
||||
|
||||
if [[ ${FEATURE_DEBUG} = 1 ]]; then
|
||||
BUILD_TYPE="Debug"
|
||||
BUILD_TYPE="Debug"
|
||||
else
|
||||
BUILD_TYPE="Release"
|
||||
BUILD_TYPE="Release"
|
||||
fi
|
||||
|
||||
declare -a CMAKE_PLATFORM_FLAGS
|
||||
@@ -73,9 +73,14 @@ cmake \
|
||||
${CMAKE_PLATFORM_FLAGS[@]} \
|
||||
..
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
echo "CMake failed to configure."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "FREECAD_USE_3DCONNEXION=${FREECAD_USE_3DCONNEXION}"
|
||||
|
||||
ninja install
|
||||
ninja install
|
||||
rm -r ${PREFIX}/share/doc/FreeCAD # smaller size of package!
|
||||
mv ${PREFIX}/bin/FreeCAD ${PREFIX}/bin/freecad
|
||||
mv ${PREFIX}/bin/FreeCADCmd ${PREFIX}/bin/freecadcmd
|
||||
|
||||
49
environment-linux.yml
Normal file
49
environment-linux.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
name: freecad_dev
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- cxx-compiler
|
||||
- cmake
|
||||
- ninja
|
||||
- git
|
||||
- doxygen
|
||||
- python
|
||||
- qt
|
||||
- boost-cpp
|
||||
- xerces-c
|
||||
- zlib
|
||||
- vtk
|
||||
- swig
|
||||
- eigen
|
||||
- occt
|
||||
- pybind11
|
||||
- coin3d
|
||||
- pivy
|
||||
- smesh
|
||||
- netgen=6.2.1808*
|
||||
- hdf5
|
||||
- freetype
|
||||
- pcl
|
||||
- six
|
||||
- ply
|
||||
- tbb-devel
|
||||
- pyside2
|
||||
- numpy
|
||||
- six
|
||||
- pyyaml
|
||||
- libspnav
|
||||
- libxcb
|
||||
- xorg-libxt
|
||||
# Linux ONLY items
|
||||
- mesa-libgl-devel # [linux]
|
||||
- mesa-dri-drivers # [linux]
|
||||
- mesa-libegl-devel # [linux]
|
||||
- libselinux # [linux]
|
||||
- libxdamage # [linux]
|
||||
- libxfixes # [linux]
|
||||
- libxxf86vm # [linux]
|
||||
- libxext # [linux]
|
||||
- xorg-x11-server-xvfb # [linux]
|
||||
- libxau # [linux]
|
||||
- libxi-devel # [linux]
|
||||
49
environment-osx.yml
Normal file
49
environment-osx.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
name: freecad_dev
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- cxx-compiler
|
||||
- cmake
|
||||
- ninja
|
||||
- git
|
||||
- doxygen
|
||||
- python
|
||||
- qt
|
||||
- boost-cpp
|
||||
- xerces-c
|
||||
- zlib
|
||||
- vtk
|
||||
- swig
|
||||
- eigen
|
||||
- occt
|
||||
- pybind11
|
||||
- coin3d
|
||||
- pivy
|
||||
- smesh
|
||||
- netgen=6.2.1808*
|
||||
- hdf5
|
||||
- freetype
|
||||
- pcl
|
||||
- six
|
||||
- ply
|
||||
- tbb-devel
|
||||
- pyside2
|
||||
- numpy
|
||||
- six
|
||||
- pyyaml
|
||||
- libspnav
|
||||
- libxcb
|
||||
- xorg-libxt
|
||||
# Linux ONLY items
|
||||
# - mesa-libgl-devel # [linux]
|
||||
# - mesa-dri-drivers # [linux]
|
||||
# - mesa-libegl-devel # [linux]
|
||||
# - libselinux # [linux]
|
||||
# - libxdamage # [linux]
|
||||
# - libxfixes # [linux]
|
||||
# - libxxf86vm # [linux]
|
||||
# - libxext # [linux]
|
||||
# - xorg-x11-server-xvfb # [linux]
|
||||
# - libxau # [linux]
|
||||
# - libxi-devel # [linux]
|
||||
Reference in New Issue
Block a user