Skip to content

Commit

Permalink
Revert "Merge pull request #44 from VPKSoft/release_adjustments"
Browse files Browse the repository at this point in the history
  • Loading branch information
VPKSoft committed Jan 20, 2023
1 parent 56efc1f commit 2758893
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 5 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ One of the issues that ScintillaNET has historically suffered from is the fact t

No more. **One of the major focuses of this rewrite was to give ScintillaNET an understanding of Unicode from the ground up.** Every API now consistently works with character-based offsets and ranges just like .NET developers expect. Internally we maintain a mapping of character to byte offsets (and vice versa) and do all the translation for you so you never need to worry about it. No more out-of-range exceptions. No more confusion. No more pain. It just works.

### One Library

The second most popular ScintillaNET issue was confusion distributing the ScintillaNET DLL and its native component, the SciLexer DLL. ScintillaNET is a wrapper. Without the SciLexer.dll containing the core Scintilla functionality it is nothing. As a native component, SciLexer.dll has to be compiled separately for 32 and 64-bit versions of Windows. So it was actually three DLLs that developers had to ship with their applications.

This proved a pain point because developers often didn't want to distribute so many libraries or wanted to place them in alternate locations which would break the DLL loading mechanisms used by PInvoke and ScintillaNET. It also causes headaches during design-time in Visual Studio for the same reasons.

To address this ScintillaNET now embeds a 32 and 64-bit version of SciLexer.dll in the ScintillaNET DLL. **Everything you need to run ScintillaNET in one library.** In addition to soothing the pain mentioned above this now makes it possible for us to create a ScintillaNET NuGet package.

### Keeping it Consistent

Another goal of the rewrite was to accept the original Scintilla API for what it is and not try to coerce it into a .NET-style API when it should not or could not be. A good example of this is how ScintillaNET uses indexers to access lines, but not treat them as a .NET collection. Lines in a Scintilla control are not items in a collection. There is no API to Add, Insert, or Remove a line in Scintilla and thus we don't try to create one in ScintillaNET. These deviations from .NET convention are rare, but are done to keep any native Scintilla documentation relevant to the managed wrapper and to avoid situations where trying to force the original API into a more familiar one is more detrimental than helpful.
Expand Down
1 change: 0 additions & 1 deletion Scintilla.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BE874649-2B00-415E-8C80-82A42D949696}"
ProjectSection(SolutionItems) = preProject
.github\workflows\dotnet-desktop.yml = .github\workflows\dotnet-desktop.yml
README.md = README.md
EndProjectSection
EndProject
Global
Expand Down
Binary file added Shared/x64/Scintilla.zip
Binary file not shown.
2 changes: 2 additions & 0 deletions Shared/x64/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Scintilla: 5.1.5
Lexilla: 5.1.4
Binary file added Shared/x86/Scintilla.zip
Binary file not shown.
2 changes: 2 additions & 0 deletions Shared/x86/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Scintilla: 5.1.5
Lexilla: 5.1.4
4 changes: 2 additions & 2 deletions native/x64/version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Scintilla: 5.3.2
Lexilla: 5.2.1
Scintilla: 5.1.5
Lexilla: 5.1.4
Binary file modified native/x86/Scintilla.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions native/x86/version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Scintilla: 5.3.2
Lexilla: 5.2.1
Scintilla: 5.1.5
Lexilla: 5.1.4

0 comments on commit 2758893

Please sign in to comment.