A bit more re-organization.
[lyx.git] / INSTALL.MacOSX
blob343ab1fd130647dc6e29b0d45239aaa444a94cb7
1 Building LyX/Mac-1.5
2 Ronald Florence <ron@18james.com>
3 Modified by Bennett Helm <bennett.helm@fandm.edu>, Anders
4 Ekberg <anek@mac.com> and Jean-Marc Lasgouttes <lasgouttes@lyx.org>.
6 LyX/Mac is built from the LyX source, the GPL-licensed Trolltech
7 Qt/Mac library, and a custom application bundle.
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".)
17 PREREQUISITES
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.
24 1. Qt/Mac Opensource Edition, version 4. This library is GPL-
25 licensed and can be downloaded from
26 <http://trolltech.com/developer/downloads/qt/mac/>. 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:
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
38 2. [Needed only for developmental builds:] automake, version 1.10
39 or higher (check with automake --version). Probably the easiest
40 way to get this is to use MacPorts (from http://www.macports.org/)
41 and install automake using
43      sudo port install automake
45 3. [Needed only for developmental builds:] gettext version >= 0.12
46 (check with gettext --version). If the installed version is
47 insufficient the easiest way to obtain a later version is to use
48 MacPorts (from http://www.macports.org/) and install gettext
49 using:
51      sudo port install gettext
53 4. [Useful to simplify detection of Qt:] pkg-config >= 0.9.0. Again,
54 the simplest way is through MacPorts:
56      sudo port install pkgconfig
59 BUILD INSTRUCTIONS
61 In what follows, /path/to/LyX.app is the location where you want LyX
62 to create the LyX binary. You should substitute something appropriate,
63 like: ~/Desktop/LyX.app. Also, substitute the appropriate path to
64 where you installed Qt for /path/to/QT4 (as above).
66 (a) Official Releases
68 If you did not install pkg-config, first set the LDFLAGS variable:
70      export LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -framework Cocoa"
72 Then, cd to the top of the LyX source hierarchy, and enter:
74      ./configure --prefix=/path/to/LyX.app --with-version-suffix=-1.6 --with-qt4-dir=/path/to/QT4 --with-included-gettext --enable-optimization=-Os
75      make
76      make install-strip
78 (Note that the --with-version-suffix=-1.6 option will result in LyX's
79 user's directory being located at ~/Library/Application Support/LyX-1.6)
82 (b) Developmental Versions (svn checkouts)
84 Building LyX from developmental sources requires a few more steps.
85 Instead of the instructions above, do the following:
87 If you did not install pkg-config, first set the LDFLAGS variable:
89      export LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -framework Cocoa"
91 Then, cd to the top of the LyX source hierarchy, and enter:
93      ./autogen.sh
94      ./configure --prefix=/path/to/LyX.app --with-version-suffix=-1.6 --with-qt4-dir=/path/to/QT4 --with-included-gettext --enable-optimization=-Os
95      make
96      make install-strip
98 Note that by default svn versions use some extra debugging code that
99 somewhat slows LyX down. If it is a real problem, you can pass the
100 option --enable-build-type=release to configure.
102 The information on this page is believed to be accurate, has been used
103 successfully on many systems and sites, and has benefited from the
104 comments and suggestions of many users. Due to the variations in
105 individual systems, this information is conveyed as is with no
106 warranty of any kind.
108 For more information on LyX/Mac, see <http://wiki.lyx.org/Mac/Mac>.