Compiling FileZilla 3 under macOS: Difference between revisions

From FileZilla Wiki
Jump to navigationJump to search
m (Reverted edits by 111.161.3.238 (Talk) to last revision by CodeSquid)
(updated current versions of dependencies)
Line 49: Line 49:
=== wxWidgets ===
=== wxWidgets ===


Download [http://www.wxwidgets.org/downloads/ wxWidgets]. You will need version 2.8.9 or later. The current version for Mac is [http://prdownloads.sourceforge.net/wxwindows/wxMac-2.8.11.tar.gz wxMac-2.8.11.tar.gz].
Download [http://www.wxwidgets.org/downloads/ wxWidgets]. You will need version 2.8.9 or later. The current version for Mac is [http://prdownloads.sourceforge.net/wxwindows/wxMac-2.8.12.tar.gz wxMac-2.8.12.tar.gz].


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
  tar xzf ~/Desktop/wxMac-2.8.11.tar.gz
  tar xzf ~/Desktop/wxMac-2.8.12.tar.gz
  mkdir build-wx
  mkdir build-wx
  cd build-wx
  cd build-wx
  ../wxMac-2.8.11/configure --disable-compat26 --enable-unicode \
  ../wxMac-2.8.12/configure --disable-compat26 --enable-unicode \
  --prefix $HOME/filezilla/wxMac && nice make && make install
  --prefix $HOME/filezilla/wxMac && nice make && make install


Line 73: Line 73:
=== pkg-config ===
=== pkg-config ===


Download [http://pkgconfig.freedesktop.org/releases/ pkg-config]. You will need version 0.23 or later. The current version is [http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz pkg-config-0.25.tar.gz].
Download [http://pkgconfig.freedesktop.org/releases/ pkg-config]. You will need version 0.23 or later. The current version is [http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz pkg-config-0.26.tar.gz].


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
  tar xzf ~/Desktop/pkg-config-0.25.tar.gz
  tar xzf ~/Desktop/pkg-config-0.26.tar.gz
  cd pkg-config-0.25
  cd pkg-config-0.26
  ./configure --prefix $HOME/filezilla/pkg-config && nice make && make install
  ./configure --prefix $HOME/filezilla/pkg-config && nice make && make install


=== GNU libidn ===
=== GNU libidn ===


Download [ftp://ftp.gnu.org/gnu/libidn/ GNU libidn]. The current version is [ftp://ftp.gnu.org/gnu/libidn/libidn-1.19.tar.gz libidn-1.19.tar.gz].
Download [ftp://ftp.gnu.org/gnu/libidn/ GNU libidn]. The current version is [ftp://ftp.gnu.org/gnu/libidn/libidn-1.22.tar.gz libidn-1.22.tar.gz].


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
  tar xzf ~/Desktop/libidn-1.19.tar.gz
  tar xzf ~/Desktop/libidn-1.22.tar.gz
  cd libidn-1.19
  cd libidn-1.22
  ./configure --prefix $HOME/filezilla/libidn && nice make && make install
  ./configure --prefix $HOME/filezilla/libidn && nice make && make install


Line 118: Line 118:
=== GNU TLS ===
=== GNU TLS ===


Download [ftp://ftp.gnu.org/pub/gnu/gnutls/ GNU TLS]. The current version is [ftp://ftp.gnu.org/pub/gnu/gnutls/gnutls-2.8.6.tar.bz2 gnutls-2.8.6.tar.bz2].
Download [ftp://ftp.gnu.org/pub/gnu/gnutls/ GNU TLS]. The current version is [ftp://ftp.gnu.org/pub/gnu/gnutls/gnutls-2.12.6.1.tar.bz2 gnutls-2.12.6.1.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
  tar xjf ~/Desktop/gnutls-2.8.6.tar.bz2
  tar xjf ~/Desktop/gnutls-2.12.6.1.tar.bz2
  cd gnutls-2.8.6
  cd gnutls-2.12.6.1
  ./configure --prefix $HOME/filezilla/gnutls --with-libgcrypt-prefix=$HOME/filezilla/libgcrypt && nice make && make install
  ./configure --prefix $HOME/filezilla/gnutls --with-libgcrypt-prefix=$HOME/filezilla/libgcrypt && nice make && make install



Revision as of 16:57, 6 June 2011

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.

See this post for more information about the build process on Tiger along with some automated build files.

Automated building with Fink

You may find it easier to use Fink to automate the process of building FileZilla from source.

Advantages of Fink

  • works under Tiger and Leopard on Intel and PPC
  • all necessary dependencies are downloaded, built, and installed automatically with a single command
  • does not interfere with any system software or other third-party software on your machine
  • as new versions of FileZilla are released, rebuilding and upgrading is automated

Disadvantages of Fink

  • packaged version of FileZilla can sometimes lag behind the newest release
  • customizing the build process is not straightforward

Instructions

  1. Install Fink per the User's Guide.
  2. Enable the "unstable" tree per this FAQ entry.
  3. Run fink install filezilla in a Terminal window.

Once the build process completes successfully, you will find a FileZilla icon in your Applications folder.

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 (August 25, 2009), Xcode 3.1.3 (17 Jun 2009) 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.3, 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.12.tar.gz.

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

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

GNU gettext

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

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

cd /tmp
tar xzf ~/Desktop/gettext-0.18.1.1.tar.gz
cd gettext-0.18.1.1
./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.26.tar.gz.

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

cd /tmp
tar xzf ~/Desktop/pkg-config-0.26.tar.gz
cd pkg-config-0.26
./configure --prefix $HOME/filezilla/pkg-config && nice make && make install

GNU libidn

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

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

cd /tmp
tar xzf ~/Desktop/libidn-1.22.tar.gz
cd libidn-1.22
./configure --prefix $HOME/filezilla/libidn && nice make && make install

libgpg-error

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

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

cd /tmp
tar xjf ~/Desktop/libgpg-error-1.10.tar.bz2
cd libgpg-error-1.10
./configure --prefix $HOME/filezilla/libgpg-error && nice make && make install

libgcrypt

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

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

cd /tmp
tar xjf ~/Desktop/libgcrypt-1.4.6.tar.bz2
cd libgcrypt-1.4.6
./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.12.6.1.tar.bz2.

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

cd /tmp
tar xjf ~/Desktop/gnutls-2.12.6.1.tar.bz2
cd gnutls-2.12.6.1
./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.3.5.1_src.tar.bz2.

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

cd /tmp
tar xjf ~/Desktop/FileZilla_3.3.5.1_src.tar.bz2
cd filezilla-3.3.5.1
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"
./configure && nice make
cd FileZilla.app/Contents/MacOS
strip filezilla fzputtygen fzsftp
cd - && mv FileZilla.app ~/Desktop

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.