forked from xLightsSequencer/xLights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.linux
113 lines (83 loc) · 4.57 KB
/
README.linux
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
xLights/Nutcracker Version 3.x Linux build instructions
------------------------------------------------------------------------------
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 Linux.
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 2.9.4. This can be compiled from
source or installed via packages if they are available for your distribution.
This document describes how to build wxWidgets if you need to to that yourself.
These instructions have been tested on the following distributions:
- Linux Mint 12
- Ubuntu 12.10
Instructions for other Linux distributions will vary.
a) Using Software Manager (or apt-get or rpm), install these packages:
build-essential
subversion
libgtk2.0-dev
libgstreamer0.10-dev
libgstreamer-plugins-base0.10-dev
b) Build wxWidgets 2.9.4
$ cd ~
$ wget http://sourceforge.net/projects/wxwindows/files/latest/wxWidgets-2.9.4.tar.bz2
$ tar xjf wxWidgets-2.9.4.tar.bz2
$ cd wxWidgets-2.9.4
$ ./configure --with-mediactrl
$ make
$ sudo make install
$ sudo ldconfig
c) Get the xLights/Nutcracker source code by opening a terminal window and
typing the following:
git clone https://github.com/smeighan/nutcracker_c.git nutcracker
xLights/Nutcracker can be built 2 ways on Linux. First, you can use the
supplied makefile to build it. This is sufficient to get xLights/Nutcracker
running, but you will be limited in what source code modifications you can
make. Minor code changes or enhancements will be OK. The second way to
build is to install the Code::Blocks IDE and compile xLights/Nutcracker
within the IDE. If you plan on modifying xLights/Nutcracker yourself, this
may be the easiest way to go.
To build xLights using the supplied makefile proceed to step 'd'. To build
using Code::Blocks, proceed to step 'e'.:
d) Build xLights using the supplied makefile:
$ cd nutcracker/xLights
$ make -f xLights.cbp.mak clean
$ make -f xLights.cbp.mak releaselinux
You will get some compiler warnings, however, the executable 'xLights'
should get built in the ./bin directory. The proper dependencies are
not currently setup in the makefile to trigger rebuilds when some
files are modified, so you may have to run the clean command if your
code does not build properly after making modifications to the source.
If you built using the makefile, you can copy the nutcracker/bin/xLights
binary to a directory in your path or run it directly from there.
If you want to build using Code::Blocks, proceed to step 'e'.
e) Building xLights using Code::Blocks
Install the Code::Blocks IDE using your distribution's package
manager. The latest stable version is 10.05, which works ok for
everything except the bitmap buttons on the Sequence tab.
It will compile xLights just fine; but if you change the
visual layout using 10.05, you will lose those bitmap
buttons. Also, you may need to install libwxsmithlib0 to
enable visual layout.
f) Now you are ready to use Code::Blocks to build xLights
by double-clicking on the xLights.cbp file.
In order for the double-click to work, you may need
to first right-click on the cbp file, select properties,
and uncheck the box indicating that the file is runnable.
Make sure you set the target to "Release Linux" before you build.
That should be all you need to build xLights/Nutcracker.
==============================================================================
If it is necessary to rebuild the xLights.cbp.mak makefile, the command used
to run cbp2make is:
cbp2make -in xLights.cbp -out xLights.cbp.mak --with-deps --keep-outdir --keep-objdir
After creating xLights.cbp.mak, the following change are also made to the
file to make compilation a little cleaner for now.
- Add the following line near the top of the file:
IGNORE_WARNINGS = -Wno-reorder -Wno-sign-compare -Wno-unused-variable -Wno-switch
Once some of these issues are fixed, these warnings can be reenabled.
- Add $(IGNORE_WARNINGS) to the end of the definition of CFLAGS_DEBUGLINUX and
CFLAGS_RELEASELINUX
- Change the definition of OBJDIR_DEBUGLINUX to .objs_debug
- Change the 'all' target to only compile releaselinux instead of both
releaselinux and debuglinux since the bin/xLights binary is the target of
both of these.