Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
PrzemoF
Veteran
Posts: 3520 Joined: Fri Jul 25, 2014 4:52 pm
Contact:
Post
by PrzemoF » Tue Sep 08, 2015 7:10 pm
I need someone to test it. I believe it should work on fedora 20/21/22.and x86_64/i686. If you never compiled FreeCAD on fedora please try this script! (save attachment, copy to a directory, unzip, start - no questions asked)
Code: Select all
#!/bin/bash
ARCH=$(uname -m)
MAIN_DIR=FreeCAD
BUILD_DIR=build
echo "Architecture: $ARCH"
echo "Main directory: $MAIN_DIR"
echo "Build directory: $BUILD_DIR"
REL_FILE=/etc/redhat-release
if [ -d "$MAIN_DIR" ]
then
echo "Main directory $MAIN_DIR already exists! Please remove it or use a different directory to start building"
exit 1
fi
if [ -d "$BUILD_DIR" ]
then
echo "Build directory $BUILD_DIR already exists! Please remove it or use a different directory to start building"
exit 1
fi
if [ -f "$REL_FILE" ]
then
cat $REL_FILE | grep 20 && FEDORA_VERSION=20
cat $REL_FILE | grep 21 && FEDORA_VERSION=21
cat $REL_FILE | grep 22 && FEDORA_VERSION=22
else
echo "Cannot figure out release from $REL_FILE!"
exit 1
fi
echo "Installing packages required to build FreeCAD"
sudo yum -y install gcc cmake gcc-c++ boost-devel zlib-devel swig eigen3 qt-devel \
shiboken shiboken-devel pyside-tools python-pyside python-pyside-devel xerces-c \
xerces-c-devel OCE-devel smesh graphviz python-pivy python-matplotlib tbb-devel \
freeimage-devel Coin3 Coin3-devel
mkdir $MAIN_DIR
cd $MAIN_DIR
git clone https://github.com/FreeCAD/FreeCAD_sf_master.git
mkdir $BUILD_DIR
cd $BUILD_DIR
cmake ../FreeCAD_sf_master && make
Attachments
build_FreeCAD.sh.zip
(732 Bytes) Downloaded 65 times
PrzemoF
Veteran
Posts: 3520 Joined: Fri Jul 25, 2014 4:52 pm
Contact:
Post
by PrzemoF » Tue Jul 05, 2016 10:39 am
Updated script for fedora. Needs testing and attention someone with wiki editing permission
Code: Select all
#!/bin/bash
ARCH=x86_64
#ARCH=i686
MAIN_DIR=FreeCAD
BUILD_DIR=build
#FEDORA_VERSION=21
FEDORA_VERSION=22
#FEDORA_VERSION=23
#FEDORA_VERSION=24
echo "Installing packages required to build FreeCAD"
sudo dnf -y install gcc cmake gcc-c++ boost-devel zlib-devel swig eigen3 qt-devel \
shiboken shiboken-devel pyside-tools python-pyside python-pyside-devel xerces-c \
xerces-c-devel OCE-devel smesh graphviz python-pivy python-matplotlib tbb-devel \
freeimage-devel Coin3 Coin3-devel med-devel vtk-devel
cd ~
mkdir $MAIN_DIR || { echo "~/$MAIN_DIR already exist. Quitting.."; exit; }
cd $MAIN_DIR
git clone https://github.com/FreeCAD/FreeCAD.git
mkdir $BUILD_DIR || { echo "~/$BUILD_DIR already exist. Quitting.."; exit; }
cd $BUILD_DIR
cmake ../FreeCAD && make
drei
Posts: 479 Joined: Sun May 11, 2014 7:47 pm
Location: Mexico
Contact:
Post
by drei » Tue Jul 05, 2016 2:50 pm
Can someone confirm if it works?
I'll gladly update the wiki page, but I need to be sure that users can compile FreeCAD with the script.
Need help? Feel free to ask, but
please read the
guidelines first
PrzemoF
Veteran
Posts: 3520 Joined: Fri Jul 25, 2014 4:52 pm
Contact:
Post
by PrzemoF » Tue Jul 05, 2016 3:50 pm
Works for me on fedora 22, I'll test it later on fedora 23. It would be great if someone with fedora 24 tested it.
jmaustpc
Veteran
Posts: 11207 Joined: Tue Jul 26, 2011 6:28 am
Location: Australia
Post
by jmaustpc » Tue Jul 05, 2016 4:30 pm
PrzemoF wrote: and attention someone with wiki editing permission
I was surprised to see that we have not ever created a wiki editors account for you, this must be just an over sight. I have created it now with the same log in name as your FreeCAD forum log in name. I have given you editor's and Translator's powers. The system should have emailed you a temporary password by now.
Jim
PrzemoF
Veteran
Posts: 3520 Joined: Fri Jul 25, 2014 4:52 pm
Contact:
Post
by PrzemoF » Tue Jul 05, 2016 4:43 pm
Thanks!!!! I just logged in
NormandC
Veteran
Posts: 18589 Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada
Post
by NormandC » Sun Jul 10, 2016 4:00 pm
Have a look at the Ubuntu section and compare. You should not add indents for every line inside a Code tag. Indents are added when no tag is used.
Other than that it's been a long time since I've edited anything on the wiki...
PrzemoF
Veteran
Posts: 3520 Joined: Fri Jul 25, 2014 4:52 pm
Contact:
Post
by PrzemoF » Mon Jul 11, 2016 8:28 pm
Thanks! I didn't add the tabs - I have them in the script, so it was copy&paste - I got it fixed.
The wiki was going nuts on || symbol. I added <nowiki>||</nowiki> instead || and it seems to work.
NormandC
Veteran
Posts: 18589 Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada
Post
by NormandC » Tue Jul 12, 2016 3:19 am
PrzemoF wrote: The wiki was going nuts on || symbol.
I would never have figured this one out!