]> git.lyx.org Git - lyx.git/blob - INSTALL.MacOSX
This is a dummy commit for posting the real changelog for the the last
[lyx.git] / INSTALL.MacOSX
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>.
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.
25 This library is GPL-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:
31
32      ./configure -static -no-exceptions -nomake examples -nomake tools -nomake demos -prefix /path/to/QT4
33      make
34      make install
35      rm /path/to/QT4/lib/*.la
36
37         with Qt4.6.2 and snow leopard it becomes:
38
39      CC=gcc-4.0 OBJC=gcc-4.0 CXX=g++-4.0\
40        ./configure -opensource -silent -static -release -universal -fast\
41        -sdk /Developer/SDKs/MacOSX10.4u.sdk\
42        -no-framework -no-exceptions -no-webkit -no-qt3support -no-javascript-jit -no-dbus\
43        -nomake examples -nomake demos -nomake docs\
44        -nomake tools\
45        -prefix /path/to/QT4
46      make
47      make install
48
49 2. [Needed only for developmental builds:] automake, version 1.10
50 or higher (check with automake --version). Probably the easiest
51 way to get this is to use MacPorts (from http://www.macports.org/)
52 and install automake using
53
54      sudo port install automake
55
56 3. [Needed only for developmental builds:] gettext version >= 0.12
57 (check with gettext --version). If the installed version is
58 insufficient the easiest way to obtain a later version is to use
59 MacPorts (from http://www.macports.org/) and install gettext
60 using:
61
62      sudo port install gettext
63
64 4. [Useful to simplify detection of Qt:] pkg-config >= 0.9.0. Again,
65 the simplest way is through MacPorts:
66
67      sudo port install pkgconfig
68
69
70 5. To build with included spell checker (ASpell):
71 The aspell library is GPL-licensed and can be downloaded from
72 ftp://ftp.gnu.org/gnu/aspell or one of the mirrors.
73 At the time of writing aspell-0.60.tar.gz is the current version.
74 Unpack the tarball in the same directory where you placed the
75 svn checkout or LyX tarball.
76
77 BUILD INSTRUCTIONS
78
79 In what follows, /path/to/LyX.app is the location where you want LyX
80 to create the LyX binary. You should substitute something appropriate,
81 like: ~/Desktop/LyX.app. Also, substitute the appropriate path to
82 where you installed Qt for /path/to/QT4 (as above).
83
84 (a) Official Releases
85
86 If you did not install pkg-config, first set the LDFLAGS variable:
87
88      export LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -framework Cocoa"
89
90 Then, cd to the top of the LyX source hierarchy, and enter:
91
92      ./configure --prefix=/path/to/LyX.app --with-version-suffix=-2.0 --with-qt4-dir=/path/to/QT4 --with-included-gettext --enable-optimization=-O2
93      make
94      make install-strip
95
96 (Note that the --with-version-suffix=-2.0 option will result in LyX's
97 user's directory being located at ~/Library/Application Support/LyX-2.0)
98
99
100 (b) Developmental Versions (svn checkouts)
101
102 Building LyX from developmental sources requires a few more steps.
103 Instead of the instructions above, do the following:
104
105 If you did not install pkg-config, first set the LDFLAGS variable:
106
107      export LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -framework Cocoa"
108
109 Then, cd to the top of the LyX source hierarchy, and enter:
110
111      ./autogen.sh
112      ./configure --prefix=/path/to/LyX.app --with-version-suffix=-2.0 --with-qt4-dir=/path/to/QT4 --with-included-gettext --enable-optimization=-O2  --disable-stdlib-debug
113      make
114      make install-strip
115
116 Note that by default svn versions use some extra debugging code that
117 somewhat slows LyX down. If it is a real problem, you can pass the
118 option --enable-build-type=release to configure.
119
120 The information on this page is believed to be accurate, has been used
121 successfully on many systems and sites, and has benefited from the
122 comments and suggestions of many users. Due to the variations in
123 individual systems, this information is conveyed as is with no
124 warranty of any kind.
125
126 For more information on LyX/Mac, see <http://wiki.lyx.org/Mac/Mac>.