OsuWineMemReader 1.0.1
dotnet add package OsuWineMemReader --version 1.0.1
NuGet\Install-Package OsuWineMemReader -Version 1.0.1
<PackageReference Include="OsuWineMemReader" Version="1.0.1" />
<PackageVersion Include="OsuWineMemReader" Version="1.0.1" />
<PackageReference Include="OsuWineMemReader" />
paket add OsuWineMemReader --version 1.0.1
#r "nuget: OsuWineMemReader, 1.0.1"
#:package OsuWineMemReader@1.0.1
#addin nuget:?package=OsuWineMemReader&version=1.0.1
#tool nuget:?package=OsuWineMemReader&version=1.0.1
OsuWineMemReader
OsuWineMemReader is a library for reading the memory of the osu! process running in a Wine environment, reading the current selected beatmap path.
It was built to be used in a .NET application, more specifically MapWizard, but I decided to make it a standalone library so it can be used in other projects as well.
It was also heavily inspired by hwsmm's osumem
implementation, used in cosutrainer.
Note: This library relies on the
process_vm_readv
function, which can not be available in all Linux distributions. Furthermore, the user running the application must be the same as the user running the osu! process in Wine to it work without issues. If you are using a different user, you will need to run the application withsudo
or change the permissions of the osu! process.
Requirements
- .NET 9.0
- Wine environment configured with osu! installed (check osu-winello, if you need help with that).
- osu! needs to be running with dotnet 4.5 or higher.
Installation
To install the library, add a reference to the OsuWineMemReader
project in your .NET project.
NuGet Package
You can install the library via NuGet Package Manager Console:
dotnet add package OsuWineMemReader
Usage
Example Usage
using OsuWineMemReader;
class Program
{
static void Main()
{
bool running = true;
string? result;
var options = new OsuMemoryOptions
{
WriteToFile = true,
FilePath = "/path/to/output/file",
RunOnce = false // if set to true OsuMemory will run in a loop until stopped (running is set to false)
};
OsuMemory.StartBeatmapPathReading(ref running, out result, options);
if (result != null)
{
Console.WriteLine($"Beatmap path: {result}");
}
}
}
Options
WriteToFile
: Indicates whether the beatmap path should be written to a file.FilePath
: Path to the file where the beatmap path will be written.RunOnce
: Indicates whether the reading should be executed only once.
Contribution
- Fork the repository.
- Create a branch for your feature (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -am \
Add new feature``). - Push to the branch (
git push origin feature/new-feature
). - Create a new Pull Request.
References
This project relied on the heavy lifting of the following projects:
- hwsmm with the
osumem
implementation, which inspired this library, was the base for theOsuMemory
class. - OsuMemoryDataProvider.
License
This project is licensed under the terms of the MIT license. See the LICENSE
file for more details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.