@ -41,33 +40,22 @@ More about the previous build process: https://community.notepad-plus-plus.org/t
Since `Notepad++` version 6.0 - 7.9.5, the build of dynamic linked `SciLexer.dll` that is distributed
uses features from Boost's `Boost.Regex` library.
## Build 64 bits binaries with GCC:
# Building Notepad++ with GCC
If you have installed [MinGW-w64](https://mingw-w64.org/doku.php/start), then you can compile Notepad++ & libscilexer.a 64 bits binaries with GCC.
If you have [MinGW-w64](https://www.mingw-w64.org/) installed, you can compile Notepad++ with GCC.
* Compile libscilexer.a
MinGW-w64 can be downloaded from [SourceForge](https://sourceforge.net/projects/mingw-w64/files/). Building Notepad++ is regularly tested on a Windows system with [x86_64-8.1.0-release-posix-seh-rt_v6-rev0](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z) and with [i686-8.1.0-release-posix-dwarf-rt_v6-rev0](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z) versions of MinGW-w64 GCC. Other versions may also work but are untested.
This step is not necessary anymore as it will be build in the process of compiling the Notepad++ binary. It is here just for completeness sake as this option is still available.
**Note:** If you use MinGW-w64 GCC from a package (7z), you need to manually add the `$MinGW-root$\bin` directory to the system `PATH` environment variable for the `mingw32-make` invocation below to work. One can use a command like `set PATH=$MinGW-root$\bin;%PATH%` each time `cmd` is launched. But beware that if `PATH` contains several versions of MinGW-w64 GCC, only the first one will be usable.
1. Launch cmd.
2. Change dir into `notepad-plus-plus\scintilla\win32`.
3. Type `mingw32-make.exe -j%NUMBER_OF_PROCESSORS%`
4. `libscilexer.a` is generated in `notepad-plus-plus\scintilla\bin\`.
## Comping Notepad++ binary
* Compile Notepad++ binary
1. Launch `cmd` and add `$MinGW-root$\bin` to `PATH` if necessary.
2. `cd` into `notepad-plus-plus\PowerEditor\gcc`.
3. Run `mingw32-make`.
4. The 32-bit or 64-bit `notepad++.exe` will be generated either in `bin.i686` or in `bin.x86_64` directory respectively, depending on the target CPU of the compiler — look for the full path to the resulting binary at the end of the build process.
1. Launch cmd.
2. Change dir into `notepad-plus-plus\PowerEditor\gcc`.
3. Type `mingw32-make.exe -j%NUMBER_OF_PROCESSORS%`
4. `NotepadPP-release.exe` is generated in `notepad-plus-plus\PowerEditor\bin\`.
To have a debug build just add `DEBUG=1` to the `mingw32-make.exe` invocation. The binary will be called `NotepadPP-debug.exe` in this case.
To see commands being executed add `VERBOSE=1` to the same command.
You can download MinGW-w64 from https://sourceforge.net/projects/mingw-w64/files/. On Notepad++ Github page (this project), the build system use [MinGW 8.1](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z).
Note 1: if you use MinGW from the package (7z), you need manually add the MinGW/bin folder path to system Path variable to make mingw32-make.exe invoke works (or you can use command :`set PATH=%PATH%;C:\xxxx\mingw64\bin` for adding it on each time you launch cmd).
Note 2: For 32-bit build, https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/sjlj/i686-8.1.0-release-posix-sjlj-rt_v6-rev0.7z could be used. The rest of the instructions are still valid.
* The directory containing `notepad++.exe` will also contain everything needed for Notepad++ to start.
* To have a debug build just add `DEBUG=1` to the `mingw32-make` invocation above. The output directory then will be suffixed with `-debug`.
* To see commands being executed add `VERBOSE=1` to the same command.
* When switching between compilers or between release/debug modes, `mingw32-make clean` must be executed first.
- if "%Platform%"=="mingw-w64_810_X64" cd c:\projects\notepad-plus-plus\PowerEditor\gcc\ & mingw32-make -j%NUMBER_OF_PROCESSORS% VERBOSE=1 %build_options%
after_build:
- cd "%APPVEYOR_BUILD_FOLDER%"
#xml files syntax checks
- if "%platform_input%"=="Win32" if "%configuration%"=="Debug" SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- if "%platform_input%"=="Win32" if "%configuration%"=="Debug" python -m pip install requests rfc3987 pywin32 lxml
- if "%platform_input%"=="Win32" if "%configuration%"=="Debug" call python PowerEditor\Test\xmlValidator\validator_xml.py