Skip to content

Commit

Permalink
Merge pull request #64 from Goose-Bomb/dev
Browse files Browse the repository at this point in the history
Add shaderpacks manager and logger
  • Loading branch information
Nullkooland authored May 9, 2021
2 parents 36620c7 + c194eb8 commit 3722b61
Show file tree
Hide file tree
Showing 102 changed files with 2,572 additions and 1,369 deletions.
8 changes: 4 additions & 4 deletions GBCLV3.Tests/GBCLV3.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="coverlet.collector" Version="3.0.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" />
<PackageReference Include="coverlet.collector" Version="3.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void Init()
{
var configService = new ConfigService();
configService.Load();

var builder = new StyletIoCBuilder();
builder.Bind<ConfigService>().ToInstance(configService);
builder.Bind<GamePathService>().ToSelf().InSingletonScope();
Expand All @@ -35,7 +35,7 @@ public void Init()
[DataRow(DownloadSource.MCBBS)]
public void GetLatestTest(DownloadSource downloadSource)
{
var config= _ioc.Get<ConfigService>().Entries;
var config = _ioc.Get<ConfigService>().Entries;
config.DownloadSource = downloadSource;

var authlibInjectorInstallService = _ioc.Get<AuthlibInjectorService>();
Expand Down
4 changes: 1 addition & 3 deletions GBCLV3/Behaviors/WindowBehavior.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using GBCLV3.Utils;
using System.Windows;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interop;

namespace GBCLV3.Behaviors
{
Expand Down
Binary file modified GBCLV3/Bootstrapper.cs
Binary file not shown.
6 changes: 3 additions & 3 deletions GBCLV3/GBCLV3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Fody" Version="6.3.0">
<PackageReference Include="Fody" Version="6.5.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Ookii.Dialogs.Wpf" Version="3.1.0" />
<PackageReference Include="PropertyChanged.Fody" Version="3.3.1" />
<PackageReference Include="Stylet" Version="1.3.5" />
<PackageReference Include="PropertyChanged.Fody" Version="3.3.3" />
<PackageReference Include="Stylet" Version="1.3.6" />
<PackageReference Include="AdonisUI" Version="1.17.0" />
<PackageReference Include="AdonisUI.ClassicTheme" Version="1.17.0" />
</ItemGroup>
Expand Down
10 changes: 4 additions & 6 deletions GBCLV3/Models/Authentication/Account.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using GBCLV3.Models.Auxiliary;
using System;
using System.ComponentModel;
using System;
using System.Text.Json.Serialization;
using System.Windows.Media.Imaging;
using GBCLV3.Utils;
using GBCLV3.Models.Auxiliary;

namespace GBCLV3.Models.Authentication
{
Expand All @@ -27,14 +25,14 @@ public class Account

public string AuthlibInjectorSHA256 { get; set; } // Very ugly...

[JsonIgnore]
[JsonIgnore]
public string AuthServer => AuthServerBase != null ? $"{AuthServerBase}/authserver" : null;

[JsonIgnore]
public string ProfileServer =>
AuthServerBase != null ? $"{AuthServerBase}/sessionserver/session/minecraft/profile" : null;

[JsonIgnore]
[JsonIgnore]
public string PrefetchedAuthServerInfo { get; set; }


Expand Down
7 changes: 2 additions & 5 deletions GBCLV3/Models/Authentication/AccountEdit.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using GBCLV3.Utils;
using System.ComponentModel;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models.Authentication
{
Expand Down
1 change: 0 additions & 1 deletion GBCLV3/Models/Authentication/AuthData.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
using System.Windows.Media.Imaging;
using GBCLV3.Models.Auxiliary;

namespace GBCLV3.Models.Authentication
Expand Down
4 changes: 2 additions & 2 deletions GBCLV3/Models/Authentication/AuthMode.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using GBCLV3.Utils;
using System.ComponentModel;
using System.ComponentModel;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models.Authentication
{
Expand Down
4 changes: 2 additions & 2 deletions GBCLV3/Models/Authentication/AuthResult.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using GBCLV3.Utils;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models.Authentication
{
Expand Down
6 changes: 3 additions & 3 deletions GBCLV3/Models/Auxiliary/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GBCLV3.Models.Auxiliary
{
public class Mod
{
public string Name { get; set; }
public string Id { get; set; }

public string FileName { get; set; }

Expand Down Expand Up @@ -46,14 +46,14 @@ public class ForgeMod
public string url { get; set; }
}

class FabricModContact
internal class FabricModContact
{
public string homepage { get; set; }

public string sources { get; set; }
}

class FabricMod
internal class FabricMod
{
public int schemaVersion { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion GBCLV3/Models/Auxiliary/ResourcePack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GBCLV3.Models.Auxiliary
{
public class ResourcePack
{
public string Name => System.IO.Path.GetFileName(Path);
public string Id { get; set; }

public int Format { get; set; }

Expand Down
21 changes: 21 additions & 0 deletions GBCLV3/Models/Auxiliary/ShaderPack.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.ComponentModel;
using PropertyChanged;

namespace GBCLV3.Models.Auxiliary
{
public class ShaderPack : INotifyPropertyChanged
{
[DoNotNotify]
public string Id { get; set; }

[DoNotNotify]
public string Path { get; set; }

public bool IsEnabled { get; set; }

[DoNotNotify]
public bool IsExtracted { get; set; }

public event PropertyChangedEventHandler PropertyChanged;
}
}
6 changes: 2 additions & 4 deletions GBCLV3/Models/Config.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using GBCLV3.Models.Authentication;
using System.Collections.Generic;
using GBCLV3.Models.Authentication;
using GBCLV3.Models.Download;
using GBCLV3.Models.Launch;
using GBCLV3.Models.Theme;
using System.Collections.Generic;

namespace GBCLV3.Models
{
Expand Down Expand Up @@ -73,8 +73,6 @@ public class Config

public bool DownloadAssetsOnInstall { get; set; }

public bool CopyMods { get; set; }

#endregion
}
}
4 changes: 2 additions & 2 deletions GBCLV3/Models/Download/DownloadSource.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using GBCLV3.Utils;
using System.ComponentModel;
using System.ComponentModel;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models.Download
{
Expand Down
4 changes: 2 additions & 2 deletions GBCLV3/Models/Download/DownloadType.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using GBCLV3.Utils;
using System.ComponentModel;
using System.ComponentModel;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models.Download
{
Expand Down
4 changes: 2 additions & 2 deletions GBCLV3/Models/Download/Update.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using GBCLV3.Utils;
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text.Json.Serialization;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models.Download
{
Expand Down
4 changes: 2 additions & 2 deletions GBCLV3/Models/ErrorReport.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using GBCLV3.Utils;
using System.ComponentModel;
using System.ComponentModel;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models
{
Expand Down
6 changes: 1 addition & 5 deletions GBCLV3/Models/Installation/AuthlibInjector.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GBCLV3.Models.Installation
namespace GBCLV3.Models.Installation
{
public class AuthlibInjector
{
Expand Down
4 changes: 2 additions & 2 deletions GBCLV3/Models/Installation/Fabric.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using GBCLV3.Models.Launch;
using System.Collections.Generic;
using System.Collections.Generic;
using GBCLV3.Models.Launch;

namespace GBCLV3.Models.Installation
{
Expand Down
4 changes: 2 additions & 2 deletions GBCLV3/Models/Installation/InstallStatus.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using GBCLV3.Utils;
using System.ComponentModel;
using System.ComponentModel;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models.Installation
{
Expand Down
4 changes: 2 additions & 2 deletions GBCLV3/Models/Launch/Launch.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using GBCLV3.Utils;
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text.Json;
using GBCLV3.Models.Authentication;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models.Launch
{
Expand Down
4 changes: 2 additions & 2 deletions GBCLV3/Models/Launch/Library.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using GBCLV3.Models.Download;
using System.Collections.Generic;
using System.Collections.Generic;
using GBCLV3.Models.Download;

namespace GBCLV3.Models.Launch
{
Expand Down
6 changes: 3 additions & 3 deletions GBCLV3/Models/Launch/Version.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using GBCLV3.Models.Download;
using GBCLV3.Utils;
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using GBCLV3.Models.Download;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models.Launch
{
Expand Down
10 changes: 4 additions & 6 deletions GBCLV3/Models/Logging.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GBCLV3.Models
{
enum LogType
internal enum LogLevel
{
Info,
Debug,
Warn,
Error,
Crash,
Fatal,
Minecraft,
}

class LogMessage
internal class LogMessage
{
public LogType Type { get; set; }
public LogLevel Level { get; set; }

public DateTime Timestamp { get; set; }

Expand Down
7 changes: 2 additions & 5 deletions GBCLV3/Models/Theme/BackgroundEffect.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using GBCLV3.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.ComponentModel;
using GBCLV3.Utils.Binding;

namespace GBCLV3.Models.Theme
{
Expand Down
2 changes: 1 addition & 1 deletion GBCLV3/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Goose Bomb")]
[assembly: AssemblyProduct("Goose Bomb's Minecraft Launcher V3")]
[assembly: AssemblyCopyright("Copyright © Goose Bomb 2020")]
[assembly: AssemblyCopyright("Copyright © Goose Bomb 2019-2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("3.13.197")]
Expand Down
28 changes: 17 additions & 11 deletions GBCLV3/Resources/Languages/Strings/de-DE.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,20 @@
<!-- Mods-Verwaltung -->
<s:String x:Key="AvailableMods">Verfügbare Mods</s:String>
<s:String x:Key="SelectMods">Mods auswählen</s:String>
<s:String x:Key="EnableSelected">Aktivieren</s:String>
<s:String x:Key="DisableSelected">Deaktivieren</s:String>
<!-- TRANSLATION NEEDED HERE -->
<s:String x:Key="CopyMods">When adding new mods, copy instead of moving them from source directory</s:String>
<s:String x:Key="EnableSelectedMods">Aktivieren</s:String>
<s:String x:Key="DisableSelectedMods">Deaktivieren</s:String>

<!-- Resourcepacks-Verwaltung -->
<s:String x:Key="EnabledPacks">Aktivierte Packs</s:String>
<s:String x:Key="SelectResourcepacks">Resourcepacks auswählen</s:String>
<s:String x:Key="DisabledPacks">Deaktivierte Packs</s:String>
<s:String x:Key="OpenPack">Öffnen</s:String>
<!-- ResourcePacks-Verwaltung -->
<s:String x:Key="EnabledResourcePacks">Aktivierte Packs</s:String>
<s:String x:Key="DisabledResourcePacks">Deaktivierte Packs</s:String>
<s:String x:Key="SelectResourcePacks">ResourcePacks auswählen</s:String>
<s:String x:Key="OpenResourcePack">Öffnen</s:String>

<!-- Shaderpacks-Verwaltung -->
<s:String x:Key="AvailableShaderPacks">Aktivierte Shaderpacks</s:String>
<s:String x:Key="SelectShaderPacks">Shaderpacks auswählen</s:String>
<s:String x:Key="EnableShaderPack">Aktivieren</s:String>
<s:String x:Key="OpenShaderPack">Öffnen</s:String>

<!-- Über -->
<s:String x:Key="Dependencies">Abhängigkeiten</s:String>
Expand All @@ -253,8 +257,9 @@
<s:String x:Key="UpdateSuccessful">Update erfolgreich</s:String>

<!-- Gemeinsame -->
<s:String x:Key="AddNew">Neues hinzufügen</s:String>
<s:String x:Key="Hello">Hallo</s:String>
<s:String x:Key="AddNew">Neues hinzufügen</s:String>
<s:String x:Key="CopyFilesOnAdd">Kopieren Sie beim Hinzufügen neuer Dateien, anstatt sie aus dem Quellverzeichnis zu verschieben</s:String>
<s:String x:Key="InstallNew">Neues installieren</s:String>
<s:String x:Key="Reload">Neuladen</s:String>
<s:String x:Key="OpenDir">Ordner öffnen</s:String>
Expand All @@ -269,7 +274,8 @@
<s:String x:Key="ForgeInstall">Forge-Installation</s:String>
<s:String x:Key="FabricInstall">Fabric-Installation</s:String>
<s:String x:Key="Mods">Mods</s:String>
<s:String x:Key="Resourcepacks">Resourcepacks</s:String>
<s:String x:Key="ResourcePacks">Resourcepacks</s:String>
<s:String x:Key="ShaderPacks">Shaderpacks</s:String>
<s:String x:Key="Saves">Speicherstände</s:String>
<s:String x:Key="Skins">Skins</s:String>
<s:String x:Key="About">Über</s:String>
Expand Down
Loading

0 comments on commit 3722b61

Please sign in to comment.