Compiling FileZilla 3 under Windows
This documentation explains how to setup a build environment for FileZilla 3 and how to compile it under Windows using msys2. Msys2 is a cygwin environment. These instructions require you to run a 64bit Windows.
It will take some time to get everything working, but you will be able to use the build environment for other programs too.
For complete MSYS2 system and all needed dependencies installed, you will need 7GiB free space on your disk.
Note to wiki contributors: Do not change version numbers on your own. The build process is somewhat fragile and does break if you change things
Installing the MSYS2 environment
Download the 64bit MSYS2 installer and install it in a convenient location: msys2-x86_64-20220118.exe
Installing the compiler toolchain
Tools and compiler
First update
Install tools and compiler toolchain
Setting up the environment
Building dependencies
Building GMP
Building Nettle
Building zlib
Building GnuTLS
Building SQLite
cd ~ wget https://sqlite.org/2018/sqlite-autoconf-3250300.tar.gz tar xf sqlite-autoconf-3250300.tar.gz cd sqlite-autoconf-3250300 ./configure --build=x86_64-w64-mingw32 --prefix="$HOME/prefix" --enable-shared --disable-static make && make install
Building wxWidgets
cd ~ git clone --branch WX_3_0_BRANCH --single-branch https://github.com/wxWidgets/wxWidgets.git wx3 cd wx3 ./configure --build=x86_64-w64-mingw32 --prefix="$HOME/prefix" --enable-shared --disable-static --enable-unicode --enable-printfposparam --without-libtiff --without-libjpeg --with-expat=builtin --with-libpng=builtin make && make install
Building libfilezilla
cd ~ svn co https://svn.filezilla-project.org/svn/libfilezilla/trunk libfilezilla cd libfilezilla autoreconf -i ./configure --prefix="$HOME/prefix" --enable-shared --disable-static make && make install
Building Filezilla
Download FileZilla
cd ~ svn co https://svn.filezilla-project.org/svn/FileZilla3/trunk filezilla
Building FileZilla
cd ~/filezilla autoreconf -i ./configure --with-pugixml=builtin make
Stripping debug symbols
strip src/interface/.libs/filezilla.exe strip src/putty/.libs/fzsftp.exe strip src/putty/.libs/fzputtygen.exe strip src/fzshellext/64/.libs/libfzshellext-0.dll strip src/fzshellext/32/.libs/libfzshellext-0.dll strip data/dlls/*.dll
Building the installer
Installing NSIS
Download and install NSIS 3 from http://nsis.sourceforge.net/
Compile the installer script
Right click data/install.nsi in Explorer and use "Compile NSIS Script" from context menu.
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.