Latest revision |
Your text |
Line 10: |
Line 10: |
| | | |
| =Installing the MSYS2 environment= | | =Installing the MSYS2 environment= |
− |
| |
− | Download the 64bit MSYS2 installer and install it in a convenient location: [https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20220118.exe msys2-x86_64-20220118.exe]
| |
| | | |
| =Installing the compiler toolchain= | | =Installing the compiler toolchain= |
− |
| |
− | FileZilla's shell extension needs to be build both for 32bit as well as 64bit, hence we're going to need compilers for both 32bit and 64bit.
| |
− |
| |
− | == Tools and compiler ==
| |
− |
| |
− | ===First update===
| |
− | Start the MSYS2 MinGW 64-bit shell
| |
− | pacman -Syu
| |
− | close MSYS2 shell. Repeat until there are no more updates.
| |
− |
| |
− | ===Install tools and compiler toolchain===
| |
− |
| |
− | Start MSYS2 MinGW 64-bit shell, execute the following command to install the necessary packages:
| |
− |
| |
− | pacman -S autoconf automake libtool make mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain git svn
| |
− |
| |
− | Execute the following to work around some most-annoying bugs in the toolchain
| |
− |
| |
− | # Fix missing platform prefix for windres
| |
− | [ -f /mingw64/bin/x86_64-w64-mingw32-windres.exe ] || ln -s /mingw64/bin/windres.exe /mingw64/bin/x86_64-w64-mingw32-windres.exe
| |
− | [ -f /mingw32/bin/i686-w64-mingw32-windres.exe ] || ln -s /mingw32/bin/windres.exe /mingw32/bin/i686-w64-mingw32-windres.exe
| |
− |
| |
− | == Setting up the environment==
| |
− |
| |
− | Execute the following commands:
| |
− | mkdir ~/prefix
| |
− | echo 'export PATH="$HOME/prefix/bin:$HOME/prefix/lib:/mingw64/bin:/mingw32/bin:$PATH"' >> ~/.profile
| |
− | echo 'export PKG_CONFIG_PATH="$HOME/prefix/lib/pkgconfig"' >> ~/.profile
| |
− | echo 'export PATH="$HOME/prefix/bin:$HOME/prefix/lib:/mingw64/bin:/mingw32/bin:$PATH"' >> ~/.bash_profile
| |
− | echo 'export PKG_CONFIG_PATH="$HOME/prefix/lib/pkgconfig"' >> ~/.bash_profile
| |
− | echo 'export LC_ALL=C' >> ~/.bash_profile
| |
− |
| |
− | Restart the MSYS2 MINGW64 shell.
| |
| | | |
| =Building dependencies= | | =Building dependencies= |
− |
| |
− | ==Building GMP==
| |
− |
| |
− | cd ~
| |
− | curl -O https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz
| |
− | tar xf gmp-6.2.1.tar.xz
| |
− | cd gmp-6.2.1
| |
− | ./configure --build=x86_64-w64-mingw32 --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat
| |
− | make && make install
| |
− |
| |
− | ==Building Nettle==
| |
− |
| |
− | cd ~
| |
− | wget https://ftp.gnu.org/gnu/nettle/nettle-3.7.3.tar.gz
| |
− | tar xf nettle-3.7.3.tar.gz
| |
− | cd nettle-3.7.3
| |
− | ./configure --build=x86_64-w64-mingw32 --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat
| |
− | make && make install
| |
− |
| |
− | ==Building zlib==
| |
− |
| |
− | cd ~
| |
− | wget https://zlib.net/fossils/zlib-1.2.13.tar.gz
| |
− | tar xf zlib-1.2.13.tar.gz
| |
− | cd zlib-1.2.13
| |
− | LDSHAREDLIBC='' ./configure --prefix="$HOME/prefix" -u=GNU
| |
− | make && make install
| |
− |
| |
− | ==Building GnuTLS==
| |
− |
| |
− | cd ~
| |
− | wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.7/gnutls-3.7.2.tar.xz
| |
− | tar xf gnutls-3.7.2.tar.xz
| |
− | cd gnutls-3.7.2
| |
− | ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --build=x86_64-w64-mingw32 --with-included-libtasn1 --disable-doc --disable-guile --without-p11-kit --enable-local-libopts --disable-nls --with-included-unistring --disable-tests
| |
− | make && make install
| |
− |
| |
− | ==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= | | =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 = | | = 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.
| |