Skip to content

Why is LiteHtmlLib named LiteHtmlLib.dll?  #4

@tig

Description

@tig

Why not just name it litehtml.dll and avoid all this muck?

public class LibInterop : ILibInterop
    {

#if WINDOWS
        const string LiteHtmlLibFile = "LiteHtmlLib.dll";
        public const CharSet cs = CharSet.Unicode;
#else
        const string LiteHtmlLibFile = "litehtml";
        public const CharSet cs = CharSet.Ansi;
#endif

        const string LiteHtmlLibFile_x64 = "x64\\LiteHtmlLib.dll";
        const string LiteHtmlLibFile_x86 = "x86\\LiteHtmlLib.dll";

        public const CallingConvention cc = CallingConvention.Cdecl;

        readonly static Lazy<LibInterop> _instance = new Lazy<LibInterop>(() => new LibInterop());
        public static LibInterop Instance => _instance.Value;

        LibInterop()
        {
            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                LoadLibrary(Environment.Is64BitProcess ? LiteHtmlLibFile_x64 : LiteHtmlLibFile_x86);
            }
        }

I've got things working groovy on Linux with my dotnet Core 3.1 app and I'd rather not have compilation conditionals. The easiest fix would be to just name the library htmllib.dll.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions