Cross Compiling FileZilla 3 for Windows under Ubuntu or Debian GNU/Linux
From FileZilla Wiki
Revision as of 23:51, 29 November 2012 by 158.109.125.214 (talk) (→Patch mingw32-runtime (only Debian))
This documentation explains how to setup a build environment for FileZilla 3 for Windows and how to compile it under Ubuntu or Debian using MinGW. It will take less time and simple than Compiling FileZilla 3 under Windows.
OS version
- Ubuntu 10.04 (recommended)
- Debian 5.0.3
- coLinux with Debian-5.0r2-lenny
Setting up the build environment
Ubuntu
Required packages
sudo apt-get install -y mingw32 make g++ libtool bzip2 automake gettext wx-common
Debian
Do works as root
su -
Required packages
apt-get install -y mingw32 make g++ libtool bzip2 automake gettext wx-common
Just noticed that the delufat bookmarks in Ubuntu include one entry pointing back to Debian. It even says that Ubuntu is based on Debian. It’s a small thing but it made my day. It’s nice to see this kind of acknowledgement. More here
Make libraries
Do works as normal user in Debian.
exit
Make working & install directory
Check available space of storage.
mkdir ~/mingw32 mkdir /tmp/fz3 cd /tmp/fz3
Setting up environment variables
export CFGPRE=~/mingw32 export CFGOPT="--prefix=$CFGPRE --host=i586-mingw32msvc --disable-shared --enable-static"
iconv
wget ftp://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz tar zxvf libiconv-1.14.tar.gz cd libiconv-1.14 ./configure $CFGOPT make install clean cd ..
libidn
wget ftp://alpha.gnu.org/gnu/libidn/libidn2-0.8.tar.gz tar zxvf libidn2-0.8.tar.gz cd libidn2-0.8 ./configure $CFGOPT make install clean cd ..
libgpg-error
wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.bz2 tar jxvf libgpg-error-1.10.tar.bz2 cd libgpg-error-1.10 ./configure $CFGOPT --disable-nls make install clean cd ..
libgcrypt
wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.bz2 tar jxvf libgcrypt-1.5.0.tar.bz2 cd libgcrypt-1.5.0 ./configure $CFGOPT --disable-nls --disable-asm --with-gpg-error-prefix=$CFGPRE make install clean cd ..
GnuTLS
wget ftp://ftp.gnu.org/pub/gnu/gnutls/gnutls-3.0.19.tar.xz tar Jxvf gnutls-3.0.19.tar.xz cd gnutls-3.0.19 ./configure $CFGOPT --disable-nls --disable-cxx --disable-guile --with-libgcrypt-prefix=$CFGPRE make install clean cd ..
wxWidgets
wget http://downloads.sourceforge.net/wxwindows/wxWidgets-2.8.12.tar.bz2 tar jxvf wxWidgets-2.8.12.tar.bz2 cd wxWidgets-2.8.12 mkdir compile cd compile ../configure $CFGOPT --enable-unicode make install clean cd ../..
Compiling FileZilla 3
wget http://downloads.sourceforge.net/filezilla/FileZilla_3.5.3_src.tar.bz2 tar jxvf FileZilla_3.5.3_src.tar.bz2 cd filezilla-3.5.3 ./autogen.sh
mkdir compile cd compile
autogen.sh of FileZilla 3 use old libgnutls-config. GnuTLS does not use libgnutls-config anymore.
Dowload http://filezilla-project.org/codesquid/libgnutls-config to $CFGPRE/bin. Edit prefix value.
wget -O $CFGPRE/bin/libgnutls-config http://filezilla-project.org/codesquid/libgnutls-config echo $CFGPRE /home/fz/mingw32 # remember the path vi $CFGPRE/bin/libgnutls-config prefix=/home/fz/mingw32 # edit this line. chmod +x $CFGPRE/bin/libgnutls-config
Configure and builld.
CFLAGS="-I$CFGPRE/include" CXXFLAGS="-I$CFGPRE/include" LDFLAGS="-L$CFGPRE/lib" ../configure $CFGOPT --with-wx-prefix=$CFGPRE --with-libgnutls-prefix=$CFGPRE make strip src/interface/filezilla.exe