Compiling FileZilla 3 under macOS: Difference between revisions
From FileZilla Wiki
Jump to navigationJump to search
No edit summary |
|||
Line 1: | Line 1: | ||
This documentation explains how to setup a build environment for [[FileZilla 3]] and how to compile it under macOS using [https://developer.apple.com/xcode/ Xcode]. These directions have been tested under macOS | This documentation explains how to setup a build environment for [[FileZilla 3]] and how to compile it under macOS using [https://developer.apple.com/xcode/ Xcode]. These directions have been tested under macOS 12 (Monterey) on an Intel Mac. Resulting binaries are for macOS 10.13 or later. | ||
__TOC__ | __TOC__ | ||
Line 9: | Line 9: | ||
mkdir -p "$HOME/prefix" | mkdir -p "$HOME/prefix" | ||
mkdir -p "$HOME/src" | mkdir -p "$HOME/src" | ||
export CC="clang -mmacosx-version-min=10. | export CC="clang -mmacosx-version-min=10.13" | ||
export CXX="clang++ -std=c++17 -stdlib=libc++ -mmacosx-version-min=10. | export CXX="clang++ -std=c++17 -stdlib=libc++ -mmacosx-version-min=10.13" | ||
export OBJC="clang -mmacosx-version-min=10. | export OBJC="clang -mmacosx-version-min=10.13" | ||
export AS="as -mmacosx-version-min=10. | export AS="as -mmacosx-version-min=10.13" | ||
export LD="ld -macosx_version_min 10. | export LD="ld -macosx_version_min 10.13" | ||
export PATH="$HOME/prefix/bin:$PATH" | export PATH="$HOME/prefix/bin:$PATH" | ||
export CPPFLAGS="-I$HOME/prefix/include" | export CPPFLAGS="-I$HOME/prefix/include" | ||
Line 42: | Line 42: | ||
==GMP== | ==GMP== | ||
cd ~/src | cd ~/src | ||
curl -OL https://gmplib.org/download/gmp/gmp-6.1 | curl -OL https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz | ||
tar xvf gmp-6.1 | tar xvf gmp-6.2.1.tar.xz | ||
cd gmp-6.1 | cd gmp-6.2.1 | ||
./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat | ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat | ||
make | make | ||
Line 51: | Line 51: | ||
==Nettle== | ==Nettle== | ||
cd ~/src | cd ~/src | ||
curl -OL https://ftp.gnu.org/gnu/nettle/nettle-3. | curl -OL https://ftp.gnu.org/gnu/nettle/nettle-3.7.3.tar.gz | ||
tar xvf nettle-3. | tar xvf nettle-3.7.3.tar.gz | ||
cd nettle-3. | cd nettle-3.7.3 | ||
./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat | ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat | ||
make | make | ||
Line 60: | Line 60: | ||
==GnuTLS== | ==GnuTLS== | ||
cd ~/src | cd ~/src | ||
curl -OL ftp://ftp.gnutls.org/gcrypt/gnutls/v3. | curl -OL ftp://ftp.gnutls.org/gcrypt/gnutls/v3.7/gnutls-3.7.2.tar.xz | ||
tar xvf gnutls-3 | tar xvf gnutls-3.7.2.tar.xz | ||
cd gnutls-3. | cd gnutls-3.7.2 | ||
./configure --prefix="$HOME/prefix" --enable-shared --disable-static --with-included-libtasn1 --without-p11-kit --disable-doc --enable-local-libopts --disable-nls --with-included-unistring --disable-guile | ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --with-included-libtasn1 --without-p11-kit --disable-doc --enable-local-libopts --disable-nls --with-included-unistring --disable-guile | ||
make | make | ||
Line 90: | Line 90: | ||
tar xvf wxWidgets-3.0.5.tar.bz2 | tar xvf wxWidgets-3.0.5.tar.bz2 | ||
cd wxWidgets-3.0.5 | cd wxWidgets-3.0.5 | ||
./configure --prefix="$HOME/prefix" --enable-shared --disable-static --disable-stc --disable-html --disable-richtext --disable-webkit --disable-webview --with-macosx-version-min=10. | ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --disable-stc --disable-html --disable-richtext --disable-webkit --disable-webview --with-macosx-version-min=10.13 --with-osx | ||
make | make | ||
make install | make install | ||
Line 96: | Line 96: | ||
==Compile libfilezilla== | ==Compile libfilezilla== | ||
cd ~/src | cd ~/src | ||
curl -OL https://download.filezilla-project.org/libfilezilla/libfilezilla-0. | curl -OL https://download.filezilla-project.org/libfilezilla/libfilezilla-0.35.0.tar.bz2 | ||
tar xf libfilezilla-0. | tar xf libfilezilla-0.35.0.tar.bz2 | ||
cd libfilezilla-0. | cd libfilezilla-0.35.0 | ||
./configure --prefix="$HOME/prefix" --enable-shared --disable-static | ./configure --prefix="$HOME/prefix" --enable-shared --disable-static | ||
make | make | ||
Line 105: | Line 105: | ||
==Compile FileZilla== | ==Compile FileZilla== | ||
cd ~/src | cd ~/src | ||
curl -OL https://download.filezilla-project.org/client/FileZilla_3. | curl -OL https://download.filezilla-project.org/client/FileZilla_3.57.0_src.tar.bz2 | ||
tar xvjf FileZilla_3. | tar xvjf FileZilla_3.57.0_src.tar.bz2 | ||
cd filezilla-3. | cd filezilla-3.57.0 | ||
./configure --with-pugixml=builtin | ./configure --with-pugixml=builtin | ||
make | make |
Revision as of 15:10, 10 January 2022
This documentation explains how to setup a build environment for FileZilla 3 and how to compile it under macOS using Xcode. These directions have been tested under macOS 12 (Monterey) on an Intel Mac. Resulting binaries are for macOS 10.13 or later.
Xcode
You need to download and install the latest version of Xcode from https://developer.apple.com/xcode/download/
Build environment
Open a Terminal and type the following:
mkdir -p "$HOME/prefix" mkdir -p "$HOME/src" export CC="clang -mmacosx-version-min=10.13" export CXX="clang++ -std=c++17 -stdlib=libc++ -mmacosx-version-min=10.13" export OBJC="clang -mmacosx-version-min=10.13" export AS="as -mmacosx-version-min=10.13" export LD="ld -macosx_version_min 10.13" export PATH="$HOME/prefix/bin:$PATH" export CPPFLAGS="-I$HOME/prefix/include" export LDFLAGS="-L$HOME/prefix/lib" export LD_LIBRARY_PATH="$HOME/prefix/lib" export PKG_CONFIG_PATH="$HOME/prefix/lib/pkgconfig"
If you ever close the terminal and reopen it, repeat the above steps before you continue.
pkg-config
cd ~/src curl -OL https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz tar xvf pkg-config-0.29.2.tar.gz cd pkg-config-0.29.2 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --with-internal-glib make make install
libidn
cd ~/src curl -OL https://ftp.gnu.org/gnu/libidn/libidn-1.35.tar.gz tar xvzf libidn-1.35.tar.gz cd libidn-1.35 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static make make install
GMP
cd ~/src curl -OL https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz tar xvf gmp-6.2.1.tar.xz cd gmp-6.2.1 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat make make install
Nettle
cd ~/src curl -OL https://ftp.gnu.org/gnu/nettle/nettle-3.7.3.tar.gz tar xvf nettle-3.7.3.tar.gz cd nettle-3.7.3 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat make make install
GnuTLS
cd ~/src curl -OL ftp://ftp.gnutls.org/gcrypt/gnutls/v3.7/gnutls-3.7.2.tar.xz tar xvf gnutls-3.7.2.tar.xz cd gnutls-3.7.2 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --with-included-libtasn1 --without-p11-kit --disable-doc --enable-local-libopts --disable-nls --with-included-unistring --disable-guile make make install
Compile SQLite
cd ~/src curl -OL https://sqlite.org/2018/sqlite-autoconf-3260000.tar.gz tar xvzf sqlite-autoconf-3260000.tar.gz cd sqlite-autoconf-3260000 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --disable-dynamic-extensions make make install
gettext
cd ~/src curl -OL https://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.8.tar.xz tar xvf gettext-0.19.8.tar.xz cd gettext-0.19.8 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static make make install
Compile wxWidgets
cd ~/src curl -OL https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.tar.bz2 tar xvf wxWidgets-3.0.5.tar.bz2 cd wxWidgets-3.0.5 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --disable-stc --disable-html --disable-richtext --disable-webkit --disable-webview --with-macosx-version-min=10.13 --with-osx make make install
Compile libfilezilla
cd ~/src curl -OL https://download.filezilla-project.org/libfilezilla/libfilezilla-0.35.0.tar.bz2 tar xf libfilezilla-0.35.0.tar.bz2 cd libfilezilla-0.35.0 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static make make install
Compile FileZilla
cd ~/src curl -OL https://download.filezilla-project.org/client/FileZilla_3.57.0_src.tar.bz2 tar xvjf FileZilla_3.57.0_src.tar.bz2 cd filezilla-3.57.0 ./configure --with-pugixml=builtin make