Skip to content

Commit

Permalink
adaptations for the mod manager (#90)
Browse files Browse the repository at this point in the history
* removed (slow) version checking
* added descriptions
* updated readme
  • Loading branch information
amazingalek authored Apr 15, 2020
1 parent d6510ca commit 16f7b0f
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 236 deletions.
44 changes: 1 addition & 43 deletions OWML.Launcher/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Newtonsoft.Json;
using OWML.Common;
using OWML.Patcher;
using OWML.Update;

namespace OWML.Launcher
{
Expand All @@ -20,10 +19,9 @@ public class App
private readonly PathFinder _pathFinder;
private readonly OWPatcher _owPatcher;
private readonly VRPatcher _vrPatcher;
private readonly CheckVersion _checkVersion;

public App(IOwmlConfig owmlConfig, IModManifest owmlManifest, IModConsole writer, IModFinder modFinder,
OutputListener listener, PathFinder pathFinder, OWPatcher owPatcher, VRPatcher vrPatcher, CheckVersion checkVersion)
OutputListener listener, PathFinder pathFinder, OWPatcher owPatcher, VRPatcher vrPatcher)
{
_owmlConfig = owmlConfig;
_owmlManifest = owmlManifest;
Expand All @@ -33,15 +31,11 @@ public App(IOwmlConfig owmlConfig, IModManifest owmlManifest, IModConsole writer
_pathFinder = pathFinder;
_owPatcher = owPatcher;
_vrPatcher = vrPatcher;
_checkVersion = checkVersion;
}

public void Run(string[] args)
{
_writer.WriteLine($"Started OWML v{_owmlManifest.Version}");

CheckVersion();

_writer.WriteLine("For detailed log, see Logs/OWML.Log.txt");

LocateGamePath();
Expand All @@ -61,23 +55,6 @@ public void Run(string[] args)
Console.ReadLine();
}

private void CheckVersion()
{
_writer.WriteLine("Checking latest version...");
var latestVersion = _checkVersion.GetOwmlVersion();
if (string.IsNullOrEmpty(latestVersion))
{
_writer.WriteLine("Warning: could not check latest OWML version.");
return;
}
if (_owmlManifest.Version == latestVersion)
{
_writer.WriteLine("OWML is up to date.");
return;
}
_writer.WriteLine($"Warning: please update OWML to v{latestVersion}: {_checkVersion.GitHubReleasesUrl}");
}

private void LocateGamePath()
{
var gamePath = _pathFinder.FindGamePath();
Expand Down Expand Up @@ -118,12 +95,6 @@ private void ShowModList(IList<IModData> mods)
var stateText = modData.Config.Enabled ? "" : "(disabled)";
_writer.WriteLine($"* {modData.Manifest.UniqueName} v{modData.Manifest.Version} {stateText}");

var latestVersion = GetNexusVersion(modData.Manifest);
if (!string.IsNullOrEmpty(latestVersion) && modData.Manifest.Version != latestVersion)
{
_writer.WriteLine($" Warning: please update to v{latestVersion}: {_checkVersion.NexusModsUrl}{modData.Manifest.AppIds["nexus"]}");
}

if (!string.IsNullOrEmpty(modData.Manifest.OWMLVersion) && !IsMadeForSameOwmlMajorVersion(modData.Manifest))
{
_writer.WriteLine($" Warning: made for old version of OWML: v{modData.Manifest.OWMLVersion}");
Expand All @@ -140,19 +111,6 @@ private bool IsMadeForSameOwmlMajorVersion(IModManifest manifest)
owmlVersionSplit[1] == modVersionSplit[1];
}

private string GetNexusVersion(IModManifest manifest)
{
if (manifest.AppIds == null || !manifest.AppIds.Any())
{
return null;
}
if (!manifest.AppIds.TryGetValue("nexus", out var appId))
{
return null;
}
return _checkVersion.GetNexusVersion(appId);
}

private void ListenForOutput()
{
_listener.OnOutput += OnOutput;
Expand Down
4 changes: 0 additions & 4 deletions OWML.Launcher/OWML.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@
<Project>{5153D37F-3148-45DE-B1A4-7EBF87965569}</Project>
<Name>OWML.Patcher</Name>
</ProjectReference>
<ProjectReference Include="..\OWML.Update\OWML.Update.csproj">
<Project>{55ACB9AB-CDCB-4F37-94E0-78891023E44C}</Project>
<Name>OWML.Update</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion OWML.Launcher/OWML.Manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"author": "Alek",
"name": "OWML",
"uniqueName": "Alek.OWML",
"version": "0.3.44"
"version": "0.3.45",
"description": "The mod loader and mod framework for Outer Wilds"
}
4 changes: 1 addition & 3 deletions OWML.Launcher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using OWML.ModHelper;
using OWML.ModLoader;
using OWML.Patcher;
using OWML.Update;

namespace OWML.Launcher
{
Expand All @@ -21,8 +20,7 @@ static void Main(string[] args)
var pathFinder = new PathFinder(owmlConfig, writer);
var owPatcher = new OWPatcher(owmlConfig, writer);
var vrPatcher = new VRPatcher(owmlConfig, writer);
var checkVersion = new CheckVersion(writer);
var app = new App(owmlConfig, owmlManifest, writer, modFinder, outputListener, pathFinder, owPatcher, vrPatcher, checkVersion);
var app = new App(owmlConfig, owmlManifest, writer, modFinder, outputListener, pathFinder, owPatcher, vrPatcher);
app.Run(args);
}

Expand Down
3 changes: 2 additions & 1 deletion OWML.SampleMods/OWML.EnableDebugMode/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"name": "EnableDebugMode",
"uniqueName": "Alek.EnableDebugMode",
"version": "0.2",
"owmlVersion": "0.3.44"
"owmlVersion": "0.3.45",
"description": "Enables the debug mode in Outer Wilds"
}
3 changes: 2 additions & 1 deletion OWML.SampleMods/OWML.LoadCustomAssets/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"name": "LoadCustomAssets",
"uniqueName": "Alek.LoadCustomAssets",
"version": "0.5",
"owmlVersion": "0.3.44"
"owmlVersion": "0.3.45",
"description": "A mod for testing loading of custom assets"
}
67 changes: 0 additions & 67 deletions OWML.Update/CheckVersion.cs

This file was deleted.

64 changes: 0 additions & 64 deletions OWML.Update/OWML.Update.csproj

This file was deleted.

35 changes: 0 additions & 35 deletions OWML.Update/Properties/AssemblyInfo.cs

This file was deleted.

5 changes: 0 additions & 5 deletions OWML.Update/packages.config

This file was deleted.

6 changes: 0 additions & 6 deletions OWML.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OWML.Nuget", "OWML.Nuget\OW
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OWML.ModHelper.Menus", "OWML.ModHelper.Menus\OWML.ModHelper.Menus.csproj", "{B874CC24-8340-4238-AC9D-1BFB41186BB5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OWML.Update", "OWML.Update\OWML.Update.csproj", "{55ACB9AB-CDCB-4F37-94E0-78891023E44C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -79,10 +77,6 @@ Global
{B874CC24-8340-4238-AC9D-1BFB41186BB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B874CC24-8340-4238-AC9D-1BFB41186BB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B874CC24-8340-4238-AC9D-1BFB41186BB5}.Release|Any CPU.Build.0 = Release|Any CPU
{55ACB9AB-CDCB-4F37-94E0-78891023E44C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55ACB9AB-CDCB-4F37-94E0-78891023E44C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55ACB9AB-CDCB-4F37-94E0-78891023E44C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55ACB9AB-CDCB-4F37-94E0-78891023E44C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 5 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ OWML does the following:

## Installation

With [Outer Wilds Mod Manager](https://github.com/Raicuparta/ow-mod-manager) (recommended):
1. Download the [latest release of the Mod Manager](https://github.com/Raicuparta/ow-mod-manager/releases).
2. Use the Mod Manager to install OWML and mods, and start the game.

With Vortex:
1. Download OWML and extract the zip file.
2. Put the OWML folder in the game's root folder, usually C:\Program Files\Epic Games\OuterWilds.
3. Install [the Vortex extension](https://www.nexusmods.com/site/mods/73/).
4. Use [Vortex](https://www.nexusmods.com/site/mods/1/) to install mods and start the game.

Without Vortex:
Manual install:
1. Download OWML and extract the zip file anywhere you want.
2. [Download mods](https://www.nexusmods.com/outerwilds) and put them in the Mods folder, each mod in a separate folder.
3. Start the game with OWML.Launcher.exe.
Expand Down Expand Up @@ -119,6 +123,4 @@ Dependencies:
* [Json.Net.Unity3D](https://github.com/SaladLab/Json.Net.Unity3D)
* [ObjImporter](https://wiki.unity3d.com/index.php?title=ObjImporter)
* [NAudio-Unity](https://github.com/WulfMarius/NAudio-Unity)
* [HtmlAgilityPack](https://html-agility-pack.net)
* [HtmlAgilityPack.CssSelector](https://github.com/hcesar/HtmlAgilityPack.CssSelector)
* [BsDiff](https://github.com/LogosBible/bsdiff.net)
3 changes: 0 additions & 3 deletions createrelease.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ copy "OWML.Patcher\VR\*" "Release\VR\"
copy "OWML.Patcher\VR\BsPatch.dll" "Release\BsPatch.dll"
copy "OWML.Patcher\VR\ICSharpCode.SharpZipLib.dll" "Release\ICSharpCode.SharpZipLib.dll"
copy "OWML.Launcher\bin\Debug\System.Runtime.Serialization.dll" "Release\System.Runtime.Serialization.dll"
copy "OWML.Update\bin\Debug\OWML.Update.dll" "Release\OWML.Update.dll"
copy "OWML.Update\bin\Debug\HtmlAgilityPack.dll" "Release\HtmlAgilityPack.dll"
copy "OWML.Update\bin\Debug\HtmlAgilityPack.CssSelectors.dll" "Release\HtmlAgilityPack.CssSelectors.dll"

copy "OWML.Nuget\bin\Debug\NAudio-Unity.dll" "Release\NAudio-Unity.dll"
copy "OWML.Nuget\bin\Debug\OWML.Common.dll" "Release\OWML.Common.dll"
Expand Down

0 comments on commit 16f7b0f

Please sign in to comment.