Browse Source

Documentation changes and reorganization

pull/46/head
Anairkoen Schno 4 years ago
parent
commit
076d3ecd60
6 changed files with 86 additions and 58 deletions
  1. +39
    -0
      docs/articles/contributing.md
  2. +6
    -1
      docs/articles/index.md
  3. +29
    -1
      docs/articles/start-user.md
  4. +2
    -0
      docs/articles/toc.yml
  5. +9
    -55
      docs/index.md
  6. +1
    -1
      docs/toc.yml

+ 39
- 0
docs/articles/contributing.md View File

@ -0,0 +1,39 @@
---
uid: articles.contributing
---
# Contributing
## Prerequisites
- Microsoft Visual Studio 2019 or later (2017 may work, no guarantees)
- Tools for C/C++ (MSVC) v141
- .NET 4.6.1 SDK and .NET 4.7.2 SDK
- Beat Saber (if developing for .NET 4.5+)
- Muse Dash (if developing for .NET 3.5)
## Building
1. Clone with `git clone https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded.git --recursive`
2. Create a file, `bsinstalldir.txt` in the solution root. Do NOT create this in Visual Studio; VS adds a BOM at the begginning of the file that the tools used cannot read.
It should contain the path to your Beat Saber installation, using forward slashes with a trailing slash. e.g.
```
C:/Program Files (x86)/Steam/steamapps/common/Beat Saber/
```
If you intend to be doing .NET 3.5 centric development, you must put your Muse Dash installation folder in a file named `mdinstalldir.txt` that is otherwise identical to
`bsinstalldir.txt`.
3. Open `BSIPA.sln` in Visual Studio.
4. Choose the configuration that you intend to target during development.
5. Rebuild all.
When you make a change somewhere in BSIPA itself, right click on `BSIPA-Meta` and click `Build` or `Rebuild`. This sets up the output in `path/to/solution/BSIPA-Meta/bin/<Configuration>` to be what
should be copied to the game directory.
When making a change to Mod List, you only need to build Mod List itself. Install by copying everything in `path/to/solution/BSIPA-ModList/bin/<Configuration>` to your game
directory.
When building a Debug build, all referenced assemblies from Beat Saber will be copied from the install directory provided in `bsinstalldir.txt` into `Refs/`. Any new references
should reference the copy in there. When building for Release, it just uses the files already in `Refs/`.

+ 6
- 1
docs/articles/index.md View File

@ -4,4 +4,9 @@ uid: articles.start
# Getting Started
Starting out is quite simple. Just follow one of the guides to the left!
Starting out is quite simple. Just follow one of the following guides:
- <xref:articles.start.user>
- <xref:articles.start.dev>
Or, if you want to contribute, see <xref:articles.contributing>.

+ 29
- 1
docs/articles/start-user.md View File

@ -8,7 +8,20 @@ uid: articles.start.user
> This guide assumes that you are starting completely fresh.
1. Grab a release from the GitHub [Releases page](https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/releases).
Make sure to download `BSIPA.zip`, as `ModList.zip` contains the Beat Saber mod for showing your mods in-game, not the loader itself.
Make sure to download one of the `BSIPA-*.zip`s, as `ModList.zip` contains the Beat Saber mod for showing your mods in-game, not the loader itself.
> [!NOTE]
> The specific ZIP you need to download varies on the game you will be patching. For example, if you are patching Beat Saber, you will need the file
> `BSIPA-x64-Net4.zip`. This is because Beat Saber is a 64 bit game running .NET 4. If you are patching Muse Dash, however, you nee the file
> `BSIPA-x86-Net3.zip`.
>
> [!TIP]
> There are a few tricks for figuring out which file you need. If the game has a folder called `MonoBleedingEdge` in the install directory, then you
> need one of the `Net4` builds. To determine *which* build to use, right click on the game executable, go to the `Compatability` tab, check the
> `Run this program in compatability mode for` checkbox, and look and see if the dropdown has any Windows XP emulation options. If it does, the
> application is 32 bit, and you need to get one of the x86 builds. Otherwise, get one of the x64 builds.
>
> Make sure to uncheck that checkbox before leaving the menu.
2. Extract the zip into your game installation directory. There should now be a folder named `IPA` and a file named `IPA.exe` in
the same folder as the game executable.
@ -57,5 +70,20 @@ uid: articles.start.user
Many plugins will come in a zip such that the root of the zip represents the game install directory, so all you may have to
do is extract the plugin into the game installation folder.
> [!NOTE]
>
> For some reason, by default, Wine does not load DLLs in quite the same way that Windows does, causing issues with the injection.
> To make the injection work with Wine, `winhttp` has to have a DLL override set to `native,builtin`. This can be set either through
> Protontricks, or with the following `.reg` file.
>
> ```reg
> REGEDIT4
> [HKEY_CURRENT_USER\Software\Wine\DllOverrides]
> "winhttp"="native,builtin"
> ```
>
> For Steam there's a per-game Wine prefix under `compatdata`. In this case `SteamLibrary/steamapps/compatdata/620980/pfx/user.reg`.
> Changes to this file will likely be ovewritten when the game updates or if local files are validated through Steam.
Thats really all you have to do! The installation should persist across game updates for as long as `winhttp.dll` is present in
the game directory, though your plugins will be moved to a different folder when it does update so things don't break horribly.

