Skip to content

Commit

Permalink
Update install instructions + bump version to 0.0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Fexty12573 committed Dec 5, 2024
1 parent 85afffa commit 5183aaf
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ If you would like to contribute, feel free to fork the repository and make a PR.
- [DirectXTK\[12\]](https://github.com/microsoft/DirectXTK) - DirectX Toolkit, used for loading and managing textures

## **Credits**
- Thanks to Lyra for creating the logo
- Lyra: Creating the logo
- ImDevinC: Lots of testing and feedback to get Linux support working
- jn64: Writing the complete Linux installation instructions
- Ando: Writing the preloader and generally improving the native side
15 changes: 15 additions & 0 deletions SharpPluginLoader.Core/PluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ public void LoadPlugins(string directory)

// After all plugins are loaded, we can save the plugin records cache.
AddressRepository.SavePluginRecords();

// Start a task to periodically save the plugin records cache.
SavePluginRecords(TimeSpan.FromSeconds(7)).ContinueWith(t =>
{
Log.Error($"Failed to save plugin records cache: {t.Exception}");
}, TaskContinuationOptions.OnlyOnFaulted);
}

/// <summary>
Expand Down Expand Up @@ -575,5 +581,14 @@ private void UnloadPlugin(string pluginPath)
_contexts.Remove(key);
}
}

private async Task SavePluginRecords(TimeSpan interval)
{
var timer = new PeriodicTimer(interval);
while (await timer.WaitForNextTickAsync())
{
AddressRepository.SavePluginRecords();
}
}
}
}
4 changes: 2 additions & 2 deletions SharpPluginLoader.Core/SharpPluginLoader.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>SharpPluginLoader.Core</PackageId>
<Title>SharpPluginLoader</Title>
<Version>0.0.7</Version>
<Version>0.0.7.2</Version>
<Authors>Fexty, Ando</Authors>
<Product>SharpPluginLoader.Core</Product>
<Description>A C# Plugin loader and framework for Monster Hunter World</Description>
<PackageProjectUrl>https://fexty12573.github.io/SharpPluginLoader/</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/Fexty12573/SharpPluginLoader</RepositoryUrl>
<FileVersion>0.0.7</FileVersion>
<FileVersion>0.0.7.2</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
29 changes: 26 additions & 3 deletions docs/Install/Installation.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
# Installation
The mod is based on .NET 8. You will need to install the [.NET 8.0 Runtime](https://dotnet.microsoft.com/download/dotnet/8.0/runtime) to use it.
## Windows
The mod is based on .NET 8. You will need to install the [.NET 8.0 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/8.0/runtime) to use it.
Grab the x64 Desktop Runtime and install it.

Once you have the .NET runtime installed you can grab the latest release from the [Releases Page](https://github.com/Fexty12573/SharpPluginLoader/releases).
Extract the contents of the archive into the game's root directory (where `MonsterHunterWorld.exe` is located).

If you installed everything correctly you should now find `winmm.dll` in the same folder as `MonsterHunterWorld.exe`, and a `CSharp` directory in `nativePC\plugins`.

## Linux (Proton/Wine)
As of version 0.0.7.2, SPL officially supports Linux through Proton/Wine. Below are the steps to install and run SPL on Linux.

1. Download the latest **.NET Desktop Runtime** for x64 from [here](https://dotnet.microsoft.com/en-us/download/dotnet/8.0#runtime-desktop-8.0.10).
2. Install the downloaded installer using [protontricks](https://github.com/Matoking/protontricks):
```bash
protontricks-launch --appid 582010 path/to/windowsdesktop-runtime-8.x.xx-win-x64.exe
```
3. Install the Direct 3D Shader Compiler using protontricks:
```bash
protontricks 582010 d3dcompiler_47
```
4. Download the latest linux release of SPL (`SharpPluginLoader-<version>-linux.zip`) from the [Releases Page](https://github.com/Fexty12573/SharpPluginLoader/releases) and extract it into the game's root directory. After doing so you should have a `msvcrt.dll` file in the same folder as `MonsterHunterWorld.exe`.
5. Set the steam launch options for MHW as follows:
```bash
# Use this for SPL only
WINEDLLOVERRIDES="msvcrt=n,b" %command%

# Or this for SPL together with Stracker's Loader
WINEDLLOVERRIDES="msvcrt,dinput8=n,b" %command%
```

## Usage
Any C# plugins will be placed directly into the `CSharp` directory. The plugin loader will automatically load all DLLs in this directory.
Subdirectories are also supported, so you can organize your plugins however you want.
Expand All @@ -21,7 +44,7 @@ Depending on the plugins you have installed you might also see an overlay/UI app
## Directory Structure Examples
```
<Root game directory>
└── winmm.dll
└── winmm.dll/msvcrt.dll
└── nativePC
└── plugins
└── CSharp
Expand All @@ -34,7 +57,7 @@ Depending on the plugins you have installed you might also see an overlay/UI app
Conversely, the following is **not** valid, as `Plugin1.dll` is inside the `Loader` directory. The plugin loader will not load it.
```
<Root game directory>
└── winmm.dll
└── winmm.dll/msvcrt.dll
└── nativePC
└── plugins
└── CSharp
Expand Down

0 comments on commit 5183aaf

Please sign in to comment.