[See below for an alternative way]

In order to install Kile on MacOS X, you need the following things:
- a working LaTeX distribution
- the KDE libraries
- and Kile itself, of course

Installing X11
--------------

[X11 does not need to be installed with Qt4 as it can use the Aqua framework.]


Installing all the rest through Fink
------------------------------------

Fink is the packaging system from Debian ported to MacOS X. Installing Fink itself is very straightforward, so only two things will be mentioned here:
- you must download and install the latest Xcode version from Apple (free download, just requires registration),
- make sure Fink uses the package repository compatible with your system (specifically, if you have MacOS X 10.4, use the 10.4 branch and *not* the 10.4-transitional branch).

Fink lets you choose between precompiled, ready-to-use, packages, and compiling them yourself. Practically speaking, the Fink project provides few up-to-date precompiled packages, so compilation is often necessary. But don't worry, the procedure is automatic in any case.

After that, installing the rest is very straightforward:

- LaTeX distribution: install packages "tetex" and "tetex-base".
- KDE libraries: the bare minimum would be package "kdebase3-unified", but you should also install packages like "kpdf", "kdvi" and "kghostview" to make best use of Kile. Installing a localisation package to have dialogs in your language would also be nice ; for example, the French package is called "kde-i18n-french".
- Kile: its package is called "kile".
- Other useful packages, depending on your habits: "bibview", "gnuplot", "xfig", "beamer", "texpower"... Just go shopping with Fink.

Have fun!

Fink project: http://fink.sourceforge.net


Installing Kile through Macports
--------------------------------

Macports is a source-based package manager, from which it is possible to install the whole software suite needed for Kile. 
Macports can be installed from a package installer, which can be found for each Apple platform at: http://www.macports.org/install.php.

Configuring Macports:
When Macports is installed, it needs to be configured slightly in order to ensure that the correct configurations are prepared for Kile. For this, run:
	sudo pico /opt/local/etc/macports/variants.conf
and add:
	+no_x11 +quartz +qt4
at the end of the file. 

Then, run
	sudo port selfupdate
in order to ensure that latest versions of the softwares will be installed. 

Installing Kile:
At this point, you can run 
	sudo port install kile-devel
kile-devel is the KDE4 port for Kile. This will install all the libraries needed for Kile, including Qt4, and KDE packages. This compilation will take a lot of time, but you can follow the installation progress for each package. At the end of the installation, you need to run some commands in order to finish the configuration, to ensure that DBUS will work, and to ensure you have access to KDE preferences:
	sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
	launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
	sudo chown -R $USER ~/Library/Preferences/KDE
where $USER should be changed to your login name. 

Finding TeX paths:
The application bundles of Apple do not recognize the $PATH variables set for xterm. We therefore need to set them for Kile. To set globally the $PATH variable for application bundles. For this, you can run the following commands:
	mkdir ~/.MacOSX
	pico ./.MacOSX/environments.plist
and add the following text in environments.plist:
	<?xml version="1.0" encoding="UTF-8"?>
	<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
	<plist version="1.0">
	<dict>
	        <key>KDEDIRS</key>
	        <string>/opt/local</string>
	        <key>PATH</key>
	        <string>/opt/local/bin:/opt/local/sbin:$TEXPATH</string>
	</dict>
	</plist>
where you should replace $TEXPATH with the path to your TeX distribution. Typically, it should be /opt/local/bin if you are using the TeXLive port of Macports (so that you can leave it blank), or /usr/local/texbin if you are using MacTeX package. 

Starting Kile:
You should first start the /Applications/Macports/KDE4/kdeinit4.app program to set up the KDE environment. Then, you can start Kile, and check that everything work fine by performing a system check from the Settings menu.


Other installation methods
--------------------------

[i-installer is deprecated as of Jan 1 2007]

[This upper part of the readme was contributed by Thibaut Cousin (cousin@kde.org)]


Kile SVN for KDE 4
------------------
It is now possible to install the latest version of Kile from the Subversion repository using the KDE 4 libraries. This means that you no longer need to use the X11 libraries. To achieve this you need:

- KDE 4.1 packages from http://mac.kde.org/
- Kile source from SVN

First download the latest packages from http://mac.kde.org/?id=download
At the time of writing the latest version is 4.1.2. Install the packages in order. Once these
are installed you should have a working version of KDE for the Mac. If applications crash, try issuing the command: 

launchctl load -F /Library/LaunchAgents/org.freedesktop.dbus-session.plist 

to launch D-BUS. If when a program starts but gives an error about D-BUS being uncontactable, try rebooting.

Once you have a working copy of KDE 4.1 the next step is to download and compile Kile from the Subversion repository. Follow the instructions on:

http://techbase.kde.org/Projects/KDE_on_Mac_OS_X/Macbook_Manifesto 

This will set up your build environment. Next get the latest version using the command:

svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/office/kile

Go into this directory in a terminal and run the commands:
- cmake .
- make
- sudo make install

You now have a running native version of Kile on your Mac!

[The lower part of this readme was contributed by Thomas Quillinan <t.quillinan@gm...>]
