From f4419f2be910e8fc4dcd8148406ea40fb3550aeb Mon Sep 17 00:00:00 2001 From: Arkadiusz Michalski Date: Wed, 2 Nov 2022 13:09:11 +0100 Subject: [PATCH] Fix CI 32 build failure in GCC And update appveyor.yml and BUILD.md to reflect the migration to MSYS2 Fix #12447, close #12450, close #12481 --- BUILD.md | 6 +++--- appveyor.yml | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/BUILD.md b/BUILD.md index 95e401607..3dbab6d66 100644 --- a/BUILD.md +++ b/BUILD.md @@ -48,11 +48,11 @@ uses features from Boost's `Boost.Regex` library. # Building Notepad++ with GCC -If you have [MinGW-w64](https://www.mingw-w64.org/) installed, you can compile Notepad++ with 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/). -MinGW-w64 can be downloaded [here](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) for building 64-bits binary 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 for building 32-bits binary. Other versions may also work but are untested. +Building Notepad++ is regularly tested on a Windows system by using [MSYS2](https://www.msys2.org/) project. Current versions of tools used to building (such as GCC, Make or Bash) can be checked by looking at some logos from the finished building (for example in the [current-build page](https://ci.appveyor.com/project/donho/notepad-plus-plus)). Other versions may also work but are untested. -**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. +**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 diff --git a/appveyor.yml b/appveyor.yml index 695e5eb72..442fe2bbf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,9 +29,11 @@ configuration: before_build: - ps: | + Write-Output "Build parameters:" Write-Output "Compiler : $env:compiler" Write-Output "Platform : $env:platform" Write-Output "Configuration : $env:configuration" + Write-Output "" for: - matrix: @@ -93,19 +95,23 @@ for: only: - compiler: GCC install: - - set PATH=C:\msys64\usr\bin - - if "%platform%" EQU "i686" set $env:MSYSTEM = 'MINGW32' - - if "%platform%" EQU "x86_64" set $env:MSYSTEM = 'MINGW64' + - set PATH=C:\msys64\usr\bin;%PATH% + - if "%platform%" EQU "i686" set MSYSTEM=MINGW32 && set PATH=C:\msys64\mingw32\bin;%PATH% + - if "%platform%" EQU "x86_64" set MSYSTEM=MINGW64 && set PATH=C:\msys64\mingw64\bin;%PATH% - if "%configuration%" EQU "Debug" set DEBUG=1 # uncomment lines below to update packages to use latest gcc #- bash -lc "pacman --noconfirm -Syuu" #- bash -lc "pacman --noconfirm -Syuu" #- if "%platform%" EQU "i686" bash -lc "pacman --noconfirm -S mingw-w64-i686-gcc mingw-w64-i686-make" #- if "%platform%" EQU "x86_64" bash -lc "pacman --noconfirm -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make" - - if "%platform%" EQU "i686" set PATH=C:\msys64\mingw32\bin;%PATH:C:\Program Files\Git\usr\bin;=% - - if "%platform%" EQU "x86_64" set PATH=C:\msys64\mingw64\bin;%PATH:C:\Program Files\Git\usr\bin;=% + - ps: | + Write-Output "Tools version:" + Write-Output (((gcc --version) | select-object -first 1) + " " + (gcc -dumpmachine)) + Write-Output (mingw32-make --version) | select-object -first 1 + Write-Output (sh --version) | select-object -first 1 + Write-Output "" build_script: - - mingw32-make -f PowerEditor\gcc\makefile + - make -f PowerEditor\gcc\makefile after_build: # artifacts - ps: |