-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
130 lines (86 loc) · 3.21 KB
/
README
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
124
125
126
127
128
129
HOW TO COMPILE THE AGENT
========================
1/ Fetch and compile third party libraries
------------------------------------------
Boost and wxwidgets take quite a lot of time.
cd ..../diveboard-agent
cd 3rd-party
./mac-build-all.sh
2/ Create build directory and build using Makefile
-------------------------------------------------
Tested so far on Mac only
cd ..../diveboard-agent
mkdir build
cd build
cmake ..
make
3/ Check the built binaries
---------------------------
Mac : The binaries are in build/bin
4/ Package the result
---------------------
sudo ./makeMacPkg.sh
---------------------
HOW TO BUILD ON LINUX FOR WINDOWS
1) Preparations:
sudo apt-get install mingw-w64 binutils-mingw-w64 cmake nsis
//ONLY FOR OLD VERSIONS OF CMAKE:
//replace the file FindwxWidgets.cmake in folder /usr/share/cmake-2.8/Modules/ by the one in 3rd-party/windows-build/
2 Building libraries:
cd <project root>/3rd-party
//IF YOU WANT FASTER COMPILING: export MAKEFLAGS=-j(number of process(optional)), e.g.:
export MAKEFLAGS=-j8
./win-build-all.sh
3 Create build directory and build using Makefile
cd <project root>
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../3rd-party/windows-build/toolchain-mingw32.cmake -DCMAKE_SYSTEM_NAME=Windows ..
make
4 Building setup.
cd ..
makensis platforms/windows/diveboard.nsi
HOW TO BUILD ON LINUX
1) install package
sudo apt-get install dpkg-sig imagemagick rpm mesa-common-dev freeglut3-dev libwebkitgtk-3.0-dev cmake imagemagick rpm dpkg-sig autoconf libtool libjpeg-dev libtiff-dev libconfig++-dev
//ONLY ON UBUNTU
sudo apt-get install libappindicator3-dev
2) build libraries
cd <project root>/3rd-party
//IF YOU WANT FASTER COMPILING: export MAKEFLAGS=-j(number of process(optional)), e.g.:
export MAKEFLAGS=-j8
./lin-build-all.sh
3) build Diveboard agent
cd <project root>/
mkdir build
cd <project root>/build
cmake ..
make
4) build package
cd <project root>/
cp pgp/* ~/.gnupg/
gpg --export -a 'Diveboard Tech' > RPM-GPG-KEY-diveboard
sudo rpm --import RPM-GPG-KEY-diveboard
echo "%_signature gpg
%_gpg_name Diveboard Tech" > ~/.rpmmacros
./makeLinuxPkg.sh
//SIGNED ON REPREPRO SO THIS IS JUST TO FORCE SIGNING
//WARNING: this needs to be adapted to the actual name of debian file
fakeroot dpkg-sig -k "Diveboard Tech" --sign builder build/packages/diveboard-agent-1.0.0-i386.deb
HOW TO PUSH ON SERVER
- connect on diveboard server and upload all the package
- Get a terminal on the server
- For windows, Mac and TGZ, only copy/paste the package on the good folder
- cp setup.exe package/win
- cp DiveboardAgent.dmg package/osx
- cp DiveboardAgent.tgz package/tgz
- For Fedora copy the package in the folder and launch the createrepo command
- cp DiveboardAgent.rpm package/rpm
- createrepo .
- For Ubuntu/Debian
- cd package/deb
- reprepro includedeb stable "PATH TO DEB FILE/DiveboardAgent.deb"
- Signing of deb file is during the reprepro add so the command ask you for the gnupg key password.
HOW TO UPDATE THE SERVER
- Change the version number in the method "versions" line 1487 of the api_controller.rb
- You need to make this change for each platform.