editorconfig / editorconfig-notepad-plus-plus

EditorConfig plugin for Notepad++
http://editorconfig.org
GNU General Public License v2.0
192 stars 30 forks source link

update editorconfig to 0.12.5 #38

Closed chcg closed 2 years ago

chcg commented 3 years ago
ffes commented 2 years ago

I finally took some time to look at it, sorry for the delay.

I only have VS2022 Community Edition to test. Building works for x86, but not for x64.

This is the error I get when I build for x64 (Note that I ran init.ps1 successfully prior to this in another run):

**********************************************************************
** Visual Studio 2022 Developer PowerShell v17.3.6
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
PS C:\Source> cd .\EditorConfig\npp\
PS C:\Source\EditorConfig\npp> ./build.ps1 -proj all -init -install -vsver 17 -arch x64
CMake Error: Could not create named generator Visual Studio 17 2022 Win64

Generators
* Visual Studio 17 2022        = Generates Visual Studio 2022 project files.
                                 Use -A option to specify architecture.
  Visual Studio 16 2019        = Generates Visual Studio 2019 project files.
                                 Use -A option to specify architecture.
  Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 10 2010 [arch] = Deprecated.  Generates Visual Studio 2010
                                 project files.  Optional [arch] can be
                                 "Win64" or "IA64".
[ snip a lot of other generators ]

And when I test the x86 build result it is an invalid dll.

image

When I go through the generated build output, it looks like x86 and x64 are mixed up. There is a directory C:\Source\EditorConfig\npp\bin\x86\npp\x64 on my system. Copying the x86 generated .dll to the x64 version of N++ doesn't work either, although I didn't expect that to work.

chcg commented 2 years ago

Newer generator need to add the architecture differently. Via an additional switch: Use -A option to specify architecture.

I updated the PR therefore and for arm64 and used VS2022 appveyor image to build.

ffes commented 2 years ago

Thanks for the updated PR. I've tested it and it works fine for me.