Repository navigation
Build the plugin for 32-bit and ARM64 Notepad++ - #6
Merged
Merged
Conversation
Notepad++ only loads plugins built for its own architecture, so 32-bit and ARM64 users can't use the x64 DLL. - LLMAssistant.vcxproj: add Win32 and ARM64 Debug/Release configurations. Settings now depend only on the configuration, and every platform builds to <Platform>\<Configuration>\ (Win32\Release\LLMAssistant.dll). - build.bat: take an optional platform (x64 default, x86/Win32, arm64) and look for the ARM64 build tools component when building for ARM64. deploy.bat asks for x64 explicitly. - make-release-zip.ps1: add -Platform. Before packaging, check the DLL's machine type, version resource and Notepad++ exports, then name the zip _x64, _x86 or _arm64 and print the entry for pl.<platform>.json. - CI: build x64, Win32 and ARM64, also run the tests as 32-bit, package three zips with make-release-zip.ps1, and attach all three to the release on a v* tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The windows-2025-vs2026 runner has v143 (MSVC 14.44) for x64 and x86 only, so msbuild failed with MSB8020 for ARM64. Build ARM64 with the project's own v145 toolset and keep v143 for x64 and Win32. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notepad++ only loads plugins built for its own architecture. Today the project, CI and release are x64 only, so 32-bit and ARM64 users can't install LLM Assistant from Plugins Admin. This PR builds and packages the plugin for all three architectures. It doesn't release anything yet.
Changes
LLMAssistant.vcxproj: addsDebug|Win32,Release|Win32,Debug|ARM64andRelease|ARM64. The property groups are now conditioned on the configuration only, so every platform gets the same settings and nothing has to be copied six times. Output goes to<Platform>\<Configuration>\for every platform (Win32\Release\LLMAssistant.dll). MSBuild's Win32 default would beRelease\. The x64 paths are unchanged.build.bat: takes an optional platform,build.bat [x64|x86|arm64] [/nopause], in any order.Win32also works. x64 stays the default. For ARM64 it looks for Visual Studio withMicrosoft.VisualStudio.Component.VC.Tools.ARM64. If that's missing, it names the component to add in the Visual Studio Installer. The toolset check now looks under the chosen platform.deploy.bat: callsbuild.bat x64 /nopause. It still deploysx64\Release\LLMAssistant.dll.packaging/make-release-zip.ps1: new-Platform x64|x86|arm64. It picks the DLL fromx64\,Win32\orARM64\Release, names the zip_x64,_x86or_arm64, and prints the entry forpl.<platform>.json. Before packaging it reads the DLL's PE header and checks three things. The machine type must match the platform. The version resource must equal-Version, unless that's not a number, such as CI'sdev. The DLL must exportbeNotified,getFuncsArray,getName,isUnicode,messageProcandsetInfo.build-and-release.yml): builds x64 and Win32 with/p:PlatformToolset=v143as before. ARM64 builds with the project's own v145 toolset.windows-latestis now thewindows-2025-vs2026image, and its v143 tools (MSVC 14.44) cover x64 and x86 only. A first run that passed v143 for ARM64 failed with MSB8020. It runs the Catch2 tests as x64 as before, and also as Win32. It packages three zips throughmake-release-zip.ps1, so every build runs those checks, ARM64 included. It uploads three artifacts. On av*tag it attachesLLMAssistant_v<ver>_x64.zip,_x86.zipand_arm64.zipto the release. The release notes and the job summary list the entry and SHA-256 for each list. On a tag build, the version check also fails the run if the tag doesn't matchsrc/Version.h.PLUGINS_ADMIN_SUBMISSION.mdcover the three platforms. The comments inVersion.handPluginInterface.hno longer say x64 only.No C++ changes were needed. The code already uses pointer-sized types (
intptr_t,INT_PTR,LRESULT), and the exports areextern "C"__cdecl, so the 32-bit export names are undecorated.Local verification (VS 2026, v145)
build.bat,build.bat x86andbuild.bat Win32each built with 0 errors and 0 compiler warnings. Thendumpbin /headers /exportsandFileVersionInfoon each DLL gave:x64\Release\LLMAssistant.dll8664(x64)beNotified,getFuncsArray,getName,isUnicode,messageProc,setInfoWin32\Release\LLMAssistant.dll14C(x86)beNotified,getFuncsArray,getName,isUnicode,messageProc,setInfo(undecorated)ARM64\Release\LLMAssistant.dllAA64(ARM64), checked in CIbeNotified,getFuncsArray,getName,isUnicode,messageProc,setInfo, checked in CIOther local checks:
cmake -A Win32).make-release-zip.ps1packaged both DLLs, and each zip holds onlyLLMAssistant.dllat its root. It failed with a clear message, as intended, in four cases: an x64 DLL passed as-Platform x86,-Version 1.2against a 1.1 DLL, a missing ARM64 DLL, and a non-plugin DLL (missing exports).v1.1tag build for x64 and x86, wrote the expectedrelease-notes.mdandversion=1.1output.build.bat arm64on this machine stops with the "add MSVC Build Tools for ARM64/ARM64EC (Latest)" message and exits 1. An unknown argument prints usage and exits 1.ARM64: the ARM64 build tools aren't installed on this machine, so the ARM64 DLL is built and checked only in CI. In run 38886031474, MSVC 14.51 (v145,
HostX86\arm64\CL.exe) built it with 0 warnings.make-release-zip.ps1 -Platform arm64then reportedarm64 (0xAA64), version 1.1.0.0, exports beNotified, getFuncsArray, getName, isUnicode, messageProc, setInfo. The same run built x64 and Win32 with v143 (MSVC 14.44) with 0 warnings and passed the Catch2 tests 11/11 as x64 and as Win32. Thedevzip SHA-256s from that run (not release values):LLMAssistant_vdev_x64.zip4939A359ECDCFAE7E66B3B7C7559D09874A7EF77A16B4D370A74E7D0733CAF0DLLMAssistant_vdev_x86.zipF4514609BCBE5329D9235D305984BD9E4BEAB1B84BDA60760FA8F5B74F88C664LLMAssistant_vdev_arm64.zip274C778697C573A8602060F5E7B46EA783A543CC62F406DDECBEB2104852810ENot in this PR
src/pl.x86.jsonandsrc/pl.arm64.jsonin notepad-plus-plus/nppPluginList./MD), as v1.1 does. Each architecture therefore needs the VC++ Redistributable for that architecture, and the ARM64 DLL, built with v145, needs version 14.50 or later. Link the C runtime statically #7 links the CRT statically (/MT), as the Notepad++ plugin template does, which removes this dependency.🤖 Generated with Claude Code