From 1337c7527e8965f44d321fe2b10c36455a755cd7 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Fri, 13 Dec 2019 20:53:27 -0600 Subject: [PATCH] Updated a bunch of documentation shit --- docs/api/index.md | 2 +- docs/articles/command-line.md | 4 ++++ docs/articles/index.md | 2 +- docs/articles/start-dev.md | 4 ++++ docs/articles/start-user.md | 4 ++++ docs/build.ps1 | 26 ++++++++++++++++++++++++-- docs/index.md | 8 ++------ docs/other_api/config/index.md | 1 - docs/other_api/index.md | 2 -- docs/other_api/toc.yml | 4 +--- 10 files changed, 41 insertions(+), 16 deletions(-) delete mode 100644 docs/other_api/config/index.md diff --git a/docs/api/index.md b/docs/api/index.md index 03c4962f..1fee16e1 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -1,4 +1,4 @@ # BSIPA API Documentation -Welcome to the full class documentation! To see guides, head over to the [Articles tab](xref:getting_started). +Welcome to the full class documentation! To see guides, head over to the [Articles tab](xref:articles.start). Select a namespace and a class on the left to get started. diff --git a/docs/articles/command-line.md b/docs/articles/command-line.md index 92937647..f1e75f69 100644 --- a/docs/articles/command-line.md +++ b/docs/articles/command-line.md @@ -1,3 +1,7 @@ +--- +uid: articles.command_line +--- + # The Command Line BSIPA has 2 command lines: the installer, and the game. diff --git a/docs/articles/index.md b/docs/articles/index.md index 5d63dcb2..c368553c 100644 --- a/docs/articles/index.md +++ b/docs/articles/index.md @@ -1,5 +1,5 @@ --- -uid: getting_started +uid: articles.start --- # Getting Started diff --git a/docs/articles/start-dev.md b/docs/articles/start-dev.md index ed4ad5ef..47bc2cc0 100644 --- a/docs/articles/start-dev.md +++ b/docs/articles/start-dev.md @@ -1,2 +1,6 @@ +--- +uid: articles.start.dev +--- + # Creating your own mod diff --git a/docs/articles/start-user.md b/docs/articles/start-user.md index f77f4f20..c676f56c 100644 --- a/docs/articles/start-user.md +++ b/docs/articles/start-user.md @@ -1,3 +1,7 @@ +--- +uid: articles.start.user +--- + # Installing BSIPA > [!NOTE] diff --git a/docs/build.ps1 b/docs/build.ps1 index 9b1f6cca..db3ade3b 100644 --- a/docs/build.ps1 +++ b/docs/build.ps1 @@ -1,19 +1,25 @@ # read SelfConfig, remove wierd bits, load it, load Newtonsoft, and turn it into a schema $newtonsoftLoc = "$(Get-Location)/nuget/Newtonsoft.Json.12.0.2/lib/netstandard2.0/Newtonsoft.Json.dll" $newtonsoftSchemaLoc = "$(Get-Location)/nuget/Newtonsoft.Json.Schema.3.0.11/lib/netstandard2.0/Newtonsoft.Json.Schema.dll" +$roslynCodeDomBase = "$(Get-Location)/nuget/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1" +$roslynCodeDom = "$roslynCodeDomBase/lib/net45/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll" $selfConfigLoc = "../IPA.Loader/Config/SelfConfig.cs" $ipaRoot = "../IPA" if (!(Test-Path "nuget" -PathType Container)) { nuget install Newtonsoft.Json -Version 12.0.2 -source https://api.nuget.org/v3/index.json -o "$(Get-Location)/nuget" nuget install Newtonsoft.Json.Schema -Version 3.0.11 -source https://api.nuget.org/v3/index.json -o "$(Get-Location)/nuget" + nuget install Microsoft.CodeDom.Providers.DotNetCompilerPlatform -Version 2.0.1 -source https://api.nuget.org/v3/index.json -o "$(Get-Location)/nuget" } & docfx metadata -if ((Test-Path $newtonsoftLoc -PathType Leaf) -and (Test-Path $selfConfigLoc -PathType Leaf)) { +if ((Test-Path $newtonsoftLoc -PathType Leaf) -and (Test-Path $selfConfigLoc -PathType Leaf) -and (Test-Path $roslynCodeDom -PathType Leaf)) { # The files we need exist, lets do this! + # Add the Roslyn CodeDom + Add-Type -Path $roslynCodeDom + # First load Newtonsoft Add-Type -Path $newtonsoftLoc Add-Type -Path $newtonsoftSchemaLoc @@ -56,7 +62,23 @@ if ((Test-Path $newtonsoftLoc -PathType Leaf) -and (Test-Path $selfConfigLoc -Pa process { $_ -replace "internal", "public" } } - Add-Type -TypeDefinition (Get-Content $selfConfigLoc | ProcessLines | Merge-Lines | FilterDef) -ReferencedAssemblies $newtonsoftLoc,"netstandard" + # set up the compiler settings + Invoke-Expression -Command @" +class RoslynCompilerSettings : Microsoft.CodeDom.Providers.DotNetCompilerPlatform.ICompilerSettings +{ + [string] get_CompilerFullPath() + { + return "$roslynCodeDomBase\tools\RoslynLatest\csc.exe" + } + [int] get_CompilerServerTimeToLive() + { + return 10 + } +} +"@ + $codeDomProvider = [Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider]::new([RoslynCompilerSettings]::new()) + + Add-Type -CodeDomProvider $codeDomProvider -TypeDefinition (Get-Content $selfConfigLoc | ProcessLines | Merge-Lines | FilterDef) -ReferencedAssemblies $newtonsoftLoc,"netstandard" # type will be [IPA.Config.SelfConfig] diff --git a/docs/index.md b/docs/index.md index ff5cc302..203a33d6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,10 +13,6 @@ Beat Saber IPA - The mod injector tailored for Beat Saber 3. Run **IPA.exe** 4. Start the game as usual -A console window should open before the game starts if the installation was successful. - -To disable this console window, pass `--no-console` to the game. - ## How To Uninstall 1. Drag & drop the game exe onto **IPA.exe** while holding Alt @@ -37,10 +33,10 @@ Unconsumed arguments will be passed on to the game in case of `--launch`. 1. Create a new **Class Library** C# project (.NET 4.6) 2. Download a release and add **IPA.Loader.dll** to your references -3. Implement `IBeatSaberPlugin` or `IEnhancedBeatSaberPlugin` +3. Implement `IPA.IPlugin` or `IPA.IEnhancedPlugin` 4. Build the project and copy the DLL into the Plugins folder of the game. -See [Developing](https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/wiki/Developing) for more information. +See [Developing](xref:articles.start.dev) for more information. ## How To Keep The Game Patched diff --git a/docs/other_api/config/index.md b/docs/other_api/config/index.md deleted file mode 100644 index 884a64ed..00000000 --- a/docs/other_api/config/index.md +++ /dev/null @@ -1 +0,0 @@ -# Title 2 \ No newline at end of file diff --git a/docs/other_api/index.md b/docs/other_api/index.md index f3d57b9c..5f6d1e4c 100644 --- a/docs/other_api/index.md +++ b/docs/other_api/index.md @@ -1,5 +1,3 @@ --- uid: other.index --- - -# Title1 \ No newline at end of file diff --git a/docs/other_api/toc.yml b/docs/other_api/toc.yml index 0dabc6ac..daea22c9 100644 --- a/docs/other_api/toc.yml +++ b/docs/other_api/toc.yml @@ -4,6 +4,4 @@ href: config/schema.md items: - name: Schema - href: config/schema.md - - name: Index - href: config/index.md \ No newline at end of file + href: config/schema.md \ No newline at end of file