145
edits
(Wrong section indenting for Windows) |
(Made the Linux part Penelope so all platforms were similar. More s/Thunderbird/Penelope/g.) |
||
| Line 1: | Line 1: | ||
== Building | == Building Penelope == | ||
Start to become familiar with the process by building Thunderbird. Go [http://developer.mozilla.org/en/docs/Build_Documentation fetch and build] Thunderbird. Start learning how it works. | |||
=== | === Linux === | ||
These were the steps followed to build | These were the steps followed to build Penelope from CVS on linux. | ||
These instructions assume an up to date linux machine. The machine I used is running Gentoo Linux 2006.1. | These instructions assume an up to date linux machine. The machine I used is running Gentoo Linux 2006.1. | ||
More | More Thunderbird linux build details can be found at [http://developer.mozilla.org/en/docs/Linux_Build_Prerequisites developer.mozilla.org] | ||
* Create a new directory and cd into it | * Create a new directory and cd into it | ||
| Line 26: | Line 26: | ||
ac_add_options --enable-xft | ac_add_options --enable-xft | ||
ac_add_options --disable-tests | ac_add_options --disable-tests | ||
ac_add_options --enable-extensions=default,penelope | |||
Note that it is this last line that includes the building of the Penelope extension in the main build. The source code for Penelope can be found in mozilla/penelope. | |||
* make -f client.mk build | * make -f client.mk build | ||
| Line 33: | Line 36: | ||
=== | === OS X === | ||
The steps to build Penelope from CVS on OS X are almost identical to the instructions for Linux. There are may caveats depending on whether you want a universal binary, which version of OS X you have, which version you want to target, etc. | The steps to build Penelope from CVS on OS X are almost identical to the instructions for Linux. There are may caveats depending on whether you want a universal binary, which version of OS X you have, which version you want to target, etc. | ||
More Thunderbird OS X build details can be found at | More Thunderbird OS X build details can be found at [http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites developer.mozilla.org]. | ||
The only deviation from the Linux directions is the installation of LibIDL and GLib, and contents of the ~/.mozconfig file. | The only deviation from the Linux directions is the installation of LibIDL and GLib, and contents of the ~/.mozconfig file. | ||
| Line 58: | Line 61: | ||
ac_add_options --enable-extensions=default,penelope | ac_add_options --enable-extensions=default,penelope | ||
=== Windows === | |||
=== | |||
See the steps above under Linux for how to get the source code via CVS. | See the steps above under Linux for how to get the source code via CVS. | ||
| Line 87: | Line 88: | ||
==== Windows Vista ==== | ==== Windows Vista ==== | ||
Windows Vista provides some roadblocks in compiling | Windows Vista provides some roadblocks in compiling Penelope. The first is the new security model. By default, administrator accounts under Vista run applications at a reduced privilege level called Standard User. Microsoft found that the most common legitimate reason to need administrator rights was when installing an application, and in order for all the existing installation programs to work under Vista they had to come up with a heuristic workaround. What Vista does is automatically attempt to elevate the privilege of any application that has the words "install" or "setup" in the name of the executable filename. I say "attempt" because there appear to be some situations where the privilege elevation fails, and one of those happens to be when called inside of scripts. I think it has to do with the way the process is created (privilege elevation happens when you call ShellExecute(), but not when CreateProcess() is used), but I'm not sure of that entirely because I don't know how Cygwin shells start up new processes. | ||
And wouldn't you know it, one of the utilities used to compile | And wouldn't you know it, one of the utilities used to compile Penelope falls in to this heuristic: nsinstall.exe. All that command-line tool really does is copy some files, which doesn't require Administrator privileges as long as you have have write access to the destination directory, but Vista's automatic privilege elevation thinks it might due to the name. The privilege elevation fails and so the build fails. Happy, happy, joy, joy. | ||
There's two current workarounds. One is that the Command Prompt window that you use to compile | There's two current workarounds. One is that the Command Prompt window that you use to compile Penelope can be run as Administrator. You can create a shortcut setting that up (its in the Properties, Compatibility tab), or you can right-click on a link to a Command Prompt (e.g. one that shows up on the Start menu) and select "Run as Administrator". This is an unsatisfying solution because it raises the privilege level unnecessarily, but it does work. It does happen to solve other permission-related issues with files in general, so it is an easy way to fix the problem. It's also no different than the security model of Windows before Vista (well, at least the way that most people set it up, which is to run as Administrator all of the time). | ||
The other way is to tell Vista that the app doesn't really need Administrator privileges. You can do this via a manifest file, which is an XML file which has properties about the application. It has the same name as the executable (including the ".exe"), but with an extra extension of ".mainfest" to it. The manifest file contents should look like this: | The other way is to tell Vista that the app doesn't really need Administrator privileges. You can do this via a manifest file, which is an XML file which has properties about the application. It has the same name as the executable (including the ".exe"), but with an extra extension of ".mainfest" to it. The manifest file contents should look like this: | ||
| Line 134: | Line 135: | ||
=== Specific Example === | === Specific Example === | ||
A lot of the core | A lot of the core functionality is provided in mail.dll, which is built from the mailnews directory. | ||
For example, say I wanted to make a change to a portion of the IMAP code (e.g. I want to modify "nsIMAPNamespace.cpp"). | For example, say I wanted to make a change to a portion of the IMAP code (e.g. I want to modify "nsIMAPNamespace.cpp"). | ||
edits