forked from blackberry/Box2D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Building.txt
56 lines (45 loc) · 2.57 KB
/
Building.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
The Build folder contains custom made project files for Visual Studio 2010 and XCode4.
To build for BlackBerry (QNX-based) platforms, open the command-line and execute the following commands:
> cd [bbndk] where [bbndk] is where the QNX NDK was installed (i.e. C:\bbndk)
> bbndk-env.bat (on Windows or bbndk-env.sh on MacOSX or Linux)
> cd [box2d]/qnx where [box2d] is the directory where Box2D was extracted to
> make
Following this, the relevant binaries should reside in the following subdirectories:
libBox2D:
[box2d]/qnx/Box2D/arm/a.le.v7 (ARM release)
[box2d]/qnx/Box2D/arm/a.le.v7.g (ARM debug)
[box2d]/qnx/Box2D/x86/a (x86 simulator release)
[box2d]/qnx/Box2D/x86/a.g (x86 simulator debug)
To build for BlackBerry (QNX-based) platform from Momentics IDE:
- Right click on Project Explorer->Import.
- Select "Existing Existing Project into Workspace"->Next
- Select "Select root directory:" as [box2d]
- Check the "Box2D" project and optionally HelloWorld and Testbed samples (without copying project option). Then click Finish.
- Right click the "Box2D" project then "Build".
For other platforms you need to run premake in this directory. You can get premake here:
http://industriousone.com/premake
For example, on Linux, you would type:
premake4 gmake
This will create a gmake folder in the Build directory. From there you can run:
make config="debug"
If you have build problems, you can post a question here:
http://box2d.org/forum/viewforum.php?f=7
=============== OLD METHOD ====================
Box2D uses CMake to describe the build in a platform independent manner.
First download and install cmake from cmake.org
For Microsoft Visual Studio:
- Run the cmake-gui
- Set the source directory to the path of Box2D on your PC (the folder that contains this file).
- Set the build directory to be the path of Box2D/Build on your PC.
- Press the Configure button and select your version of Visual Studio.
- You may have to press the Configure button again.
- Press the Generate button.
- Open Box2D/Build/Box2D.sln.
- Set the Testbed or HelloWorld as your startup project.
- Press F5 or Ctrl-F5 to run.
For Unix platforms, say the following on a terminal: (Replace $BOX2DPATH with the directory where this file is located.)
cd $BOX2DPATH/Build
cmake -DBOX2D_INSTALL=ON -DBOX2D_BUILD_SHARED=ON ..
make
make install
You might want to add -DCMAKE_INSTALL_PREFIX=/opt/Box2D or similar to the cmake call to change the installation location. make install might need sudo.