Compiling FileZilla 3 under macOS: Difference between revisions

From FileZilla Wiki
Jump to navigationJump to search
(changed from static to shared libraries. updated for gnutls 20090730 build)
(updated for gnutls 2.8.3 and FileZilla 3.2.7)
Line 92: Line 92:
=== GNU TLS ===
=== GNU TLS ===


Download [http://daily.josefsson.org/gnutls-2.8/ GNU TLS]. The current version has some bugs which have been fixed by botg, so we will use one of the daily releases until a new official release is supplied. I am using [http://daily.josefsson.org/gnutls-2.8/gnutls-2.8-20090730.tar.gz gnutls-2.8.20090730.tar.gz].
Download [ftp://ftp.gnu.org/pub/gnu/gnutls/ GNU TLS]. The current version is [ftp://ftp.gnu.org/pub/gnu/gnutls/gnutls-2.8.3.tar.bz2 gnutls-2.8.3.tar.bz2].


Start Terminal from the Applications/Utilities folder and enter the following commands:
Start Terminal from the Applications/Utilities folder and enter the following commands:


  cd /tmp
  cd /tmp
  gzcat ~/Desktop/gnutls-2.8.20090730.tar.gz | tar x
  gzcat ~/Desktop/gnutls-2.8.3.tar.gz | tar x
  cd gnutls-2.8.2
  cd gnutls-2.8.3
  ./configure --prefix $HOME/filezilla/gnutls --with-libgcrypt-prefix=$HOME/filezilla/libgcrypt
  ./configure --prefix $HOME/filezilla/gnutls --with-libgcrypt-prefix=$HOME/filezilla/libgcrypt && nice make && make install
nice make && make install


== Building [[FileZilla 3]] ==
== Building [[FileZilla 3]] ==


Download the [http://filezilla-project.org/download.php?type=client FileZilla source]. The current version is [https://www.ohloh.net/projects/filezilla/download?filename=FileZilla_3.2.6.1_src.tar.bz2 FileZilla_3.2.6.1_src.tar.bz2].
Download the [http://filezilla-project.org/download.php?type=client FileZilla source]. The current version is [https://www.ohloh.net/projects/filezilla/download?filename=FileZilla_3.2.7_src.tar.bz2 FileZilla_3.2.7_src.tar.bz2].
 
If you are using Tiger, you will also need [http://code.technoplaza.net/filezilla/filezilla-3.2.7-tiger-power-management.patch this patch].


Start Terminal from the Applications/Utilities folder and enter the following commands:
Start Terminal from the Applications/Utilities folder and enter the following commands:


  cd /tmp
  cd /tmp
  bzcat ~/Desktop/FileZilla_3.2.6.1_src.tar.bz2 | tar x
  bzcat ~/Desktop/FileZilla_3.2.7_src.tar.bz2 | tar x
  cd filezilla-3.2.6.1
  cd filezilla-3.2.7
  export PATH=$HOME/filezilla/wxMac/bin:$HOME/filezilla/gettext/bin:$HOME/filezilla/pkg-config/bin:$PATH
  export PATH=$HOME/filezilla/wxMac/bin:$HOME/filezilla/gettext/bin:$HOME/filezilla/pkg-config/bin:$PATH
  export PKG_CONFIG_PATH=$HOME/filezilla/gnutls/lib/pkgconfig
  export PKG_CONFIG_PATH=$HOME/filezilla/gnutls/lib/pkgconfig
  export CPPFLAGS="-I$HOME/filezilla/libidn/include"
  export CPPFLAGS="-I$HOME/filezilla/libidn/include"
  export LDFLAGS="-L$HOME/filezilla/libidn/lib"
  export LDFLAGS="-L$HOME/filezilla/libidn/lib"
patch -p0 < ~/Desktop/filezilla-3.2.7-tiger-power-management.patch
  ./configure && nice make
  ./configure && nice make
  cd FileZilla.app/Contents/MacOS
  cd FileZilla.app/Contents/MacOS
  strip filezilla fzputtygen fzsftp
  strip filezilla fzputtygen fzsftp
  cd - && mv FileZilla.app ~/Desktop
  cd - && mv FileZilla.app ~/Desktop
Leave out the patch -p0 line if you are running Leopard (10.5) or later. It removes functionality to be compatible with Tiger. See [http://forum.filezilla-project.org/viewtopic.php?f=3&t=12686&start=0 this post for more details].


If you get an error after "nice make", try this:
If you get an error after "nice make", try this:

Revision as of 22:51, 14 August 2009

This documentation explains how to setup a build environment for FileZilla 3 and how to compile it under Mac OS X using Xcode. These directions have been tested under Tiger and Leopard on an Intel Mac. Other Mac OS versions may or may not work.

Setting up the build environment

This includes the compiler and the required tools to build FileZilla 3 and its dependencies.

Xcode

Download and install the latest Xcode package for your system. Xcode 2.5 is the right version for Tiger. As of this writing (February 21, 2009), Xcode 3.1.2 (24 Nov 2008) is the current version for Leopard.

If you are using Xcode 2.5, you will need to customize the install. Ensure all options under "Command Line Support" are checked. In Xcode 3.1.2, this is not necessary.

Building the Dependencies

FileZilla depends on the work of several open source projects. We must build them before we can build FileZilla.

The dependencies can take a long time to build. Instead of waiting for each project to build, you can start an additional Terminal Shell for each one and run them at the same time. However, you must have libgpg-error built before libgcrypt, and you must have libgcrypt built before GNU TLS.

If you have a multi-core machine, the build may go faster if you change "nice make" to "nice make -jN" where N equals the number of cores you have + 1 (e.g. dual-core: N = 3).

wxWidgets

Download wxWidgets. You will need version 2.8.9 or later. The current version for Mac is wxMac-2.8.10.tar.gz.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
gzcat ~/Desktop/wxMac-2.8.10.tar.gz | tar x
mkdir build-wx
cd build-wx
../wxMac-2.8.10/configure --disable-compat26 --enable-unicode \
--prefix $HOME/filezilla/wxMac && nice make && make install

GNU gettext

Download GNU gettext. The current version is gettext-0.17.tar.gz.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
gzcat ~/Desktop/gettext-0.17.tar.gz | tar x
cd gettext-0.17
./configure --prefix $HOME/filezilla/gettext && nice make && make install

pkg-config

Download pkg-config. You will need version 0.23 or later. The current version is pkg-config-0.23.tar.gz.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
gzcat ~/Desktop/pkg-config-0.23.tar.gz | tar x
cd pkg-config-0.23
./configure --prefix $HOME/filezilla/pkg-config && nice make && make install

GNU libidn

Download GNU libidn. The current version is libidn-1.15.tar.gz.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
gzcat ~/Desktop/libidn-1.15.tar.gz | tar x
cd libidn-1.15
./configure --prefix $HOME/filezilla/libidn && nice make && make install

libgpg-error

Download libgpg-error. The current version is libgpg-error-1.7.tar.bz2.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
bzcat ~/Desktop/libgpg-error-1.7.tar.bz2 | tar x
cd libgpg-error-1.7
./configure --prefix $HOME/filezilla/libgpg-error && nice make && make install

libgcrypt

Download libgcrypt. The current version is libgcrypt-1.4.4.tar.bz2.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
bzcat ~/Desktop/libgcrypt-1.4.4.tar.bz2 | tar x
cd libgcrypt-1.4.4
./configure --prefix $HOME/filezilla/libgcrypt \
--with-gpg-error-prefix=$HOME/filezilla/libgpg-error && nice make && make install

GNU TLS

Download GNU TLS. The current version is gnutls-2.8.3.tar.bz2.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
gzcat ~/Desktop/gnutls-2.8.3.tar.gz | tar x
cd gnutls-2.8.3
./configure --prefix $HOME/filezilla/gnutls --with-libgcrypt-prefix=$HOME/filezilla/libgcrypt && nice make && make install

Building FileZilla 3

Download the FileZilla source. The current version is FileZilla_3.2.7_src.tar.bz2.

If you are using Tiger, you will also need this patch.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
bzcat ~/Desktop/FileZilla_3.2.7_src.tar.bz2 | tar x
cd filezilla-3.2.7
export PATH=$HOME/filezilla/wxMac/bin:$HOME/filezilla/gettext/bin:$HOME/filezilla/pkg-config/bin:$PATH
export PKG_CONFIG_PATH=$HOME/filezilla/gnutls/lib/pkgconfig
export CPPFLAGS="-I$HOME/filezilla/libidn/include"
export LDFLAGS="-L$HOME/filezilla/libidn/lib"
patch -p0 < ~/Desktop/filezilla-3.2.7-tiger-power-management.patch
./configure && nice make
cd FileZilla.app/Contents/MacOS
strip filezilla fzputtygen fzsftp
cd - && mv FileZilla.app ~/Desktop

Leave out the patch -p0 line if you are running Leopard (10.5) or later. It removes functionality to be compatible with Tiger. See this post for more details.

If you get an error after "nice make", try this:

rm -rf FileZilla.app && nice make

Troubleshooting

If you run into problems, please make sure you've followed each step exactly how it is explained and that you haven't missed any steps along the way. Feel free to ask questions on the FileZilla forums.