-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
143 lines (100 loc) · 4.65 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
130
131
132
133
134
135
136
137
138
139
140
141
0/ Prerequisites
- Install CMake :
Mac/windows : http://www.cmake.org/cmake/resources/software.html
Debian/Ubuntu : apt-get install cmake
- Make sure dependencies are there :
Linux :
sudo apt-get install libgtk2.0-dev automake autoconf libtool git screen cmake pkg-config gawk rpm
Windows :
Visual studio (we're using verion 10)
NSIS (for packaging)
Mac :
xcode
PackageMaker : Since xcode 4.3, command line tools are no longer part of xcode. To install PackageMaker command line :
-> launch xcode, menu XCode/Open developper tools/More developper tools
-> Download "auxiliary tools for xcode"
-> Copy PackageMaker to your Applications folder (yeah Apple didn't provide any installer.....)
-> run : sudo ln -s /Applications/PackageMaker.app/Contents/MacOS/PackageMaker /Applications/Xcode.app/Contents/Developer/usr/bin/packagemaker
- Configure globally Xcode for mac
For mac, make sure that the build location can be configured on a project basis :
XCode > Preferences > Locations > Advanced > Build Location = Location Specified By Targets
1/ Compiling for development environment
- in a shell, place yourself in the same folder as this readme
- Get Firebreath from github:
git submodule update --init
Note: Firebreath has been included as a submodule, and Libdivecomputer has been integrated as a subtree merge.
- launch the correct prep... command for your platform with the arguments "projects" and "build" :
Mac : ./firebreath/prepmac.sh projects build
Linux : ./firebreath/prepcodeblocks.sh projects build
Windows : firebreath\prep2010.cmd projects build
- you may open the main plugin projects in your favorite IDE :
Mac : FireBreath.xcode
Linux : FireBreath.cbp
Windows : FireBreath.sln
- To compile the main plugin with Debug symbols, run, go in the build/ directory and run :
Mac :
xcodebuild -configuration Debug -project FireBreath.xcodeproj build
Linux :
make
Windows :
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
msbuild FireBreath.sln /p:Configuration=Debug /t:clean,rebuild
Note for Mac build: in case of error with lipo, it might be because of parallel build. To disactivate that feature in xcode, go to "Project/Edit Project settings" and uncheck "Build independant targets in parallel"
- To build the libdivecomputer library, go in the libdivecomputer directory and run :
Mac:
autoreconf --install && ./configure && make
Linux:
autoreconf --install && ./configure && make
Windows:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
msbuild msvc\libdivecomputer.sln /p:Configuration=Release /t:clean,rebuild
WARNING ! On Linux you must build on both a 32-bit platform and a 64-bit platform - you must build really 2 times on 2 platforms, no kidding.
- The built binaries will be :
Mac:
build/projects/DiveBoard/Release/DiveBoard_x86_64.plugin/Contents/MacOS/DiveBoard_x86_64
libdivecomputer/src/.libs/libdivecomputer.0.dylib
Linux:
libdivecomputer/src/.libs/libdivecomputer.so
Windows:
build\bin\DiveBoard\Release\npDiveBoard.dll
libdivecomputer\msvc\Release\libdivecomputer.dll
2/ Build the release package
- To build the package run
Windows:
mkexewin32.bat
Mac:
mkpkg4mac.sh
Linux:
mkpkg4linux.sh
- The installation package will be placed in
Mac : build/packages/diveboard.dmg
Windows : build\bin\DiveBoard\Release\DiveBoard.exe
Linux : build/packages/
Notes :
On windows, the easiest way is to register the dll in build/bin/DiveBoard/Debug
regsvr32 npPluginTemplate.dll
Good luck !
ANNEXES
=======
A/ IRDA INTEGRATION FOR MAC
- Build IRDA library
cd irda_mac ; make
- Patch libdivecomputer
cd ../libdivecomputer
cp ../irda_mac/irda_mac.c src/
patch -N -p1 < ../irda_mac/libdivecomputer_irda_mac.1.patch
- Configure libdivecomputer with the IrDA Library
DYLD_LIBRARY_PATH=$(pwd)/../irda_mac CPPFLAGS=-I$(pwd)/../irda_mac/ LDFLAGS=-L$(pwd)/../irda_mac LIBS="-lirda" ./configure
- Compile libdivecomputer
make
- Tell the linker where the IrDA Library will be installed
install_name_tool -change irda.dylib "/Library/Internet Plug-Ins/DiveBoard.plugin/Contents/MacOS/irda.dylib" src/.libs/libdivecomputer.dylib
B/ CODE UPDATE FOR LIBDIVECOMPUTER
- look into git log for previous libdivecomputer commit number
- cd /tmp
- git clone git://git.libdivecomputer.org/libdivecomputer.git
- cd libdivecomputer
- git diff previous_ldc_commit HEAD > /tmp/ldc.path
- cd /.../dev_env/libdivecomputer
- patch -N -p1 < /tmp/ldc.patch
- include the latest commit number from libdivecomputer into the commit comment