Skip to content

Commit eb07b27

Browse files
committed
- updated scintilla x64 and x86 binaries to 5.5.7
- updated lexilla x64 and x86 binaries to 5.4.5 - added fix for #162 - bumping version for new api to set native library path
1 parent 1a92261 commit eb07b27

File tree

4 files changed

+59
-4
lines changed

4 files changed

+59
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ For the latest and greatest you can build the [Master](https://github.com/desjar
3434
**Versions before v.5.3.1.1:**
3535
[Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, 2019, and 2022](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170) is required for the component to work, see [#16](https://github.com/desjarlais/Scintilla.NET/issues/16).
3636

37-
Scintilla library version = 5.5.5
37+
Scintilla library version = 5.5.7
3838

39-
Lexilla library version = 5.4.3
39+
Lexilla library version = 5.4.5
4040

4141
## Background
4242
For more information about the history and background information, look at the wiki [here](https://github.com/desjarlais/Scintilla.NET/wiki/Scintilla.NET-History).

Scintilla.NET/Scintilla.NET.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<NeutralLanguage>en-US</NeutralLanguage>
66
<Description>Source Editing Component based on Scintilla 5 series.</Description>
77
<Copyright>Copyright (c) Jacob Slusser 2018, VPKSoft, cyber960 2022, desjarlais 2023, Ahmet Sait 2025</Copyright>
8-
<Version>6.0.1</Version>
8+
<Version>6.1.0</Version>
99
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1010
<GenerateDocumentationFile>True</GenerateDocumentationFile>
1111
<UseWindowsForms>true</UseWindowsForms>

Scintilla.NET/Scintilla.cs

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,23 @@ procName is "devenv" or "DesignToolsServer" or // WinForms app in VS IDE
7676
/// </summary>
7777
public static IEnumerable<string> EnumerateSatelliteLibrarySearchPaths()
7878
{
79-
// check run-time paths
79+
// 1. User configured (must be set before first Scintilla usage)
80+
if (!string.IsNullOrWhiteSpace(ScintillaNativeLibrary.SatelliteDirectory))
81+
{
82+
yield return ScintillaNativeLibrary.SatelliteDirectory;
83+
}
84+
85+
if (!string.IsNullOrWhiteSpace(ScintillaNativeLibrary.ScintillaFullPath))
86+
{
87+
yield return Path.GetDirectoryName(ScintillaNativeLibrary.ScintillaFullPath);
88+
}
89+
90+
if (!string.IsNullOrWhiteSpace(ScintillaNativeLibrary.LexillaFullPath))
91+
{
92+
yield return Path.GetDirectoryName(ScintillaNativeLibrary.LexillaFullPath);
93+
}
94+
95+
// 2. check run-time paths
8096
string nativeSubFolder = Path.Combine("runtimes", "win-" + Helpers.GetArchitectureRid(WinApiHelpers.GetProcessArchitecture()), "native");
8197

8298
{
@@ -106,6 +122,7 @@ public static IEnumerable<string> EnumerateSatelliteLibrarySearchPaths()
106122
}
107123
}
108124

125+
// 3. check design-time paths
109126
if (InDesignProcess())
110127
{
111128
// Look for the assemblies in the nuget global packages folder
@@ -121,6 +138,19 @@ public static IEnumerable<string> EnumerateSatelliteLibrarySearchPaths()
121138
string rootProjectFolder = Path.GetFullPath(Path.Combine(nugetScintillaNETLocation, @"..\..\..\.."));
122139
yield return Path.Combine(rootProjectFolder, "packages", nugetScintillaPackageName + "." + versionString, nativeSubFolder);
123140
}
141+
142+
// 4. check environment variable custom paths
143+
string x86CustomPath = Environment.GetEnvironmentVariable("SCINTILLA_X86", EnvironmentVariableTarget.User);
144+
if (!string.IsNullOrWhiteSpace(x86CustomPath))
145+
{
146+
yield return x86CustomPath;
147+
}
148+
149+
string x64CustomPath = Environment.GetEnvironmentVariable("SCINTILLA_X64", EnvironmentVariableTarget.User);
150+
if (!string.IsNullOrWhiteSpace(x64CustomPath))
151+
{
152+
yield return x64CustomPath;
153+
}
124154
}
125155

126156
#region Fields
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
namespace ScintillaNET;
2+
/// <summary>
3+
/// Provides optional early configuration for locating native satellite libraries (Scintilla.dll, Lexilla.dll).
4+
/// Must be configured BEFORE the <see cref="Scintilla"/> type is first touched; otherwise changes have no effect.
5+
/// </summary>
6+
public static class ScintillaNativeLibrary
7+
{
8+
/// <summary>
9+
/// Optional absolute directory path probed first for native satellite libraries.
10+
/// If set, this directory is checked before all default probing locations.
11+
/// Example Usage: ScintillaNativeLibrary.SatelliteDirectory = @"C:\MyApp\binaries";
12+
/// </summary>
13+
public static string SatelliteDirectory { get; set; }
14+
15+
/// <summary>
16+
/// Optional absolute path to Scintilla.dll.
17+
/// </summary>
18+
public static string ScintillaFullPath { get; set; }
19+
20+
/// <summary>
21+
/// optional absolute path to Lexilla.dll.
22+
/// </summary>
23+
public static string LexillaFullPath { get; set; }
24+
}
25+

0 commit comments

Comments
 (0)