[XML] Update minimal MSVC version prerequisite

And fix markdown warnings.

Fix #13586, close #13591
This commit is contained in:
ozone10 2023-04-25 07:31:07 +02:00 committed by Don Ho
parent c585a1ab08
commit 5f2e93ee5f
1 changed files with 22 additions and 20 deletions

View File

@ -1,31 +1,33 @@
# Building Notepad++ with Microsoft Visual Studio # Building Notepad++
## Microsoft Visual Studio
**Pre-requisites:** **Pre-requisites:**
- Microsoft Visual Studio 2022 (C/C++ Compiler, v143 toolset for win32, x64, arm64) - Microsoft Visual Studio 2022 version 17.5 (C/C++ Compiler, v143 toolset for win32, x64, arm64)
There are three components which are built from one visual studio solution: There are three components which are built from one visual studio solution:
- `notepad++.exe`: (contains `libSciLexer.lib`) - `notepad++.exe`: (contains `libSciLexer.lib`)
- `libScintilla.lib` : static library based on [Scintilla](https://www.scintilla.org/) - `libScintilla.lib` : static library based on [Scintilla](https://www.scintilla.org/)
- `libLexilla.lib` : static library based on [Lexilla](https://www.scintilla.org/Lexilla.html) - `libLexilla.lib` : static library based on [Lexilla](https://www.scintilla.org/Lexilla.html)
Notepad++ is always built **with** Boost regex PCRE support instead of default c++11 regex ECMAScript used by plain Scintilla. Notepad++ is always built **with** Boost regex PCRE support instead of default c++11 regex ECMAScript used by plain Scintilla.
## Build `notepad++.exe`: ### Build `notepad++.exe`
1. Open [`PowerEditor\visual.net\notepadPlus.sln`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/visual.net/notepadPlus.sln) 1. Open [`PowerEditor\visual.net\notepadPlus.sln`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/visual.net/notepadPlus.sln)
2. Select a solution configuration (Debug or Release) and a solution platform (x64 or Win32 or ARM64) 2. Select a solution configuration (Debug or Release) and a solution platform (x64 or Win32 or ARM64)
3. Build Notepad++ solution like a normal Visual Studio project. This will also build the dependent Scintilla and Lexilla projects. 3. Build Notepad++ solution like a normal Visual Studio project. This will also build the dependent Scintilla and Lexilla projects.
## Build `libScintilla.lib` and `libLexilla.lib`: ### Build `libScintilla.lib` and `libLexilla.lib`
As mentioned above, you'll need `libScintilla.lib` and `libLexilla.lib` for the Notepad++ build. This is done automatically on building the whole solution. So normally you don't need to care about this. As mentioned above, you'll need `libScintilla.lib` and `libLexilla.lib` for the Notepad++ build. This is done automatically on building the whole solution. So normally you don't need to care about this.
### Build `libScintilla.lib` with boost and `libLexilla.lib` via nmake: #### Build `libScintilla.lib` with boost and `libLexilla.lib` via nmake
This is not necessary any more and just here for completeness as this option is still available. This is not necessary any more and just here for completeness as this option is still available.
Boost is taken from [boost 1.78.0](https://www.boost.org/users/history/version_1_78_0.html) and stripped down to the project needs available at [boost](https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/boostregex/boost) in this repo. Boost is taken from [boost 1.80.0](https://www.boost.org/users/history/version_1_80_0.html) and stripped down to the project needs available at [boost](https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/boostregex/boost) in this repo.
1. Open the Developer Command Prompt for Visual Studio 1. Open the Developer Command Prompt for Visual Studio
2. Go into the [`scintilla\win32\`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/win32/) 2. Go into the [`scintilla\win32\`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/win32/)
@ -38,15 +40,15 @@ Boost is taken from [boost 1.78.0](https://www.boost.org/users/history/version_1
5. Build the same configuration as notepad++: 5. Build the same configuration as notepad++:
- Release: `nmake -f lexilla.mak` - Release: `nmake -f lexilla.mak`
- Debug: `nmake DEBUG=1 -f lexilla.mak` - Debug: `nmake DEBUG=1 -f lexilla.mak`
## History: ### History
More about the previous build process: https://community.notepad-plus-plus.org/topic/13959/building-notepad-with-visual-studio-2015-2017
More about the previous build process: <https://community.notepad-plus-plus.org/topic/13959/building-notepad-with-visual-studio-2015-2017>
Since `Notepad++` version 6.0 - 7.9.5, the build of dynamic linked `SciLexer.dll` that is distributed 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. uses features from Boost's `Boost.Regex` library.
# Building Notepad++ with GCC ## GCC
If you have [MinGW-w64](https://www.mingw-w64.org/) installed, you can compile Notepad++ with GCC. Otherwise MinGW-w64 can be downloaded [here](https://sourceforge.net/projects/mingw-w64/files/). You can also download some collection of tools which supports MinGW-w64, like [MSYS2](https://www.msys2.org/) or [WinLibs](https://winlibs.com/). If you have [MinGW-w64](https://www.mingw-w64.org/) installed, you can compile Notepad++ with GCC. Otherwise MinGW-w64 can be downloaded [here](https://sourceforge.net/projects/mingw-w64/files/). You can also download some collection of tools which supports MinGW-w64, like [MSYS2](https://www.msys2.org/) or [WinLibs](https://winlibs.com/).
@ -54,17 +56,17 @@ Building Notepad++ is regularly tested on a Windows system by using [MSYS2](http
**Note:** Before building make sure that the system `PATH` environment variable contains `$MinGW-root$\bin` directory. Otherwise you have to set this directory yourself in Windows settings. You can also 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. **Note:** Before building make sure that the system `PATH` environment variable contains `$MinGW-root$\bin` directory. Otherwise you have to set this directory yourself in Windows settings. You can also 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.
## Compiling Notepad++ binary ### Compiling Notepad++ binary
1. Launch `cmd` and add `$MinGW-root$\bin` to `PATH` if necessary. 1. Launch `cmd` and add `$MinGW-root$\bin` to `PATH` if necessary.
2. `cd` into `notepad-plus-plus\PowerEditor\gcc`. 2. `cd` into `notepad-plus-plus\PowerEditor\gcc`.
3. Run `mingw32-make`. 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. 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.
### Some additional information: #### Some additional information
* The directory containing `notepad++.exe` will also contain everything needed for Notepad++ to start. - 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 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. - To see commands being executed add `VERBOSE=1` to the same command.
* When a project is built outside of the `PowerEditor/gcc` directory, for example when using `-f` option, then the entire project path must not contain any spaces. Additionally, the path to `makefile` of this project should be listed as first. - When a project is built outside of the `PowerEditor/gcc` directory, for example when using `-f` option, then the entire project path must not contain any spaces. Additionally, the path to `makefile` of this project should be listed as first.
* When a project is built through MinGW-w64 with multilib support, a specific target can be forced by passing `TARGET_CPU` variable with `x86_64` or `i686` as value. - When a project is built through MinGW-w64 with multilib support, a specific target can be forced by passing `TARGET_CPU` variable with `x86_64` or `i686` as value.