Skip to content

Commit

Permalink
added arm64 build (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
chcg committed Apr 18, 2021
1 parent d4121bd commit 5209b44
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -8,6 +8,7 @@ To review the current list of plugins and their features see the generated list

* [32-Bit Plugin List](doc/plugin_list_x86.md)
* [64-Bit Plugin List](doc/plugin_list_x64.md)
* [64-Bit ARM Plugin List](doc/plugin_list_arm64.md)

Here is all the information you need to perform local tests:
https://npp-user-manual.org/docs/plugins/#plugins-admin
Expand Down
38 changes: 31 additions & 7 deletions appveyor.yml
Expand Up @@ -4,20 +4,28 @@ image: Visual Studio 2017

environment:
matrix:
- PlatformToolset: v141_xp
- PlatformToolset: v141
PLATFORM: ARM64
PYTHONTEST: arm64
PYTHON: "C:\\Python38"

- PlatformToolset: v141
PLATFORM: x64
PYTHONTEST: x64
PYTHON: "C:\\Python38"

- PlatformToolset: v141_xp
- PlatformToolset: v141
PLATFORM: Win32
PYTHONTEST: Win32
PYTHON: "C:\\Python38"

- PlatformToolset: v141_xp
- PlatformToolset: v141
PLATFORM: ARM64

- PlatformToolset: v141
PLATFORM: x64

- PlatformToolset: v141_xp
- PlatformToolset: v141
PLATFORM: Win32

configuration:
Expand All @@ -34,8 +42,12 @@ install:
- if "%platform%"=="Win32" set archi=x86
- if "%platform%"=="Win32" set platform_input=Win32

- if "%PlatformToolset%"=="v141_xp" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
- if "%PlatformToolset%"=="v140_xp" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %archi%
- if "%platform%"=="ARM64" set archi=amd64_arm64
- if "%platform%"=="ARM64" set platform_input=ARM64


- if "%PlatformToolset%"=="v141" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%


build_script:
- cd "%APPVEYOR_BUILD_FOLDER%"
Expand All @@ -53,11 +65,15 @@ after_build:
Push-AppveyorArtifact "bin64\nppPluginList.dll" -FileName nppPluginList.dll
}
if ($env:PLATFORM_INPUT -eq "ARM64" -and $env:CONFIGURATION -eq "Release") {
Push-AppveyorArtifact "bin64\nppPluginList.dll" -FileName nppPluginList.dll
}
if ($env:PLATFORM_INPUT -eq "Win32" -and $env:CONFIGURATION -eq "Release") {
Push-AppveyorArtifact "bin\nppPluginList.dll" -FileName nppPluginList.dll
}
if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release" -and $env:PLATFORMTOOLSET -eq "v141_xp") {
if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release" -and $env:PLATFORMTOOLSET -eq "v141") {
if($env:PLATFORM_INPUT -eq "x64"){
$ZipFileName = "nppPluginList_$($env:APPVEYOR_REPO_TAG_NAME)_x64.zip"
7z a $ZipFileName bin64\*.dll
Expand All @@ -66,6 +82,10 @@ after_build:
$ZipFileName = "nppPluginList_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
7z a $ZipFileName bin\*.dll
}
if($env:PLATFORM_INPUT -eq "ARM64"){
$ZipFileName = "nppPluginList_$($env:APPVEYOR_REPO_TAG_NAME)_arm64.zip"
7z a $ZipFileName bin\*.dll
}
}
}
else
Expand All @@ -77,4 +97,8 @@ after_build:
if ($env:PLATFORM_INPUT -eq "Win32") {
Push-AppveyorArtifact "plugin_list_x86.md" -FileName plugin_list_x86.md
}
if ($env:PLATFORM_INPUT -eq "ARM64") {
Push-AppveyorArtifact "plugin_list_arm64.md" -FileName plugin_list_arm64.md
}
}
5 changes: 5 additions & 0 deletions doc/plugin_list_arm64.md
@@ -0,0 +1,5 @@
## Plugin List - arm64 bit
version 1.0.2
|Plugin name | Author | Homepage | Version and link | Description |
|---|---|---|---|---|
| NppExport | | https://github.com/chcg/NPP_ExportPlugin | [0.3.0.0 - arm64 bit](https://github.com/chcg/NPP_ExportPlugin/releases/download/0.3.0/NppExport_0.3.0_arm64.zip) | <details> <summary> True WYSIWYG exporter. Allows you not only to save your source code as an HTML/RTF file, but also </summary> to copy your source code in the clipboard in RTF/HTML format, so you can paste it into your word processor (Openoffice.org Writer, LibreOffice Writer, Abiword, MS Word) to get the same visual effect. </details> |
2 changes: 1 addition & 1 deletion pl.schema
Expand Up @@ -12,7 +12,7 @@
"type": "string",
"pattern": "^\\d+(\\.\\d+){,3}$"
},
"arch": { "enum": ["32", "64"] },
"arch": { "enum": ["32", "64", "arm64"] },
"npp-plugins": {
"type": "array",
"items": { "$ref": "#/definitions/plugin" }
Expand Down
17 changes: 17 additions & 0 deletions src/pl.arm64.json
@@ -0,0 +1,17 @@
{
"name": "npp-pluginList",
"version": "1.0.2",
"arch": "arm64",
"npp-plugins": [
{
"folder-name": "NppExport",
"display-name": "NppExport",
"version": "0.3.0.0",
"id": "4234ebce2a882dd886135ce06e63f39a885835bb765d9f9a8a1128cafb4559a4",
"repository": "https://github.com/chcg/NPP_ExportPlugin/releases/download/0.3.0/NppExport_0.3.0_arm64.zip",
"description": "True WYSIWYG exporter. Allows you not only to save your source code as an HTML/RTF file, but also to copy your source code in the clipboard in RTF/HTML format, so you can paste it into your word processor (Openoffice.org Writer, LibreOffice Writer, Abiword, MS Word) to get the same visual effect.",
"author": "",
"homepage": "https://github.com/chcg/NPP_ExportPlugin"
}
]
}
6 changes: 5 additions & 1 deletion validator.py
Expand Up @@ -205,13 +205,17 @@ def parse(filename):
if len(sys.argv) > 1:
bitness_from_input = sys.argv[1]
else:
print('please provide the bitness (x86 or x64) as the first argument')
print('please provide the bitness (x86 or x64 or arm64) as the first argument')
sys.exit(-2)
print('input: %s' % bitness_from_input)
if bitness_from_input == 'x64':
parse("src/pl.x64.json")
with open("plugin_list_x64.md", "w") as md_file:
md_file.write(gen_pl_table("src/pl.x64.json"))
elif bitness_from_input == 'arm64':
parse("src/pl.arm64.json")
with open("plugin_list_arm64.md", "w") as md_file:
md_file.write(gen_pl_table("src/pl.arm64.json"))
else:
parse("src/pl.x86.json")
with open("plugin_list_x86.md", "w") as md_file:
Expand Down
81 changes: 81 additions & 0 deletions vcxproj/nppPluginList.vcxproj
@@ -1,10 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
Expand Down Expand Up @@ -57,13 +65,26 @@
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
Expand All @@ -78,16 +99,25 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\bin\</OutDir>
Expand All @@ -96,6 +126,10 @@
<LinkIncremental>false</LinkIncremental>
<OutDir>..\bin64\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\bin64\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
Expand Down Expand Up @@ -138,6 +172,27 @@
<PreprocessorDefinitions>_WIN64;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;NPPPLUGINLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ResourceCompile>
<UndefinePreprocessorDefinitions>
</UndefinePreprocessorDefinitions>
<PreprocessorDefinitions>_WIN64;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
Expand Down Expand Up @@ -191,6 +246,32 @@
<PreprocessorDefinitions>_WIN64;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;NPPPLUGINLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
</Link>
<ResourceCompile>
<UndefinePreprocessorDefinitions>
</UndefinePreprocessorDefinitions>
<PreprocessorDefinitions>_WIN64;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down

2 comments on commit 5209b44

@donho
Copy link
Member

@donho donho commented on 5209b44 Apr 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chcg
On my dev machine, I've got the following error:

1>------ Rebuild All started: Project: nppPluginList, Configuration: Release ARM64 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for v140_xp (Platform Toolset = 'v140_xp') cannot be found. To build using the v140_xp build tools, please install v140_xp build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
1>Done building project "nppPluginList.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Obviously, v140_xp is not installed on my dev PC, but here I wonder if we can use v141 instead of v140_xp, since xp has been dropped?

@chcg
Copy link
Contributor Author

@chcg chcg commented on 5209b44 Apr 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@donho 140_xp doesn't make sense any more, should have been 141_xp anyhow but as WinXP support was dropped for N++ it is not needed here also and for the appveyor build this is overwritten so I didn't spot it that vsproj is not updated yet. Thanks for correcting this.

Please sign in to comment.