LibraryWine 0.2.0

Install-Package LibraryWine -Version 0.2.0
dotnet add package LibraryWine --version 0.2.0
<PackageReference Include="LibraryWine" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LibraryWine --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LibraryWine, 0.2.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install LibraryWine as a Cake Addin
#addin nuget:?package=LibraryWine&version=0.2.0

// Install LibraryWine as a Cake Tool
#tool nuget:?package=LibraryWine&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

LibraryWine is a complete Wine wrapper with Proton runner support.

Usage

var wine = new Wine(
    winePath: "/path/to/wine", // folder
    winePrefixPath: "/path/to/wineprefix", // empty or existing
    verboseLevel: Wine.VerboseLevels.N_ALL,
    isProton: false
);

// Terminal selection
wine.Terminal = Wine.SupportedTerminals.GNOME_TERMINAL; // default: NONE (cli)

// Working with processes
var processes = WineTools.GetRunningProcesses(ref wine); // return List<Models.RegisterKeyValue>
foreach (var p in processes)
{
    Console.WriteLine($"Name: {p.Name}, Pid: {p.Pid}, Parent: {p.ParentPid}");
    if (p.Name.Contains("winecfg"))
        p.Kill();
}

// Boot Management
WineTools.WineBootInit(ref wine);
WineTools.WineBootEndSession(ref wine);
WineTools.WineBootForce(ref wine);
WineTools.WineBootKill(ref wine);
WineTools.WineBootRestart(ref wine);
WineTools.WineBootShutdown(ref wine);
WineTools.WineBootUpdate(ref wine);

// Executables
WineTools.RunExe(
    ref wine,
    executable: "/path/to/exe",
    arguments: "--test" // optional
);
WineTools.RunMsi(ref wine, "/path/to/exe");
WineTools.RunBat(ref wine, "/path/to/exe");

// Register
WineRegister.GetKeyValues(
    ref wine, 
    key: "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion"
);
WineRegister.AddKey(
    ref wine,
    key: "HKEY_CURRENT_USER\\Software\\Wine\\Explorer",
    value: "Desktop",
    data: "Default",
    kType: WineRegister.KTypes.REG_SZ
);
WineRegister.DeleteKey(
    ref wine,
    key: "HKEY_CURRENT_USER\\Software\\Wine\\Explorer",
    value: "Desktop"
);

// Mapped keys
WineRegister.SetWindowsVersion(
    ref: wine,
    version: WineRegister.WindowsVersions.WIN10
);
WineRegister.SetAppDefaultVersion(
    ref: wine,
    executable: "steam.exe",
    version: WineRegister.WindowsVersions.WIN7
);
WineRegister.SetVirtualDesktop(
    ref: wine,
    enabled: true,
    resolution: "1920x1080"
);
WineRegister.SetWindowDecorations(
    ref: wine,
    enabled: true
);
WineRegister.SetWindowManaged(
    ref wine,
    enabled: true
);
WineRegister.SetFullscreenMouseCapture(
    ref wine,
    enabled: true
);
WineRegister.SetDpi(
    ref wine,
    dpi: 96
);

// DLL Overrides
WineRegister.GetDllOverrides(ref wine);
WineRegister.AddDllOverride(
    ref wine,
    dll: "ucrtbase",
    type: WineRegister.DllOverrideTypes.BUILTIN_NATIVE
);
WineRegister.DeleteDllOverride(
    ref wine,
    dll: "ucrtbase"
);

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.0 72 7/19/2021
0.1.0 72 7/19/2021