Fix kicad-install.sh to only install wxPython when building with scripting enabled.

This commit is contained in:
nosuz 2014-10-21 11:52:30 -04:00 committed by Wayne Stambaugh
parent 8cdd4faad5
commit 959b63ba8f
1 changed files with 35 additions and 8 deletions

View File

@ -103,13 +103,27 @@ install_prerequisites()
libglew-dev libglew-dev
libssl-dev libssl-dev
libwxgtk3.0-dev libwxgtk3.0-dev
python-wxgtk3.0
" "
for p in ${prerequisite_list} for p in ${prerequisite_list}
do do
sudo apt-get install $p || exit 1 sudo apt-get install $p || exit 1
done done
# Only install the scripting prerequisites if required.
if [ "$(expr match "$OPTS" '.*\(-DKICAD_SCRIPTING=ON\)')" == "-DKICAD_SCRIPTING=ON" ]; then
#echo "KICAD_SCRIPTING=ON"
scripting_prerequisites="
python-dev
python-wxgtk3.0-dev
swig
"
for sp in ${scripting_prerequisites}
do
sudo apt-get install $sp || exit 1
done
fi
# assume all yum systems have same prerequisites # assume all yum systems have same prerequisites
elif [ "$(expr match "$PM" '.*\(yum\)')" == "yum" ]; then elif [ "$(expr match "$PM" '.*\(yum\)')" == "yum" ]; then
@ -131,13 +145,26 @@ install_prerequisites()
grep grep
openssl-devel openssl-devel
wxGTK-devel wxGTK-devel
wxPython
" "
for p in ${prerequisite_list} for p in ${prerequisite_list}
do do
sudo yum install $p || exit 1 sudo yum install $p || exit 1
done done
# Only install the scripting prerequisites if required.
if [ "$(expr match "$OPTS" '.*\(-DKICAD_SCRIPTING=ON\)')" == "-DKICAD_SCRIPTING=ON" ]; then
#echo "KICAD_SCRIPTING=ON"
scripting_prerequisites="
swig
wxPython
"
for sp in ${scripting_prerequisites}
do
sudo yum install $sp || exit 1
done
fi
else else
echo echo
echo "Incompatible System. Neither 'yum' nor 'apt-get' found. Not possible to continue." echo "Incompatible System. Neither 'yum' nor 'apt-get' found. Not possible to continue."