]> git.lyx.org Git - features.git/blob - INSTALL.MacOSX
update mac build instructions
[features.git] / INSTALL.MacOSX
1 Building LyX/Mac-1.5
2 Ronald Florence <ron@18james.com>
3 Modified by Bennett Helm <bennett.helm@fandm.edu> and by Anders
4 Ekberg <anek@mac.com>.
5
6 LyX/Mac is built from the LyX source, the GPL-licensed Trolltech
7 Qt/Mac library, and a custom application bundle.
8
9 You will need the MacOSX development tools. The procedure described
10 here builds LyX linked with a static Qt library. Also note that
11 building LyX/Mac requires gcc version 4.0 or higher. (You can check
12 your version  by entering "gcc -v" in the Terminal; you can change
13 your gcc version to version 4.0, for example, by entering
14 "sudo gcc_select 4.0".)
15
16
17 PREREQUISITES
18
19 Note: Only Qt/Mac is needed for building official LyX releases, and
20 so steps 2 and 3 can be skipped in these cases. Those wanting to
21 build developmental versions must have automake and gettext as
22 well.
23
24 1. Qt/Mac Opensource Edition, version 4. This library is GPL-
25 licensed and can be downloaded from
26 <http://www.trolltech.com/download/qt/mac.html>. To compile it,
27 create a directory where you want to install QT4. In the following, 
28 the full path to this directory is called /path/to/QT4
29 Decompress Qt/Mac in a convenient directory, cd to the top of the
30 Qt source hierarcy, and enter:
31
32      ./configure -static -no-exceptions -nomake examples -nomake tools -nomake demos -prefix /path/to/QT4
33      make
34      make install
35      cd /path/to/QT4/lib
36      rm *.la
37
38 2. [Needed only for developmental builds:] automake, version 1.5
39 or higher (check with automake --version). Probably the easiest
40 way to get this is to use DarwinPorts (from
41 http://darwinports.opendarwin.org/getdp/) and install automake
42 using
43
44      sudo port install automake
45
46 3. [Needed only for developmental builds:] gettext version >= 0.12
47 (check with gettext --version). If the installed version is
48 insufficient the easiest way to obtain a later version is to use
49 DarwinPorts (from http://darwinports.opendarwin.org/getdp/) and
50 install gettext using:
51
52      sudo port install gettext
53
54
55 BUILD INSTRUCTIONS
56
57 In what follows, /path/to/LyX.app is the location where you want LyX
58 to create the LyX binary. You should substitute something appropriate,
59 like: ~/Desktop/LyX.app. Also, substitute the appropriate path to
60 where you installed Qt for /path/to/QT4 (as above).
61
62 (a) Official Releases
63
64 cd to the top of the LyX source hierarchy, and enter:
65
66      export LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -lz -framework Cocoa"
67      ./configure --prefix=/path/to/LyX.app --with-version-suffix=-1.5 --without-x --with-frontend=qt4 --with-qt4-dir=/path/to/QT4 --with-included-gettext --enable-optimization=-Os
68      make
69      make install-strip
70
71 (Note that the --with-version-suffix=-1.5 option will result in LyX's
72 user's directory being located at ~/Library/Application Support/LyX-1.5.)
73
74
75 (b) Developmental Versions (svn checkouts)
76
77 Building LyX from developmental sources requires a few more steps.
78 Instead of the instructions above, do the following:
79
80 cd to the top of the LyX source hierarchy, and enter:
81
82      export LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -lz -framework Cocoa"
83      ./autogen.sh
84      ./configure --prefix=/path/to/LyX.app --with-version-suffix=-1.5 --without-x --with-frontend=qt4 --with-qt4-dir=/path/to/QT4 --with-included-gettext --enable-optimization=-Os --disable-stdlib-debug --disable-concept-checks
85      make
86      make install-strip
87
88
89 The information on this page is believed to be accurate, has been used
90 successfully on many systems and sites, and has benefited from the
91 comments and suggestions of many users. Due to the variations in
92 individual systems, this information is conveyed as is with no
93 warranty of any kind.
94
95 For more information on LyX/Mac, see <http://wiki.lyx.org/Mac/Mac>.