LibraryWine 0.2.0

dotnet add package LibraryWine --version 0.2.0
NuGet\Install-Package LibraryWine -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<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
#r "nuget: LibraryWine, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. 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

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"
);
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 297 7/19/2021
0.1.0 249 7/19/2021