Skip to content

Latest commit

 

History

History
59 lines (48 loc) · 4.12 KB

BUILDING.md

File metadata and controls

59 lines (48 loc) · 4.12 KB

Currently, NppFTP can be built with MinGW-w64 or MS Visual Studio C++ compiler for windows. Dependent libraries i.e. zlib, OpenSSL and libssh get automatically downloaded as a part of the build process, and hence require a working internet connection. The currently used version could be checked seen in build_3rdparty.py . tinyxml is contained in a modified version based on 2.6.2 .

General prerequisites

  • perl (PERL 5.10 or higher, needed for OpenSSL, see Compilation_and_Installation )
  • python (Version 3.0 or higher, needed for libssh and NppFTP script build_3rdparty.py )
  • MS Visual Studio 2019 or newer for Windows builds
  • MinGW-w64 for Linux or Windows builds

Helpful hints could also be found in the configuration files for the CI builds:

MinGW-w64 Makefile (Makefile.mingw)

Cross-compiling from Linux has been tested with Debian/Ubuntu (see Github CI builds ) and Fedora. You will need to install the following packages:

  • Common: python3 perl cmake zip
  • Debian/Ubuntu: mingw-w64
  • Fedora 32-bit target: mingw32-gcc-c++ mingw32-winpthreads-static
  • Fedora 64-bit target: mingw64-gcc-c++ mingw64-winpthreads-static

Then, run make -f Makefile.mingw BITS=32 to compile and produce the 32-bit plugin. Alternatively, run make -f Makefile.mingw BITS=64 to produce the 64-bit plugin. If no value is specified for BITS, a 32-bit target is assumed.

CMake build

You will need to install:

Prepare build and build:

  • command line:
    • create a build directory, e.g. _build beside the source code
    • change to the new directory
    • call cmake -G "$generator" .. with generator value MinGW makefiles or Unix makefiles for MinGW-w64 or Visual Studio 17 2022
    • call cmake -G "$generator" -A x64 -T "v143" .. with generator value Visual Studio 17 2022 and optional architucture x64 and toolchain v143
    • call cmake --build . --config Release to build the software
  • with cmake-gui on windows by selection of:
    • build directory
    • the local NppFTP source directory
    • an appropriate generator (for MinGW-w64 choose MinGW makefiles or Visual Studio 17 2022 with the needed architecture and toolchain option)
    • press button "Configure"
    • press button "Generate"
    • press button "Open Project"
    • build the project

CI builds