-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathUbuntuBuild.txt
123 lines (104 loc) · 2.22 KB
/
UbuntuBuild.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# PyCAD install for Ubuntu 20.04
#install wxPython with this line
pip3 install -U wxPython
or the long way
# install wxPython, first 2 lines to fix problem where gtk3 was not found
# download https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04/wxPython-4.1.1-cp38-cp38-linux_x86_64.whl from
sudo apt install libgtk-3-dev
sudo apt-get install python3-pip
cd Downloads
pip3 install wxPython-4.1.1-cp38-cp38-linux_x86_64.whl
sudo apt-get install libsdl2-2.0-0
### Get essentials ###
```
sudo apt-get install git build-essential debhelper cmake python3-dev freeglut3-dev
```
### Build boost python for python3 ###
download the latest boost\
(look here https://www.boost.org/users/download/ and copy the path for the download\
which ends with bz2, then on RPI type wget followed by the path)\
unzip with tar xf followed by filename\
cd into boost folder
( where I've put 3.8, put 3.6 or whatever your python3 version is )
```
./bootstrap.sh --with-python-version=3.8
sudo nano project-config.jam
```
change\
project : default-build <toolset>gcc :
to
```
project : default-build <toolset>gcc :
import python :
if ! [ python.configured ]
{
using python : 3.8 : "/usr" :
}
```
change\
libraries = ;\
to
```
libraries = --with-python ;
```
then
```
./b2
sudo ./b2 install
cd ../
```
### Fetch sources ###
```
git clone https://github.com/danheeks/PyCAD.git
```
### build CAD python module ###
currently you need to edit PyCAD/CAD/CMakeLists.txt and change the boost version number
```
cd PyCAD/CAD
mkdir build
cd build
cmake ..
make
cd ../../
cp CAD/build/cad.so ./
```
### build Geom python module ###
```
cd Geom
mkdir build
cd build
cmake ..
make
cd ../../
cp Geom/build/geom.so ./
```
### build Step python module ###
( this stage still in development )
First build OCE; hours of building; download using wget latest file ending tar.gz from:\
https://github.com/tpaviot/oce/releases \
for example
wget https://github.com/tpaviot/oce/archive/refs/tags/OCE-0.18.3.tar.gz
unzip using tar xf\
cd into the folder starting with oce
```
mkdir build
cd build
cmake ..
make
sudo make install
cd ../../
```
build step
```
cd Step
mkdir build
cd build
cmake ..
make
cd ../../
cp Step/build/step.so ./
```
### try the test.py ###
```
python3 test.py
```