+ 2
- 0
docs/articles/toc.yml View File

@ -7,5 +7,7 @@
href: start-user.md
- name: As a Developer
href: start-dev.md
- name: As a Contributor
href: contributing.md
- name: The Command Line
href: command-line.md

+ 9
- 55
docs/index.md View File

@ -1,10 +1,15 @@
---
title: Beat Saber IPA
title: BSIPA - Home
uid: home
---
# ![Beat Saber IPA Reloaded](images/banner_dark.svg) [![Build status](https://ci.appveyor.com/api/projects/status/1ruhnnfeudrrd097?svg=true)](https://ci.appveyor.com/project/nike4613/beatsaber-ipa-reloaded-9smsb)
# ![BSIPA](images/banner_dark.svg)
Beat Saber IPA - The mod injector tailored for Beat Saber
[![Build status](https://ci.appveyor.com/api/projects/status/1ruhnnfeudrrd097?svg=true)](https://ci.appveyor.com/project/nike4613/beatsaber-ipa-reloaded-9smsb)
BSIPA - The Unity mod injector for the new age (pending confirmation).
Assuming, that is, that Unity 2017 is "new age".
## How To Install
@ -20,14 +25,7 @@ Beat Saber IPA - The mod injector tailored for Beat Saber
## Arguments
`IPA.exe file-to-patch [arguments]`
- `--launch`: Launch the game after patching
- `--revert`: Revert changes made by IPA (= unpatch the game)
- `--nowait`: Never keep the console open
- See `-h` or `--help` for more options.
Unconsumed arguments will be passed on to the game in case of `--launch`.
See <xref:articles.command_line>.
## How To Develop
@ -41,47 +39,3 @@ See [Developing](xref:articles.start.dev) for more information.
## How To Keep The Game Patched
BSIPA will automatically repatch the game when it updates, as long as `winhttp.dll` is present in the install directory.
## Notes for running under Wine
For some reason, by default, Wine does not load DLLs in quite the same way that Windows does, causing issues with the injection.
To make the injection work with Wine, `winhttp` has to have a DLL override set to `native,builtin`. This can be set either through
Protontricks, or with the following `.reg` file.
```reg
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\DllOverrides]
"winhttp"="native,builtin"
```
For Steam there's a per-game Wine prefix under `compatdata`. In this case `SteamLibrary/steamapps/compatdata/620980/pfx/user.reg`.
Changes to this file will likely be ovewritten when the game updates or if local files are validated through Steam.
## Developing BSIPA itself
### Prerequisites
- Microsoft Visual Studio 2019 or later (2017 may work, no guarantees)
- Tools for C/C++ (MSVC) v141
- .NET 4.6.1 SDK and .NET 4.7.2 SDK
### Building
1. Clone with `git clone https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded.git --recursive`
2. Create a file, `bsinstalldir.txt` in the solution root. Do NOT create this in Visual Studio; VS adds a BOM at the begginning of the file that the tools used cannot read.
It should contain the path to your Beat Saber installation, using forward slashes with a trailing slash. e.g.
```
C:/Program Files (x86)/Steam/steamapps/common/Beat Saber/
```
3. Open `BSIPA.sln` in Visual Studio.
4. Choose the configuration `x64-Net4`
5. Rebuild all.
When you make a change somewhere in BSIPA itself, right click on `BSIPA-Meta` and click `Build` or `Rebuild`. This sets up the output in `path/to/solution/BSIPA-Meta/bin/<Configuration>` to be what
should be copied to the game directory.
When making a change to the Mod List, you only need to build the mod list. Install by copying everything in `path/to/solution/BSIPA-ModList/bin/<Configuration>` to your game
directory.
When building a Debug build, all referenced assemblies from Beat Saber will be copied from the install directory provided in `bsinstalldir.txt` into `Refs/`. Any new references
should reference the copy in there. When building for Release, it just uses the files already in `Refs/`

+ 1
- 1
docs/toc.yml View File

@ -1,6 +1,6 @@
- name: Articles
href: articles/
homepage: articles/index.md
homepage: ./index.md
- name: C# API Documentation
href: api/
homepage: api/index.md


Loading…
Cancel
Save