Ubuntu20.10系统FreeCAD 0.19编译安装
济南友泉软件有限公司
零、系统环境
root@test-HVM-domU:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.10
Release: 20.10
Codename: groovy
一、安装依赖包
1.1 安装git
FreeCAD使用Git进行代码版本管理,因此首先需要现在Git.
root@test-HVM-domU:~# sudo apt install git
FreeCAD编译运行需要一些列的第三方包,好在使用Ubuntu下的包管理工具可以轻松完成。
root@test-HVM-domU:~# sudo apt install cmake cmake-qt-gui libboost-date-time-dev libboost-dev libboost-filesystem-dev libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-serialization-dev libboost-thread-dev libcoin-dev libeigen3-dev libgts-bin libgts-dev libkdtree++-dev libmedc-dev libocct-data-exchange-dev libocct-ocaf-dev libocct-visualization-dev libopencv-dev libproj-dev libpyside2-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev libqt5xmlpatterns5-dev libshiboken2-dev libspnav-dev libvtk7-dev libx11-dev libxerces-c-dev libzipios++-dev occt-draw pyside2-tools python3-dev python3-matplotlib python3-pivy python3-ply python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtsvg python3-pyside2.qtwidgets qtbase5-dev qttools5-dev swig
1.3 安装python3-pyside2uic
root@test-HVM-domU:~# wget -c http://ftp.at.debian.org/debian/pool/main/p/pyside2/python3-pyside2uic_5.11.2-3_all.deb
root@test-HVM-domU:~# sudo dpkg -i ./python3-pyside2uic_5.11.2-3_all.deb
二、获取源代码
2.1 拉取代码
nene@test-HVM-domU:~/FreeCAD/freecad-source$ git clone https://github.com/FreeCAD/FreeCAD.git freecad-source
2.2 创建本地分支
不建议直接在本地master分支上进行开发,推荐创建分支用于FreeCAD的开发测试等工作。
在Git命令行窗口中运行一下命令,
nene@test-HVM-domU:~/FreeCAD$ cd ./freecad-source/
nene@test-HVM-domU:~/FreeCAD/freecad-source$ git checkout -b acise origin/releases/FreeCAD-0-19
三、编译FreeCAD
3.1 构建项目
nene@test-HVM-domU:~/FreeCAD/freecad-source$ cd ..
nene@test-HVM-domU:~/FreeCAD$ mkdir freecad-build/
nene@test-HVM-domU:~/FreeCAD$ cd ./freecad-build/
nene@test-HVM-domU:~/FreeCAD/freecad-build$ cmake ../freecad-source -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3
3.2 编译
nene@test-HVM-domU:~/FreeCAD/freecad-build$ make –j4
参考资料
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容