Editing Cross Compiling FileZilla 3 for Windows under Ubuntu or Debian GNU/Linux
From FileZilla Wiki
Jump to navigationJump to searchWarning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | This documentation explains how to setup a build environment for [[FileZilla 3]] '''for Windows''' and how to compile it under [ | + | This documentation explains how to setup a build environment for [[FileZilla 3]] '''for Windows''' and how to compile it under [http://debian.org Debian] using [http://www.mingw.org/ MinGW]. It will take less time and simple than [[Compiling FileZilla 3 under Windows]]. |
− | == | + | == Debian version == |
− | + | * [http://debian.org Debian] 5.0.3 | |
− | + | * [http://colinux.org coLinux] with [http://sourceforge.net/projects/colinux/files/Images%202.6.x%20Debian/Debian%205.0%20Lenny/Debian-5.0r2-lenny.7z/download Debian-5.0r2-lenny] | |
− | |||
− | |||
== Setting up the build environment == | == Setting up the build environment == | ||
+ | |||
+ | Required packages | ||
+ | apt-get install -y mingw32 make g\+\+ libtool bzip2 automake gettext wx-common | ||
− | + | Do works as root | |
− | + | su - | |
− | |||
− | |||
− | |||
− | + | Make working directory | |
− | mkdir | + | mkdir fz3 |
− | + | cd fz3 | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | == Patch mingw32-runtime == | |
− | + | Because the version of mingw32-runtime in Debian 5 is [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452977 broken], patch mingw32-runtime package. | |
− | |||
− | |||
− | + | cd /tmp | |
− | + | apt-get source mingw32-runtime | |
− | + | cd mingw32-runtime-3.13/ | |
+ | debian/rules unpack-stamp | ||
− | + | pushd build_dir/src/mingw-runtime-3.13-20070825-1/mingwex/gdtoa/ | |
− | -- | + | diff -u mingw_snprintf.c.org mingw_snprintf.c |
+ | --- mingw_snprintf.c.org 2009-09-21 02:41:31.000000000 +0000 | ||
+ | +++ mingw_snprintf.c 2009-09-21 02:41:54.000000000 +0000 | ||
+ | @@ -465,7 +465,7 @@ | ||
+ | len = LEN_LL; | ||
+ | } | ||
+ | else | ||
+ | - len = LEN_LL; | ||
+ | + len = LEN_L; | ||
+ | goto fmtloop; | ||
+ | case 'L': | ||
+ | flag_ld++; | ||
+ | @@ -617,6 +617,7 @@ | ||
+ | break; | ||
+ | case LEN_S: | ||
+ | *(short*)ip = c; | ||
+ | + break; | ||
+ | case LEN_LL: | ||
+ | *(long long*) ip = c; | ||
+ | break; | ||
+ | popd | ||
− | + | debian/rules build | |
+ | debian/rules install | ||
− | + | mv /usr/i586-mingw32msvc/lib/libmingwex.a /usr/i586-mingw32msvc/lib/libmingwex.a.old | |
− | + | cp debian/mingw32-runtime/usr/i586-mingw32msvc/liblibmingwex.a /usr/i586-mingw32msvc/lib/ | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | == Make libraries == |
− | + | === iconv === | |
− | wget | + | wget ftp://ftp.gnu.org/gnu/libiconv/libiconv-1.13.tar.gz |
− | tar | + | tar zxvf libiconv-1.13.tar.gz |
− | cd | + | cd libiconv-1.13 |
− | ./configure | + | ./configure --prefix=/usr/i586-mingw32msvc --host=i586-mingw32msvc --disable-shared --enable-static |
− | make | + | make install clean |
− | + | cd .. | |
− | == | + | === libidn === |
+ | wget ftp://alpha.gnu.org/gnu/libidn/libidn-0.6.9.tar.gz | ||
+ | tar zxvf libidn-0.6.9.tar.gz | ||
+ | cd libidn-0.6.9 | ||
+ | ./configure --prefix=/usr/i586-mingw32msvc --host=i586-mingw32msvc --disable-shared --enable-static | ||
+ | make install clean | ||
+ | cd .. | ||
− | + | === libgpg-error === | |
− | wget | + | wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.7.tar.bz2 |
− | tar | + | tar jxvf libgpg-error-1.7.tar.bz2 |
− | cd | + | cd libgpg-error-1.7 |
− | ./configure | + | ./configure --prefix=/usr/i586-mingw32msvc --host=i586-mingw32msvc --disable-shared --enable-static --disable-nls |
− | make | + | make install clean |
− | + | cd .. | |
− | == | + | === libgcrypt === |
+ | wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.4.tar.bz2 | ||
+ | tar jxvf libgcrypt-1.4.4.tar.bz2 | ||
+ | cd libgcrypt-1.4.4 | ||
+ | ./configure --prefix=/usr/i586-mingw32msvc --host=i586-mingw32msvc --disable-shared --enable-static --disable-nls --disable-asm --with-gpg-error-prefix=/usr/i586-mingw32msvc | ||
+ | make install clean | ||
+ | cd .. | ||
− | + | === GnuTLS === | |
− | wget | + | wget ftp://ftp.gnutls.org/pub/gnutls/gnutls-2.8.3.tar.bz2 |
− | tar | + | tar jxvf gnutls-2.8.3.tar.bz2 |
− | cd | + | cd gnutls-2.8.3 |
− | ./configure --host= | + | ./configure --prefix=/usr/i586-mingw32msvc --host=i586-mingw32msvc --disable-shared --enable-static --disable-nls --disable-cxx --with-libgcrypt-prefix=/usr/i586-mingw32msvc |
− | make | + | make install clean |
− | + | cd .. | |
− | == | + | === wxWidgets === |
+ | wget http://downloads.sourceforge.net/wxwindows/wxWidgets-2.8.10.tar.bz2 | ||
+ | tar jxvf wxWidgets-2.8.10.tar.bz2 | ||
+ | cd wxWidgets-2.8.10 | ||
+ | mkdir compile | ||
+ | cd compile | ||
+ | ../configure --prefix=/usr/i586-mingw32msvc --host=i586-mingw32msvc --disable-shared --enable-static --enable-unicode | ||
+ | make install clean | ||
+ | cd ../.. | ||
− | + | == Compiling FileZilla 3 == | |
− | wget | + | wget http://downloads.sourceforge.net/filezilla/FileZilla_3.2.7.1_src.tar.bz2 |
− | + | tar jxvf FileZilla_3.2.7.1_src.tar.bz2 | |
+ | |||
+ | cd filezilla-3.2.7.1 | ||
+ | ./autogen.sh | ||
− | + | mkdir compile | |
− | + | cd compile | |
− | + | cat << EOF > /usr/i586-mingw32msvc/bin/libgnutls-config | |
+ | #!/bin/sh | ||
+ | echo "-L/usr/i586-mingw32msvc/lib -lgnutls -lgcrypt -lgpg-error" | ||
+ | EOF | ||
+ | chmod +x /usr/i586-mingw32msvc/bin/libgnutls-config | ||
− | + | ../configure --prefix=/usr/i586-mingw32msvc --host=i586-mingw32msvc --disable-shared --enable-static --with-wx-prefix=/usr/i586-mingw32msvc --with-libgnutls-prefix=/usr/i586-mingw32msvc | |
− | + | ||
− | |||
− | |||
make | make | ||
− | + | strip src/interface/filezilla.exe | |
− | + | strip src/putty/fzsftp.exe | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |