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 5: | Line 5: | ||
Any recent Linux should do the trick. For the sake of simplicity, this guide focuses on Debian(-based) distributions. | Any recent Linux should do the trick. For the sake of simplicity, this guide focuses on Debian(-based) distributions. | ||
− | We | + | We stronly recommend to use [http://debian.org Debian '''9''' (Stretch)] or later ('''recommended''') |
== Setting up the build environment == | == Setting up the build environment == | ||
Line 12: | Line 12: | ||
dpkg --add-architecture i386 | dpkg --add-architecture i386 | ||
apt update | apt update | ||
− | apt install automake autoconf libtool make gettext lzip | + | apt install automake autoconf libtool make gettext lzip |
− | apt install mingw-w64 pkg-config wx-common wine | + | apt install mingw-w64 pkg-config wx-common wine wine32 subversion git |
Back as normal user, execute: | Back as normal user, execute: | ||
Line 22: | Line 22: | ||
export LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH" | export LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH" | ||
export PKG_CONFIG_PATH="$HOME/prefix/lib/pkgconfig:$PKG_CONFIG_PATH" | export PKG_CONFIG_PATH="$HOME/prefix/lib/pkgconfig:$PKG_CONFIG_PATH" | ||
− | |||
− | |||
<!-- | <!-- | ||
Line 40: | Line 38: | ||
cd ~/src | cd ~/src | ||
− | wget https://gmplib.org/download/gmp/gmp-6. | + | wget https://gmplib.org/download/gmp/gmp-6.1.2.tar.lz |
− | tar xf gmp-6. | + | tar xf gmp-6.1.2.tar.lz |
− | cd gmp-6. | + | cd gmp-6.1.2 |
− | + | ./configure --host=x86_64-w64-mingw32 --prefix="$HOME/prefix" --disable-static --enable-fat | |
make | make | ||
make install | make install | ||
Line 50: | Line 48: | ||
cd ~/src | cd ~/src | ||
− | wget https://ftp.gnu.org/gnu/nettle/nettle-3. | + | wget https://ftp.gnu.org/gnu/nettle/nettle-3.4.tar.gz |
− | tar xf nettle-3. | + | tar xf nettle-3.4.tar.gz |
− | cd nettle-3. | + | cd nettle-3.4 |
− | ./configure --host= | + | ./configure --host=x86_64-w64-mingw32 --prefix="$HOME/prefix' --enable-shared --disable-static --enable-fat LDFLAGS="-L$HOME/prefix/lib" CPPFLAGS="-I$HOME/prefix/include" |
make | make | ||
make install | make install | ||
Line 60: | Line 58: | ||
cd ~/src | cd ~/src | ||
− | wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3. | + | wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5/gnutls-3.5.19.tar.xz |
− | tar xvf gnutls-3. | + | tar xvf gnutls-3.5.19.tar.xz |
− | cd gnutls-3. | + | cd gnutls-3.5.19 |
− | ./configure --host= | + | ./configure --host=x86_64-w64-mingw32 --prefix="$HOME/prefix" --enable-shared --disable-static --with-included-libtasn1 --without-p11-kit --disable-doc --enable-local-libopts --with-included-unistring GMP_LIBS="-L$HOME/prefix/lib -lgmp" GMP_CFLAGS="-I$HOME/prefix/include" |
make | make | ||
make install | make install | ||
− | + | ||
== Compile SQLite == | == Compile SQLite == | ||
cd ~/src | cd ~/src | ||
− | wget https://sqlite.org/2018/sqlite-autoconf- | + | wget https://sqlite.org/2018/sqlite-autoconf-3250300.tar.gz |
− | tar xvzf sqlite-autoconf- | + | tar xvzf sqlite-autoconf-3250300.tar.gz |
− | cd sqlite-autoconf- | + | cd sqlite-autoconf-3250300 |
− | ./configure --host= | + | ./configure --host=x86_64-w64-mingw32 --prefix="$HOME/prefix" --enable-shared --disable-static --disable-dynamic-extensions |
make | make | ||
make install | make install | ||
Line 80: | Line 78: | ||
cd ~/src | cd ~/src | ||
− | wget https://prdownloads.sourceforge.net/nsis/nsis-3. | + | wget https://prdownloads.sourceforge.net/nsis/nsis-3.03-setup.exe |
− | wine nsis-3. | + | wine nsis-3.03-setup.exe /S |
The above may print a lot of errors and warnings. Ignore them, check for success this way: | The above may print a lot of errors and warnings. Ignore them, check for success this way: | ||
Line 91: | Line 89: | ||
git clone --branch WX_3_0_BRANCH --single-branch https://github.com/wxWidgets/wxWidgets.git wx3 | git clone --branch WX_3_0_BRANCH --single-branch https://github.com/wxWidgets/wxWidgets.git wx3 | ||
cd wx3 | cd wx3 | ||
− | ./configure --host= | + | ./configure --host=x86_64-w64-mingw32 --prefix="$HOME/prefix" --enable-shared --disable-static |
make | make | ||
make install | make install | ||
− | |||
== Compile libfilezilla == | == Compile libfilezilla == | ||
cd ~/src | cd ~/src | ||
− | svn co https://svn.filezilla-project.org/svn/libfilezilla/tags/0. | + | svn co https://svn.filezilla-project.org/svn/libfilezilla/tags/0.15.1 lfz |
cd lfz | cd lfz | ||
autoreconf -i | autoreconf -i | ||
− | ./configure --host= | + | ./configure --host=x86_64-w64-mingw32 --prefix="$HOME/prefix" --enable-shared --disable-static |
make | make | ||
make install | make install | ||
+ | cp $HOME/prefix/lib/wx*.dll $HOME/prefix/bin | ||
== Compile Boost Regex == | == Compile Boost Regex == | ||
Line 119: | Line 117: | ||
cd ~/src | cd ~/src | ||
− | svn co https://svn.filezilla-project.org/svn/ | + | svn co https://svn.filezilla-project.org/svn/libfilezilla/tags/3.39.0 fz |
cd fz | cd fz | ||
− | + | ./configure --host=x86_64-w64-mingw32 --prefix="$HOME/prefix" --enable-shared --disable-static --with-pugixml=builtin | |
− | ./configure --host= | ||
make | make | ||
# strip debug symbols | # strip debug symbols | ||
− | + | x86_64-w64-mingw32-strip src/interface/.libs/filezilla.exe | |
− | + | x86_64-w64-mingw32-strip src/putty/.libs/fzsftp.exe | |
− | + | x86_64-w64-mingw32-strip src/putty/.libs/fzputtygen.exe | |
− | + | x86_64-w64-mingw32-strip src/fzshellext/64/.libs/libfzshellext-0.dll | |
− | + | x86_64-w64-mingw32-strip src/fzshellext/32/.libs/libfzshellext-0.dll | |
− | + | x86_64-w64-mingw32-strip data/dlls/*.dll | |
cd data | cd data | ||
wine "$HOME/.wine/drive_c/Program Files/NSIS/makensis.exe" install.nsi | wine "$HOME/.wine/drive_c/Program Files/NSIS/makensis.exe" install.nsi | ||
Voila, there's now FileZilla_3_setup.exe in the current directory. | Voila, there's now FileZilla_3_setup.exe in the current directory. |