forked from xLightsSequencer/xLights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.osx
63 lines (48 loc) · 2.84 KB
/
README.osx
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
xLights/Nutcracker Version 3.x OS/X build instructions
------------------------------------------------------------------------------
NOTE: These docs need updating for build instructions for xLights/Nutcracker
These are the original Mac OS/X notes from ToolConfig.txt created by
Matt Brown for xLights.
------------------------------------------------------------------------------
xLights/Nutcracker can be built and run on Linux, Mac OS/X, or Windows. This
document describes how **developers** should set up their tool chain to build
xLights/Nutcracker on Mac OS/X.
xLights/Nutcracker is written in C++ and uses the wxWidgets library as a
compatibility layer across operating systems. The minimum required version
of wxWidgets for xLights/Nutcracker is 3.0.0.
Unfortunately, xLights/Nutcracker cannot be compiled wxWidgets3 that is part
of MacPorts due to that build not including the wxMediaControl widgets that
is required for Nutcracker. You must build wxWidgets from source.
On OS/X, compilation is done using Xcode. Code::Blocks is not used.
Xcode can be downloaded from the Apple developer web site. Make
sure you install the version of Xcode that matches your version of
OS/X. For example, I use OS/X 10.8, so I installed Xcode 4.4.
Instructions are here:
http://wiki.wxwidgets.org/Installing_Xcode
OS/X comes with the wxWidgets libraries pre-installed.
The instructions here suggest compiling with Xcode:
http://wiki.wxwidgets.org/Compiling_wxWidgets_with_Xcode
However, I followed the method used for Linux from inside a Terminal window:
NOTE: STARTING 7 SEPT 2013 YOU WILL NEED TO (RE)COMPILE
WXWIDGETS WITH CXXFLAGS="-std=gnu++0x"
FAILING TO DO THIS WILL CAUSE XLIGHTS TO CRASH
NOTE: The GCC that is part of Xcode 4.x is version 4.2 which does
NOT support the gnu++0x flag (tops out at c++99). Since xLights
requires g++0x, we need to use the clang compiler. This also
requires setting the minimum maxosx version to 10.7.
cd <wxMac base dir>
export CXXFLAGS="-stdlib=libc++ -std=c++11"
export OBJCXXFLAGS="-stdlib=libc++ -std=c++11"
export CPPFLAGS="-stdlib=libc++"
export LDFLAGS="-stdlib=libc++"
export CXX=clang++
export CXXCPP="clang++ -E"
export CC=clang
export CPP="clang -E"
./configure --prefix=/opt/local --disable-shared --disable-debug_flag --enable-macosx_arch=i386,x86_64 \
--enable-mediactrl --with-osx_cocoa --with-opengl --disable-dependency-tracking --with-macosx-version-min=10.7 --with-libjpeg=builtin
make
make install
Next, you will use Xcode to compile xLights. Most of the steps are listed here:
http://wiki.wxwidgets.org/Creating_Xcode_projects_for_wxWidgets_applications
However, if you have the XCode command line tools installed, you should just be able to run "xcodebuild" and it should build and compile xLights automatically.