Skip to content

Conversation

@danipen
Copy link
Owner

@danipen danipen commented May 6, 2023

Prior to these changes, I was always deploying the x86 version of onigwrap.dll under Windows environments, which caused issues. For instance, under Visual Studio, running the demo project required the x64 version of the library, whereas the unit test runtime required the x86 version.

To address this, I have made changes to the way the native library is accessed.

Firstly, I have renamed the x86 version of the library to onigwrap-x86.dll, and the x64 version to onigwrap-x64.dll. This naming convention will enable developers to identify the appropriate library version to be used based on the runtime.

Secondly, I have created separate instances of Interop classes, namely InteropWin32, InteropWin64, and InteropUnix. All these classes are wrapped under an interface IOnigInterop, which is initialized statically based on the platform and the runtime. This will ensure that the correct Interop class is used to load the respective native library.

Fixes #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include packages for x86/x64 onigwrap.dll, and dynamic binding between them

1 participant