Prepare for public release

This commit is contained in:
Manu
2022-11-06 20:15:35 +01:00
parent 74b5201d61
commit ed6f28be1e
14 changed files with 117 additions and 20 deletions

View File

@@ -20,13 +20,13 @@ namespace SwitchGiftDataManager.CommandLine
Log(msg);
Games game = (Games)int.Parse(Console.ReadLine()!);
if(game is Games.None || game > Games.SCVI)
if (game is Games.None || game > Games.SCVI)
{
Log("Invalid input. Aborted.");
Console.ReadKey();
return;
}
else if(game is Games.SCVI)
else if (game is Games.SCVI)
{
Log("Scarlet and Violet are still not supported by this program. Please wait patiently.");
Console.ReadKey();
@@ -44,7 +44,7 @@ namespace SwitchGiftDataManager.CommandLine
if (File.Exists(path))
bcat.TryAddWondercards(File.ReadAllBytes(path));
else if (CheckValidPath(path))
foreach(var file in Directory.GetFiles(path))
foreach (var file in Directory.GetFiles(path))
if (!bcat.TryAddWondercards(File.ReadAllBytes(file)))
Log($"{file} could not be loaded.");
@@ -58,7 +58,7 @@ namespace SwitchGiftDataManager.CommandLine
bcat.Sort();
Log($"{Environment.NewLine}Enter the source (full) path to your dumped BCAT:");
var sourcepath = Console.ReadLine()!;
if(!CheckValidBcatPath(sourcepath))
if (!CheckValidBcatPath(sourcepath))
{
Log("Not a valid BCAT folder path. Aborted.");
Console.ReadKey();
@@ -74,7 +74,7 @@ namespace SwitchGiftDataManager.CommandLine
return;
}
if (game is not Games.LGPE)
if (game is not (Games.LGPE or Games.BDSP))
{
msg = $"{Environment.NewLine}Select a build option:{Environment.NewLine}{Environment.NewLine}" +
$"1 - Merge as one file{Environment.NewLine}" +
@@ -82,7 +82,12 @@ namespace SwitchGiftDataManager.CommandLine
Log(msg);
}
var opt = game is not Games.LGPE ? int.Parse(Console.ReadLine()!) : 2;
var opt = game switch {
Games.LGPE => 2,
Games.BDSP => 1,
_ => int.Parse(Console.ReadLine()!),
};
if(opt < 1 || opt > 2)
{
Log("Invalid input. Aborted.");

View File

@@ -0,0 +1,12 @@
{
"profiles": {
"SwitchGiftDataManager.CommandLine": {
"commandName": "Project",
"remoteDebugEnabled": false
},
"WSL": {
"commandName": "WSL2",
"distributionName": ""
}
}
}

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Authors>Manu098vm</Authors>
@@ -14,12 +14,17 @@
<PackageProjectUrl>https://github.com/Manu098vm/Switch-Gift-Data-Manager</PackageProjectUrl>
<RepositoryUrl>https://github.com/Manu098vm/Switch-Gift-Data-Manager</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Configurations>Debug;Release;WSL</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='WSL|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup>
<ActiveDebugProfile>SwitchGiftDataManager.CommandLine</ActiveDebugProfile>
</PropertyGroup>
</Project>