forked from TrenchBroom/TrenchBroom
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBuild.txt
98 lines (85 loc) · 4.68 KB
/
Build.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
====== Windows ======
You'll need Visual Studio (only tested with 2010).
- Get the binary build of wxWidgets 2.9.4 for your platform from
http://sourceforge.net/projects/wxwindows/files/2.9.4/binaries/
- For 32bit builds, you need the following files:
- wxWidgets-2.9.4_Headers.7z
- wxMSW-2.9.4-vc100_Dev.7z
- wxMSW-2.9.4_vc100_ReleaseDLL.7z
- wxMSW-2.9.4_vc100_ReleasePDB.7z
- Unpack all files into the same directory so that "include" and "lib" directories are at the same level after unpacking.
- In this directory, rename lib/vc100 to lib/vc_dll
- Set a new environment variable WXWIN=C:\wxWidgets-2.9.4 (replace the path with the path where you unpacked wxWidgets).
- If you want to run the binaries without using the installer, add %WXWIN% to your path.
- Download and install CMake for Windows (www.cmake.org)
- Open a command prompt and change into the directory where you unpacked the TrenchBroom sources.
- Create a new directory, e.g. "build", and change into it.
- Run the following two commands
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
You can replace "Release" with "Debug" if you want to create a debug build.
====== Linux ======
Dependencies
Compiling wxWidgets 2.9 requires the following dependencies. You should install them using the packager of your Linux distribution.
- g++ GNU c++ compiler
- GTK2 and development packages: libgtk2.0-dev (GTK3 will NOT work)
- OpenGL and GLU development headers (Mesa OpenGL development packages)
freeglut3, freeglut3-dev, mesa-common-dev
- X11 video mode extension library: libxxf86vm-dev
- If you have a debian-based distribution, install them with this command:
sudo apt-get install libgtk2.0-dev freeglut3 freeglut3-dev mesa-common-dev libxxf86vm-dev
Compiling and linking TrenchBroom requires a working OpenGL installation. This page may help you if you see linker errors about missing GL libraries:
http://www.wikihow.com/Install-Mesa-%28OpenGL%29-on-Linux-Mint
- Some more detailed (possibly outdated) information about building TrenchBroom on Linux: http://andyp123.blogspot.de/2013/03/running-trenchbroom-quake-editor-on.html
wxWidgets
- Get the latest sources of wxWidgets 2.9 from wxwidgets.org and unpack them.
- Move the unpacked directory someplace where you want to keep it.
- Open a terminal and change into the wxwidgets directory.
- Create two directories: build-release and build-debug (don't rename those!)
- Change into wxwidgets/build-release
- Run
../configure --disable-shared --with-opengl --with-gtk=2
- Run make
- Run sudo make install
- Change into wxwidgets/build-debug
- Run
../configure --enable-debug --disable-shared --with-opengl --with-gtk=2
- Run make
- Run sudo make install
CMake
- Install CMake using your package manager: sudo apt-get install cmake
- Open a terminal and change into the directory where you unpacked the TrenchBroom sources
- Create a new directory, e.g. "build", and change into it.
- Run the following two commands
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
You can replace "Release" with "Debug" if you want to create a debug build.
====== Mac OS X ======
Build environment
1. Get Xcode from the App Store
2. Mac OS X SDKs
- Get the Mac OS X 10.6 SDK (from an older Xcode version such as Xcode 3)
- Copy it to /Developer/SDKs (or some other folder of your choosing)
- Create a symbolic link inside /Applications/XCode.app:
- If you copied the 10.6 SDK to /Developer/SDKs:
- sudo ln -s /Developer/SDKs/MacOSX10.6.sdk/ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
- You may have to repeat this step whenever Xcode is updated.
3. Dependencies
- Install FreeImage. The easiest way is to use macports (macports.org)
sudo port install freeimage +universal
3. wxWidgets
- Get the latest sources of wxWidgets 2.9 from wxwidgets.org and unpack them.
- Move the unpacked directory someplace where you want to keep it.
- Open a terminal and change into the wxwidgets directory.
- Apply the patches in TrenchBroom/patches/wxWidgets
- Create two directories: build-release and build-debug (don't rename those!)
- Change into wxwidgets/build-release
- Run
- If you copied the 10.6 SDK to /Developer/SDKs
../configure --with-osx_cocoa --disable-shared --with-opengl --enable-universal-binary=i386,x86_64 --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6
- Run make, then sudo make install
- Change into wxwidgets/build-debug
- Run
- If you copied the 10.6 SDK to /Developer/SDKs
../configure --enable-debug --with-osx_cocoa --with-opengl --enable-universal-binary=i386,x86_64 --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6
- Run make, then sudo make install