forked from xLightsSequencer/xLights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.osx
105 lines (77 loc) · 4.71 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
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
xLights OS/X build instructions
------------------------------------------------------------------------------
NOTE: These docs need updating for build instructions for xLights
These are the original Mac OS/X notes from ToolConfig.txt created by
Matt Brown for xLights.
------------------------------------------------------------------------------
xLights 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 on Mac OS/X.
xLights is written in C++ and uses the wxWidgets library as a
compatibility layer across operating systems. The minimum required version
of wxWidgets for xLights on OS X is 3.1.0.
Unfortunately, xLights cannot be compiled wxWidgets3 that is part
of MacPorts due to that build not including the wxMediaControl widgets that
is required for xLights. 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
The instructions here suggest compiling with Xcode:
http://wiki.wxwidgets.org/Compiling_wxWidgets_with_Xcode
First, download the source package for wxWidgets from:
https://github.com/wxWidgets/wxWidgets/releases/tag/v3.1.0/wxWidgets-3.1.0.tar.bz2
and unpack it.
Note: if you are using Xcode 8.1 on OSX Sierra, wxWidgets 3.1.0 will not compile
as some of the deprecated classes within the OS have been removed from the SDK. In
That case, you need to just grab the latest code from the git repository via:
git clone https://github.com/wxWidgets/wxWidgets
and build that instead. The benefit is that some bugs will be fixed, but since
it’s the latest in the repo, it may be little unstable.
Then, from inside a Terminal window:
cd <wxMac base dir>
cd build
export CXXFLAGS="-stdlib=libc++ -std=gnu++14 -g -DwxHAS_GENERIC_DATAVIEWCTRL=1"
export OBJCXXFLAGS="-stdlib=libc++ -std=gnu++14 -DwxHAS_GENERIC_DATAVIEWCTRL=1"
export CPPFLAGS="-stdlib=libc++ -g -DwxHAS_GENERIC_DATAVIEWCTRL=1"
export LDFLAGS="-stdlib=libc++"
export CXX=clang++
export CXXCPP="clang++ -E"
export CC=clang
export CPP="clang -E"
export CFLAGS="-g"
../configure --prefix=/opt/local --libdir=/opt/local/libdbg \
--enable-debug --enable-debug_info --disable-optimise --enable-macosx_arch=x86_64 \
--enable-mediactrl --with-osx_cocoa --with-opengl --disable-dependency-tracking \
--with-macosx-version-min=10.7 --with-libjpeg=builtin --enable-cxx11 --enable-std_containers_compat \
--enable-backtrace --enable-exceptions --enable-aui --without-liblzma --with-expat=builtin
make
make install
If you are planning on being able to build Release builds, you will ALSO need to do:
export CXXFLAGS="-stdlib=libc++ -std=gnu++14 -DwxHAS_GENERIC_DATAVIEWCTRL=1"
export OBJCXXFLAGS="-stdlib=libc++ -std=gnu++14 -DwxHAS_GENERIC_DATAVIEWCTRL=1"
export CPPFLAGS="-stdlib=libc++ -DwxHAS_GENERIC_DATAVIEWCTRL=1"
export LDFLAGS="-stdlib=libc++ -DwxHAS_GENERIC_DATAVIEWCTRL=1"
export CXX=clang++
export CXXCPP="clang++ -E"
export CC=clang
export CPP="clang -E"
../configure --prefix=/opt/local --enable-macosx_arch=x86_64 \
--enable-mediactrl --with-osx_cocoa --with-opengl --disable-dependency-tracking \
--with-macosx-version-min=10.7 --with-libjpeg=builtin --enable-cxx11 --enable-std_containers_compat \
--enable-backtrace --enable-exceptions --enable-aui --without-liblzma --with-expat=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.
Other library notes:
If you need to rebuild ffmpeg:
./configure --disable-videotoolbox --disable-vda --disable-yasm --disable-securetransport --enable-shared --disable-indev=qtkit --extra-cflags="-mmacosx-version-min=10.7" --disable-indev=avfoundation --disable-indev=lavfi
wxWidgets git hash history:
Feb 28, 2016 - cbb799b1ae3f309c99beb0d287e9bb3b62ea405c Update to 3.1.0 release from 3.0.x
Nov 23, 2016 - b28dd88994ec144c2235721ef8e1133b3651e790 Newer version fixing various bugs, also for 10.12 sdk support
Jun 1, 2017 - ff447038714f853a0bae1720e3e8d6f8da279c51 to be able to compile with 10.13 sdk
Aug 30, 2017 - 4a71ba820f085a3d5a7233e9fd0e23ae4e45af58 attempt to see if fixes #884