Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
# Create Builds
- name: Publish Windows x64 Build
run: dotnet publish -c Release -r win-x64 -o win-x64
- name: Publish Windows ARM Build
run: dotnet publish -c Release -r win-arm -o win-arm
- name: Publish Windows ARM64 Build
run: dotnet publish -c Release -r win-arm64 -o win-arm64
- name: Publish Linux x64 Build
run: dotnet publish -c Release -r linux-x64 -o linux-x64
- name: Publish Linux ARM Build
Expand All @@ -39,6 +43,10 @@ jobs:
# Package Binaries Into 7zip Archives
- name: Archive Windows x64 Build
run: 7z a -t7z -mx=9 Sharpii-Net-Core-${{ github.ref_name }}-Windows.7z /home/runner/work/Sharpii-NetCore/Sharpii-NetCore/win-x64/Sharpii.exe
- name: Archive Windows ARM Build
run: 7z a -t7z -mx=9 Sharpii-Net-Core-${{ github.ref_name }}-Windows-arm.7z /home/runner/work/Sharpii-NetCore/Sharpii-NetCore/win-arm/Sharpii.exe
- name: Archive Windows ARM64 Build
run: 7z a -t7z -mx=9 Sharpii-Net-Core-${{ github.ref_name }}-Windows-arm64.7z /home/runner/work/Sharpii-NetCore/Sharpii-NetCore/win-arm64/Sharpii.exe
- name: Archive Linux x64 Build
run: 7z a -t7z -mx=9 Sharpii-Net-Core-${{ github.ref_name }}-Linux-x64.7z /home/runner/work/Sharpii-NetCore/Sharpii-NetCore/linux-x64/Sharpii
- name: Archive Linux ARM Build
Expand All @@ -62,6 +70,11 @@ jobs:

If you can't open the 7z archive, Use 7-zip on Windows. Most unix-like distros should be able to unpack this with `zip`

> [!IMPORTANT]
> MacOS users may need to run the following command in the directory Sharpii is downloaded to. See [this issue](https://github.com/TheShadowEevee/Sharpii-NetCore/issues/11) for more information.
> `codesign --sign - --force --preserve-metadata=entitlements,requirements,flags,runtime ./Sharpii`
> Please ensure you replace `./Sharpii` with the full name of the downloaded binary.

<details>
<summary>Platform Support and Contribution Info</summary>

Expand All @@ -81,6 +94,8 @@ jobs:
draft: true
files: |
Sharpii-Net-Core-${{ github.ref_name }}-Windows.7z
Sharpii-Net-Core-${{ github.ref_name }}-Windows-arm.7z
Sharpii-Net-Core-${{ github.ref_name }}-Windows-arm64.7z
Sharpii-Net-Core-${{ github.ref_name }}-Linux-x64.7z
Sharpii-Net-Core-${{ github.ref_name }}-Linux-arm.7z
Sharpii-Net-Core-${{ github.ref_name }}-Linux-arm64.7z
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To compile, do the following:

## Issues/Pull Requests

All issues with this version of Sharpii should go in this fork's issue tracker. I will look into any issue whether it's caused by the port or a remenant from the original iteration of Sharpii. Pull requests are appreciated if they fix an issue, but it may take a bit to review.
All issues with this version of Sharpii should go in this fork's issue tracker. I will look into any issue whether it's caused by the port or a remnant from the original iteration of Sharpii. Pull requests are appreciated if they fix an issue, but it may take a bit to review.

## Giving Credit

Expand Down
2 changes: 1 addition & 1 deletion Sharpii.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/TheShadowEevee/Sharpii-NetCore</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Copyright>Copyright (C) 2013 Person66, Copyright (C) 2020-2023 TheShadowEevee and Sharpii-NetCore Contributors</Copyright>
<Copyright>Copyright (C) 2013 Person66, Copyright (C) 2020-2025 TheShadowEevee and Sharpii-NetCore Contributors</Copyright>
</PropertyGroup>

<ItemGroup>
Expand Down
14 changes: 7 additions & 7 deletions Sharpii/BNS.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* This file is part of Sharpii.
* Copyright (C) 2013 Person66
* Copyright (C) 2020-2023 Sharpii-NetCore Contributors
* Copyright (C) 2020-2025 Sharpii-NetCore Contributors
*
* Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -85,7 +85,7 @@
if (BeQuiet.quiet > 2)
Console.Write("Saving wav...");

if (output.Substring(output.Length - 4, 4).ToUpper() != ".WAV")
if (!output.EndsWith(".wav", StringComparison.OrdinalIgnoreCase))
output += ".wav";

WavFile.Save(output);
Expand All @@ -94,11 +94,11 @@
Console.Write("Done!\n");

if (BeQuiet.quiet > 1)
Console.WriteLine("Operation completed succesfully!");
Console.WriteLine("Operation completed successfully!");
}
catch (Exception ex)
{
Console.WriteLine("An unknown error occured, please try again");
Console.WriteLine("An unknown error occurred, please try again");
Console.WriteLine("");
Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
Console.WriteLine("Error: SHARPII_NET_CORE_BNS_UNKNOWN");
Expand All @@ -114,107 +114,107 @@
}
}

private static void To(string[] args)
{
string input = args[2];
string output = args[3];
bool loop = false;
bool mono = false;

//Check if file exists
if (File.Exists(input) == false)
{
Console.WriteLine("ERROR: Unable to open file: {0}", input);
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Error: SHARPII_NET_CORE_BNS_FILE_ERR");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000003);
}
return;
}

for (int i = 1; i < args.Length; i++)
{
switch (args[i].ToUpper())
{
case "-L":
loop = true;
break;
case "-LOOP":
loop = true;
break;
case "-M":
mono = true;
break;
case "-MONO":
mono = true;
break;
}
}

//Run main part, and check for exceptions
try
{
if (BeQuiet.quiet > 2)
Console.Write("Loading file...");

BNS WavFile = new BNS(input);

if (BeQuiet.quiet > 2)
Console.Write("Done!\n");

if (loop == true)
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Applying loop");
WavFile.SetLoop(1);
}
if (mono == true)
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Converting to mono");
WavFile.StereoToMono = true;
}

if (BeQuiet.quiet > 2)
Console.Write("Saving BNS...");

WavFile.Convert();

if (output.Substring(output.Length - 4, 4).ToUpper() != ".BNS")
if (!output.EndsWith(".bns", StringComparison.OrdinalIgnoreCase))
output += ".bns";

WavFile.Save(output);

if (BeQuiet.quiet > 2)
Console.Write("Done!\n");

if (BeQuiet.quiet > 1)
Console.WriteLine("Operation completed succesfully!");
Console.WriteLine("Operation completed successfully!");
}
catch (Exception ex)
{
Console.WriteLine("An unknown error occured, please try again");
Console.WriteLine("An unknown error occurred, please try again");
Console.WriteLine("");
Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
Console.WriteLine("Error: SHARPII_NET_CORE_BNS_UNKNOWN");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E82);
}
else
{
Environment.Exit(0x00000004);
}
return;
}
}

Check notice on line 217 in Sharpii/BNS.cs

View check run for this annotation

codefactor.io / CodeFactor

Sharpii/BNS.cs#L117-L217

Complex Method
public static void Wav2BNS_help()
{
Console.WriteLine("");
Expand Down
18 changes: 9 additions & 9 deletions Sharpii/ERR.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* This file is part of Sharpii.
* Copyright (C) 2013 Person66
* Copyright (C) 2020-2023 Sharpii-NetCore Contributors
* Copyright (C) 2020-2025 Sharpii-NetCore Contributors
*
* Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -23,594 +23,594 @@
partial class ERROR_Stuff
{
public static int ErrCodeFound = 0;
public static void ERROR(string[] args)
{
try
{
if (args[1] == "SHARPII_NET_CORE_BNS_FILE_ERR")
{
Console.WriteLine("");
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the file's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_HBC_FILE_ERR")
{
Console.WriteLine("");
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the file's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}

if (args[1] == "SHARPII_NET_CORE_IOS_FILE_ERR")
{
Console.WriteLine("");
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the file's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}

if (args[1] == "SHARPII_NET_CORE_NUSD_FILE_ERR")
{
Console.WriteLine("");
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the file's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}

if (args[1] == "SHARPII_NET_CORE_TPL_FILE_ERR")
{
Console.WriteLine("");
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the file's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}

if (args[1] == "SHARPII_NET_CORE_U8_FILE_ERR")
{
Console.WriteLine("");
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the file's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_FILE_ERR")
{
Console.WriteLine("");
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the file's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_BNS_UNKNOWN")
{
Console.WriteLine("");
Console.WriteLine("An untracked error has occured.");
Console.WriteLine("An untracked error has occurred.");
Console.WriteLine("Use the error text to self-diagnose.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_HBC_UNKNOWN")
{
Console.WriteLine("");
Console.WriteLine("An untracked error has occured.");
Console.WriteLine("An untracked error has occurred.");
Console.WriteLine("Use the error text to self-diagnose.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_IOS_UNKNOWN")
{
Console.WriteLine("");
Console.WriteLine("An untracked error has occured.");
Console.WriteLine("An untracked error has occurred.");
Console.WriteLine("Use the error text to self-diagnose.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_UNKNOWN")
{
Console.WriteLine("");
Console.WriteLine("An untracked error has occured.");
Console.WriteLine("An untracked error has occurred.");
Console.WriteLine("Use the error text to self-diagnose.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_MAIN_UNKNOWN")
{
Console.WriteLine("");
Console.WriteLine("An untracked error has occured.");
Console.WriteLine("An untracked error has occurred.");
Console.WriteLine("Use the error text to self-diagnose.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_TPL_UNKNOWN")
{
Console.WriteLine("");
Console.WriteLine("An untracked error has occured.");
Console.WriteLine("An untracked error has occurred.");
Console.WriteLine("Use the error text to self-diagnose.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_U8_UNKNOWN")
{
Console.WriteLine("");
Console.WriteLine("An untracked error has occured.");
Console.WriteLine("An untracked error has occurred.");
Console.WriteLine("Use the error text to self-diagnose.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_UNKNOWN")
{
Console.WriteLine("");
Console.WriteLine("An untracked error has occured.");
Console.WriteLine("An untracked error has occurred.");
Console.WriteLine("Use the error text to self-diagnose.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_HBC_NO_IP")
{
Console.WriteLine("");
Console.WriteLine("No IP address was listed for the Wii.");
Console.WriteLine("Furthermore, no IP address is saved from previous uses.");
Console.WriteLine("If this doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_HBC_NO_DOL")
{
Console.WriteLine("");
Console.WriteLine("You used the -DOL flag, but no DOL file was provided.");
Console.WriteLine("Provide the proper DOL file.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_HBC_MISSING_DLL_WADINSTALLER")
{
Console.WriteLine("");
Console.WriteLine("The WadInstaller.dll couldn't be found.");
Console.WriteLine("This error SHOULD NOT APPEAR in this Sharpii port.");
Console.WriteLine("Open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_HBC_NO_IOS")
{
Console.WriteLine("");
Console.WriteLine("You used the -IOS flag, but no IOS was provided.");
Console.WriteLine("Provide a proper IOS.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_HBC_INVALID_IOS")
{
Console.WriteLine("");
Console.WriteLine("You used the -IOS flag, but an invalid IOS was provided.");
Console.WriteLine("Provide a proper IOS.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_HBC_NO_WAD")
{
Console.WriteLine("");
Console.WriteLine("You used the -WAD flag, but no WAD was provided.");
Console.WriteLine("Provide a proper WAD.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_IOS_NO_SLOT")
{
Console.WriteLine("");
Console.WriteLine("You used the -SLOT flag, but no slot was provided.");
Console.WriteLine("Provide a proper slot.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_IOS_INVALID_SLOT")
{
Console.WriteLine("");
Console.WriteLine("You used the -SLOT flag, but an invalid slot was provided.");
Console.WriteLine("Provide a proper slot.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_IOS_NO_VERSION")
{
Console.WriteLine("");
Console.WriteLine("You used the -V flag, but no version was provided.");
Console.WriteLine("Provide a proper version.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_IOS_INVALID_VERSION")
{
Console.WriteLine("");
Console.WriteLine("You used the -V flag, but no version was provided.");
Console.WriteLine("Provide a proper version.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_IOS_NO_OUTPUT")
{
Console.WriteLine("");
Console.WriteLine("You used the -O flag, but no output was provided.");
Console.WriteLine("Provide a proper output.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_NO_VERSION")
{
Console.WriteLine("");
Console.WriteLine("You used the -V flag, but no version was provided.");
Console.WriteLine("Provide a proper version.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_INVALID_VERSION")
{
Console.WriteLine("");
Console.WriteLine("You used the -V flag, but an invalid version was provided.");
Console.WriteLine("Provide a proper version.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_NO_OUTPUT")
{
Console.WriteLine("");
Console.WriteLine("You used the -O flag, but no output was provided.");
Console.WriteLine("Provide a proper output.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_NO_ID")
{
Console.WriteLine("");
Console.WriteLine("You used the -ID flag, but no id was provided.");
Console.WriteLine("Provide a proper id.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_NO_IOS")
{
Console.WriteLine("");
Console.WriteLine("You used the -IOS flag, but no ios was provided.");
Console.WriteLine("Provide a proper ios.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_MAIN_MISSING_DLL_LIBWIISHARP")
{
Console.WriteLine("");
Console.WriteLine("The libWiiSharp.dll couldn't be found.");
Console.WriteLine("This error SHOULD NOT APPEAR in this Sharpii port.");
Console.WriteLine("Open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_MAIN_INVALID_ARG")
{
Console.WriteLine("");
Console.WriteLine("An invalid argument was provided.");
Console.WriteLine("Check the options you are using to start Sharpii.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_TPL_INVALID_ARG")
{
Console.WriteLine("");
Console.WriteLine("An invalid argument was provided.");
Console.WriteLine("Check the options you are using to start Sharpii.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_U8_INVALID_ARG")
{
Console.WriteLine("");
Console.WriteLine("An invalid argument was provided.");
Console.WriteLine("Check the options you are using to start Sharpii.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_INVALID_ARG")
{
Console.WriteLine("");
Console.WriteLine("An invalid argument was provided.");
Console.WriteLine("Check the options you are using to start Sharpii.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_TPL_NO_FORMAT")
{
Console.WriteLine("");
Console.WriteLine("You used the -FORMAT flag, but no format was provided.");
Console.WriteLine("Provide a proper format.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_UNKNOWN_FORMAT")
{
Console.WriteLine("");
Console.WriteLine("You used the -FORMAT flag, but an invalid format was provided.");
Console.WriteLine("Provide a proper format.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_U8_NON_U8")
{
Console.WriteLine("");
Console.WriteLine("The provided file is not a U8 archive.");
Console.WriteLine("Provide a U8 archive.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_U8_FOLDER_ERR")
{
Console.WriteLine("");
Console.WriteLine("Either the folder doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the folders's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_FOLDER_ERR")
{
Console.WriteLine("");
Console.WriteLine("Either the folder doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the folders's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_U8_NO_TITLE")
{
Console.WriteLine("");
Console.WriteLine("You used the -IMET flag, but no title was provided.");
Console.WriteLine("Provide a proper title.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_U8_TWO_HEADERS")
{
Console.WriteLine("");
Console.WriteLine("You used the -IMET and -IMD5 flags, but you can't use two headers.");
Console.WriteLine("Provide only one flag.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_NO_OUTPUT")
{
Console.WriteLine("");
Console.WriteLine("You used the -OUTPUT flag, but no output was provided.");
Console.WriteLine("Provide a proper output.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_NO_ID")
{
Console.WriteLine("");
Console.WriteLine("You used the -ID flag, but no id was provided.");
Console.WriteLine("Provide a proper id.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_SHORT_ID")
{
Console.WriteLine("");
Console.WriteLine("You used the -ID flag, but the provided id was too short to be correct.");
Console.WriteLine("Provide a proper id.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_NO_TYPE")
{
Console.WriteLine("");
Console.WriteLine("You used the -TYPE or -IOS flag, but no type was provided.");
Console.WriteLine("Provide a proper type.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_UNKNOWN_TYPE")
{
Console.WriteLine("");
Console.WriteLine("You used the -TYPE flag, but an unknown type was provided.");
Console.WriteLine("Provide a proper type.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_INVALID_SLOT")
{
Console.WriteLine("");
Console.WriteLine("You used the -IOS flag, but an invalid slot was provided.");
Console.WriteLine("Provide a proper slot.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_NO_TITLE")
{
Console.WriteLine("");
Console.WriteLine("You used the -TITLE flag, but no title was provided.");
Console.WriteLine("Provide a proper title.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_NO_SOUND")
{
Console.WriteLine("");
Console.WriteLine("You used the -SOUND flag, but no wad file to provide sound was provided.");
Console.WriteLine("Provide a proper wad.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_NO_BANNER")
{
Console.WriteLine("");
Console.WriteLine("You used the BANNER flag, but no wad file to provide a banner was provided.");
Console.WriteLine("Provide a proper wad.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_WAD_NO_DOL")
{
Console.WriteLine("");
Console.WriteLine("You used the -DOL flag, but no wad or dol file was provided.");
Console.WriteLine("Provide a proper wad or dol file.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_BAD_ID")
{
Console.WriteLine("");
Console.WriteLine("You used the -ID flag, but an invalid id was provided.");
Console.WriteLine("Provide a proper id.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_MISSING_FILES")
{
Console.WriteLine("");
Console.WriteLine("You need to have all the required .app files, a tmd file, a tik file, and a cert file to pack a wad.");
Console.WriteLine("Ensure all files are present.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_REMOTE_404")
{
Console.WriteLine("");
Console.WriteLine("The remote server returned a 404 error. Check your Title ID.");
Console.WriteLine("If you have a CETK file, please place it in the same directory as Sharpii saves the NUS Files to.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "SHARPII_NET_CORE_NUSD_WEBREQUEST_FAIL")
{
Console.WriteLine("");
Console.WriteLine("A WebRequest Error occurred. This usually means that Sharpii can not properly download and save the file.");
Console.WriteLine("Please ensure you have the proper permissions to use the current folder or files.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (ErrCodeFound != 1)
{
Error_help();
}
}
catch (Exception)
{
Error_help();
}
}

Check notice on line 613 in Sharpii/ERR.cs

View check run for this annotation

codefactor.io / CodeFactor

Sharpii/ERR.cs#L26-L613

Complex Method
public static void Error_help()
{
Console.WriteLine("");
Expand Down
4 changes: 2 additions & 2 deletions Sharpii/EXT.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* This file is part of Sharpii.
* Copyright (C) 2013 Person66
* Copyright (C) 2020-2023 Sharpii-NetCore Contributors
* Copyright (C) 2020-2025 Sharpii-NetCore Contributors
*
* Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -23,346 +23,346 @@
partial class ERRORCODE_Stuff
{
public static int ErrCodeFound = 0;
public static void ERRORCODE(string[] args)
{
try
{
if (args[1] == "0")
{
Console.WriteLine("");
Console.WriteLine("No errors reported/Likely successful exit");
Console.WriteLine("");
}
if (args[1] == "16001")
{
Console.WriteLine("");
Console.WriteLine("File Access Issue/Missing File. (SHARPII_NET_CORE_xxx_FILE_ERR)");
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the file's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}

if (args[1] == "16002")
{
Console.WriteLine("");
Console.WriteLine("Unknown Error/Untracked Error. (SHARPII_NET_CORE_xxx_UNKNOWN)");
Console.WriteLine("An untracked error has occured.");
Console.WriteLine("An untracked error has occurred.");
Console.WriteLine("Use the error text to self-diagnose.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}

if (args[1] == "16003")
{
Console.WriteLine("");
Console.WriteLine("No IP was provided for remote Wii access. (SHARPII_NET_CORE_HBC_NO_IP)");
Console.WriteLine("No IP address was listed for the Wii.");
Console.WriteLine("Furthermore, no IP address is saved from previous uses.");
Console.WriteLine("If this doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16004")
{
Console.WriteLine("DOL Flag was used, but no file provided. (SHARPII_NET_CORE_xxx_NO_DOL)");
Console.WriteLine("You used the -DOL flag, but no DOL file was provided.");
Console.WriteLine("Provide the proper DOL file.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16005")
{
Console.WriteLine("");
Console.WriteLine("A Critical DLL (WadInstaller.dll) couldn't be found. (SHARPII_NET_CORE_HBC_MISSING_DLL_WADINSTALLER)");
Console.WriteLine("The WadInstaller.dll couldn't be found.");
Console.WriteLine("This error SHOULD NOT APPEAR in this Sharpii port.");
Console.WriteLine("Open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16006")
{
Console.WriteLine("");
Console.WriteLine("IOS Flag was used, but no IOS provided. (SHARPII_NET_CORE_xxx_NO_IOS)");
Console.WriteLine("You used the -IOS flag, but no IOS was provided.");
Console.WriteLine("Provide a proper IOS.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16007")
{
Console.WriteLine("");
Console.WriteLine("IOS Flag was used, but an invalid IOS provided. (SHARPII_NET_CORE_xxx_INVALID_IOS)");
Console.WriteLine("You used the -IOS flag, but an invalid IOS was provided.");
Console.WriteLine("Provide a proper IOS.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16008")
{
Console.WriteLine("");
Console.WriteLine("WAD Flag was used, but no wad provided. (SHARPII_NET_CORE_HBC_NO_WAD)");
Console.WriteLine("You used the -WAD flag, but no WAD was provided.");
Console.WriteLine("Provide a proper WAD.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16009")
{
Console.WriteLine("");
Console.WriteLine("Slot Flag was used, but no slot provided. (SHARPII_NET_CORE_IOS_NO_SLOT)");
Console.WriteLine("You used the -SLOT flag, but no slot was provided.");
Console.WriteLine("Provide a proper slot.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16010")
{
Console.WriteLine("");
Console.WriteLine("Slot Flag was used, but an invalid slot provided. (SHARPII_NET_CORE_xxx_INVALID_SLOT)");
Console.WriteLine("You used the -SLOT flag, but an invalid slot was provided.");
Console.WriteLine("Provide a proper slot.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16011")
{
Console.WriteLine("");
Console.WriteLine("V Flag was used, but no version provided. (SHARPII_NET_CORE_xxx_NO_VERSION)");
Console.WriteLine("You used the -V flag, but no version was provided.");
Console.WriteLine("Provide a proper version.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16012")
{
Console.WriteLine("");
Console.WriteLine("V Flag was used, but an invalid version provided. (SHARPII_NET_CORE_xxx_INVALID_VERSION)");
Console.WriteLine("You used the -V flag, but no version was provided.");
Console.WriteLine("Provide a proper version.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16013")
{
Console.WriteLine("");
Console.WriteLine("O Flag was used, but no output provided. (SHARPII_NET_CORE_xxx_NO_OUTPUT)");
Console.WriteLine("You used the -O flag, but no output was provided.");
Console.WriteLine("Provide a proper output.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16014")
{
Console.WriteLine("");
Console.WriteLine("ID Flag was used, but no id provided. (SHARPII_NET_CORE_xxx_NO_ID)");
Console.WriteLine("You used the -ID flag, but no id was provided.");
Console.WriteLine("Provide a proper id.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16015")
{
Console.WriteLine("");
Console.WriteLine("A Critical DLL (libWiiSharp.dll) couldn't be found. (SHARPII_NET_CORE_MAIN_MISSING_DLL_LIBWIISHARP)");
Console.WriteLine("The libWiiSharp.dll couldn't be found.");
Console.WriteLine("This error SHOULD NOT APPEAR in this Sharpii port.");
Console.WriteLine("Open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16016")
{
Console.WriteLine("");
Console.WriteLine("An invalid argument was passed when starting Sharpii. (SHARPII_NET_CORE_xxx_INVALID_ARG)");
Console.WriteLine("An invalid argument was provided.");
Console.WriteLine("Check the options you are using to start Sharpii.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16017")
{
Console.WriteLine("");
Console.WriteLine("FORMAT Flag was used, but no format provided. (SHARPII_NET_CORE_TPL_NO_FORMAT)");
Console.WriteLine("You used the -FORMAT flag, but no format was provided.");
Console.WriteLine("Provide a proper format.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16018")
{
Console.WriteLine("");
Console.WriteLine("FORMAT Flag was used, but invalid format provided. (SHARPII_NET_CORE_TPL_INVALID_FORMAT)");
Console.WriteLine("You used the -FORMAT flag, but an invalid format was provided.");
Console.WriteLine("Provide a proper format.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16019")
{
Console.WriteLine("");
Console.WriteLine("A non U8 archive file was provided. (SHARPII_NET_CORE_U8_NON_U8)");
Console.WriteLine("The provided file is not a U8 archive.");
Console.WriteLine("Provide a U8 archive.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16020")
{
Console.WriteLine("");
Console.WriteLine("Folder Access Issue/Missing Folder. (SHARPII_NET_CORE_xxx_FOLDER_ERR)");
Console.WriteLine("Either the folder doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Check the folders's permissions and that it's in the right place.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16021")
{
Console.WriteLine("");
Console.WriteLine("IMET Flag was used, but no title provided. (SHARPII_NET_CORE_xxx_NO_TITLE");
Console.WriteLine("You used the -IMET flag, but no title was provided.");
Console.WriteLine("Provide a proper title.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16022")
{
Console.WriteLine("");
Console.WriteLine("IMET and IMD5 Flags were used, but only one can be used. (SHARPII_NET_CORE_U8_TWO_HEADERS");
Console.WriteLine("You used the -IMET and -IMD5 flags, but you can't use two headers.");
Console.WriteLine("Provide only one flag.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16023")
{
Console.WriteLine("");
Console.WriteLine("ID Flag was used, but short ID provided. (SHARPII_NET_CORE_WAD_SHORT_ID)");
Console.WriteLine("You used the -ID flag, but the provided id was too short to be correct.");
Console.WriteLine("Provide a proper id.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16024")
{
Console.WriteLine("");
Console.WriteLine("TYPE or IOS Flag used, but no type provided. (SHARPII_NET_CORE_WAD_NO_TYPE)");
Console.WriteLine("You used the -TYPE or -IOS flag, but no type was provided.");
Console.WriteLine("Provide a proper type.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16025")
{
Console.WriteLine("");
Console.WriteLine("TYPE or IOS Flag used, but provided type unknown. (SHARPII_NET_CORE_WAD_UNKNOWN_TYPE)");
Console.WriteLine("You used the -TYPE flag, but an unknown type was provided.");
Console.WriteLine("Provide a proper type.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16026")
{
Console.WriteLine("");
Console.WriteLine("SOUND Flag used, but no wad provided. (SHARPII_NET_CORE_WAD_NO_SOUND)");
Console.WriteLine("You used the -SOUND flag, but no wad file to provide sound was provided.");
Console.WriteLine("Provide a proper wad.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16027")
{
Console.WriteLine("");
Console.WriteLine("BANNER Flag used, but no wad provided. (SHARPII_NET_CORE_WAD_NO_BANNER)");
Console.WriteLine("You used the BANNER flag, but no wad file to provide a banner was provided.");
Console.WriteLine("Provide a proper wad.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16028")
{
Console.WriteLine("");
Console.WriteLine("ID Flag was used, but invalid id provided. (SHARPII_NET_CORE_xxx_BAD_ID)");
Console.WriteLine("You used the -ID flag, but an invalid id was provided.");
Console.WriteLine("Provide a proper id.");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (args[1] == "16029")
{
Console.WriteLine("");
Console.WriteLine("Not all files needed to pack a wad are present. (SHARPII_NET_CORE_NUSD_MISSING_FILES)");
Console.WriteLine("You need to have all the required .app files, a tmd file, a tik file, and a cert file to pack a wad.");
Console.WriteLine("Ensure all files are present");
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
Console.WriteLine("");
ErrCodeFound = 1;
}
if (ErrCodeFound != 1)
{
ExitCode_help();
}
}
catch (Exception)
{
ExitCode_help();
}
}

Check notice on line 365 in Sharpii/EXT.cs

View check run for this annotation

codefactor.io / CodeFactor

Sharpii/EXT.cs#L26-L365

Complex Method
public static void ExitCode_help()
{
Console.WriteLine("");
Expand Down
4 changes: 2 additions & 2 deletions Sharpii/Exit Codes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Check the file's permissions and that it's in the right place.

Exit Code: 16002/4
Unknown Error/Untracked Error. (SHARPII_NET_CORE_xxx_UNKNOWN)
An untracked error has occured.
An untracked error has occurred.
Use the error text to self-diagnose.

Exit Code: 16003/5
Expand Down Expand Up @@ -162,6 +162,6 @@ If you have a CETK file, please place it in the same directory as Sharpii saves
The server may also actually be having issues.

Exit Code: 16031/33
A WebRequest Error has occured and stopped a NUS download. (SHARPII_NET_CORE_NUSD_WEBREQUEST_FAIL)
A WebRequest Error has occurred and stopped a NUS download. (SHARPII_NET_CORE_NUSD_WEBREQUEST_FAIL)
A WebRequest Error occurred. This usually means that Sharpii can not properly download and save the file.
Please ensure you have the proper permissions to use the current folder or files.
14 changes: 6 additions & 8 deletions Sharpii/HBC.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* This file is part of Sharpii.
/* This file is part of Sharpii.
* Copyright (C) 2013 Person66
* Copyright (C) 2020-2023 Sharpii-NetCore Contributors
* Copyright (C) 2020-2025 Sharpii-NetCore Contributors
*
* Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -24,189 +24,188 @@
{
partial class HBC_Stuff
{
public static void SendDol(string[] args)
{
if (args.Length < 2)
{
SendDol_help();
return;
}
if (args[1].ToUpper() == "-H" || args[1].ToUpper() == "-HELP")
{
SendDol_help();
return;
}
string input = "";
string ip = "";
string protocol = "JODI";
string arguments = "";
bool compress = true;
bool saveip = false;
bool noip = true;

//Get parameters
for (int i = 1; i < args.Length; i++)
{
switch (args[i].ToUpper())
{
case "-IP":
if (i + 1 >= args.Length)
{
Console.WriteLine("ERROR: No ip set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E83);
}
else
{
Environment.Exit(0x00000005);
}
return;
}
ip = args[i + 1];
noip = false;
break;
case "-SAVEIP":
saveip = true;
break;
case "-DOL":
if (i + 1 >= args.Length)
{
Console.WriteLine("ERROR: No dol set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_DOL");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E84);
}
else
{
Environment.Exit(0x00000006);
}
return;
}
input = args[i + 1];
//Check if file exists
if (File.Exists(input) == false)
{
Console.WriteLine("ERROR: Unable to open file: {0}", input);
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_FILE_ERR");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000003);
}
return;
}

if (i + 1 < args.Length)
{
for (int n = i + 2; n < args.Length; n++)
{
arguments += "\x0000";
arguments += args[n];
}
}
break;
case "-NOCOMP":
compress = false;
break;
case "-OLD":
protocol = "HAXX";
break;
}
}

//Run main part, and check for exceptions
try
{
if (ip != "" && saveip == true)
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Saving IP");
Environment.SetEnvironmentVariable("SharpiiIP", ip, EnvironmentVariableTarget.Machine);
}

if (String.IsNullOrEmpty(ip))
ip = Environment.GetEnvironmentVariable("SharpiiIP", EnvironmentVariableTarget.User);
if (String.IsNullOrEmpty(ip))
ip = Environment.GetEnvironmentVariable("SharpiiIP", EnvironmentVariableTarget.Machine);
if (String.IsNullOrEmpty(ip))
{
Console.WriteLine("ERROR: No IP set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E82);
}
else
{
Environment.Exit(0x00000005);
}
return;
}
if (noip == true && BeQuiet.quiet > 2)
Console.WriteLine("No IP set, using {0}", ip);

libWiiSharp.Protocol proto = Protocol.JODI;

if (BeQuiet.quiet > 2 && protocol == "HAXX")
Console.WriteLine("Using old protocol");

if (protocol == "HAXX")
proto = Protocol.HAXX;

if (BeQuiet.quiet > 2)
Console.Write("Loading File...");

HbcTransmitter file = new HbcTransmitter(proto, ip);

if (BeQuiet.quiet > 2)
Console.Write("Done!\n");


if (BeQuiet.quiet > 2 && compress == true)
Console.Write("Compressing File...");

file.Compress = compress;

if (BeQuiet.quiet > 2 && compress == true)
Console.Write("Done!\n");

if (BeQuiet.quiet > 1)
Console.Write("Sending file...");

file.TransmitFile(Path.GetFileName(input) + arguments, File.ReadAllBytes(input));

if (BeQuiet.quiet > 1)
Console.Write("Done!\n");
}
catch (Exception ex)
{
Console.WriteLine("An unknown error occured, please try again");
Console.WriteLine("An unknown error occurred, please try again");
Console.WriteLine("");
Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_UNKNOWN");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000004);
}
return;
}

return;

}

public static bool SendWad_Check(string[] args)

Check notice on line 208 in Sharpii/HBC.cs

View check run for this annotation

codefactor.io / CodeFactor

Sharpii/HBC.cs#L27-L208

Complex Method
{
if (args.Length < 2)
{
Expand All @@ -223,199 +222,198 @@
}

public static void SendWad(string[] args)
{
string input = "";
string ip = "";
string ios = "";
string protocol = "JODI";
bool ahb = false;
bool saveip = false;
bool noip = true;

//Get parameters
for (int i = 1; i < args.Length; i++)
{
switch (args[i].ToUpper())
{
case "-IOS":
if (i + 1 >= args.Length)
{
Console.WriteLine("ERROR: No ios set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IOS");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E86);
}
else
{
Environment.Exit(0x00000008);
}
return;
}
ios = args[i + 1];
if (!(Convert.ToInt32(ios) >= 3 && Convert.ToInt32(ios) <= 255))
{
Console.WriteLine("ERROR: Invalid IOS number");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_INVALID_IOS");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E87);
}
else
{
Environment.Exit(0x00000009);
}
return;
}
break;
case "-AHB":
ahb = true;
break;
case "-IP":
if (i + 1 >= args.Length)
{
Console.WriteLine("ERROR: No ip set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E83);
}
else
{
Environment.Exit(0x00000005);
}
return;
}
ip = args[i + 1];
noip = false;
break;
case "-SAVEIP":
saveip = true;
break;
case "-WAD":
if (i + 1 >= args.Length)
{
Console.WriteLine("ERROR: No WAD set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_WAD");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E88);
}
else
{
Environment.Exit(0x0000000A);
}
return;
}
input = args[i + 1];
//Check if file exists
if (File.Exists(input) == false)
{
Console.WriteLine("ERROR: Unable to open file: {0}", input);
Console.WriteLine("Error: SHARPII_NET_CORE_BNS_FILE_ERR");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000003);
}
return;
}
break;
case "-OLD":
protocol = "HAXX";
break;
}
}

//Run main part, and check for exceptions
try
{
if (ip != "" && saveip == true)
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Saving IP");
Environment.SetEnvironmentVariable("SharpiiIP", ip, EnvironmentVariableTarget.Machine);
}

if (ahb == true || ios == "")
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Using AHBPROT");
ios = "0";
}

if (String.IsNullOrEmpty(ip))
ip = Environment.GetEnvironmentVariable("SharpiiIP", EnvironmentVariableTarget.User);
if (String.IsNullOrEmpty(ip))
ip = Environment.GetEnvironmentVariable("SharpiiIP", EnvironmentVariableTarget.Machine);
if (String.IsNullOrEmpty(ip))
{
Console.WriteLine("ERROR: No IP set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E83);
}
else
{
Environment.Exit(0x00000005);
}
return;
}
if (noip == true && BeQuiet.quiet > 2)
Console.WriteLine("No IP set, using {0}", ip);

libWiiSharp.Protocol proto = Protocol.JODI;

if (BeQuiet.quiet > 2 && protocol == "HAXX")
Console.WriteLine("Using old protocol");

if (protocol == "HAXX")
proto = Protocol.HAXX;

if (BeQuiet.quiet > 2)
Console.Write("Loading File...");

HbcTransmitter file = new HbcTransmitter(proto, ip);
byte[] Installer = WadInstaller.InstallerHelper.CreateInstaller(input, (byte)Convert.ToInt32(ios)).ToArray();

if (BeQuiet.quiet > 2)
Console.Write("Done!\n");

if (BeQuiet.quiet > 1)
Console.Write("Sending file...");

file.TransmitFile("WadInstaller.dol", Installer);

if (BeQuiet.quiet > 1)
Console.Write("Done!\n");
}
catch (Exception ex)
{
Console.WriteLine("An unknown error occured, please try again");
Console.WriteLine("An unknown error occurred, please try again");
Console.WriteLine("");
Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_UNKNOWN");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E82);
}
else
{
Environment.Exit(0x00000004);
}
return;
}

return;

}

private static void SendDol_help()
{

Check notice on line 416 in Sharpii/HBC.cs

View check run for this annotation

codefactor.io / CodeFactor

Sharpii/HBC.cs#L225-L416

Complex Method
Console.WriteLine("");
Console.WriteLine("Sharpii {0} - Ported and Maintained by TheShadowEevee, originally by person66", ProgramVersion.version);
Console.WriteLine("Using a modified version of libWiiSharp, originally made by leathl");
Expand Down Expand Up @@ -450,14 +448,14 @@
Console.WriteLine("");
Console.WriteLine(" Usage:");
Console.WriteLine("");
Console.WriteLine(" ./Sharpii SendWad -ip ip_adress -wad file [-ios IOS | -ahb] [-old]");
Console.WriteLine(" ./Sharpii SendWad -ip ip_address -wad file [-ios IOS | -ahb] [-old]");
Console.WriteLine(" [-nocomp] [-saveip]");
Console.WriteLine("");
Console.WriteLine("");
Console.WriteLine(" Arguments:");
Console.WriteLine("");
Console.WriteLine(" -dol file The dol file to send");
Console.WriteLine(" -ip ip_adress The IP address of your wii");
Console.WriteLine(" -ip ip_address The IP address of your wii");
Console.WriteLine(" -ios ios The ios to use to install the wad");
Console.WriteLine(" -ahb Use HW_AHBPROT to install the wad");
Console.WriteLine(" -saveip Save entered IP address for future use");
Expand Down
11 changes: 5 additions & 6 deletions Sharpii/IOS.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* This file is part of Sharpii.
/* This file is part of Sharpii.
* Copyright (C) 2013 Person66
* Copyright (C) 2020-2023 Sharpii-NetCore Contributors
* Copyright (C) 2020-2025 Sharpii-NetCore Contributors
*
* Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -24,329 +24,328 @@
{
partial class IOS_Stuff
{
public static void IOS(string[] args)
{
if (args.Length < 3)
{
IOS_help();
return;
}
string input = args[1];
string output = "";
bool fs = false;
bool es = false;
bool np = false;
bool vp = false;
int slot = -1;
int version = -1;

//Check if file exists
if (File.Exists(input) == false)
{
Console.WriteLine("ERROR: Unable to open file: {0}", input);
Console.WriteLine("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_FILE_ERR");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000003);
}
return;
}

//Get parameters
for (int i = 1; i < args.Length; i++)
{
switch (args[i].ToUpper())
{
case "-FS":
fs = true;
break;
case "-ES":
es = true;
break;
case "-NP":
np = true;
break;
case "-VP":
vp = true;
break;
case "-SLOT":
if (i + 1 >= args.Length)
{
Console.WriteLine("ERROR: No slot set");
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_SLOT");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E89);
}
else
{
Environment.Exit(0x0000000B);
}
return;
}
if (!int.TryParse(args[i + 1], out slot))
{
Console.WriteLine("Invalid slot {0}...", args[i + 1]);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8A);
}
else
{
Environment.Exit(0x0000000C);
}
return;
}
if (slot < 3 || slot > 255)
{
Console.WriteLine("Invalid slot {0}...", slot);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8A);
}
else
{
Environment.Exit(0x0000000C);
}
return;
}
break;
case "-S":
if (i + 1 >= args.Length)
{
Console.WriteLine("ERROR: No slot set");
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_SLOT");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E89);
}
else
{
Environment.Exit(0x0000000B);
}
return;
}
if (!int.TryParse(args[i + 1], out slot))
{
Console.WriteLine("Invalid slot {0}...", args[i + 1]);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8A);
}
else
{
Environment.Exit(0x0000000C);
}
return;
}
if (slot < 3 || slot > 255)
{
Console.WriteLine("Invalid slot {0}...", slot);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8A);
}
else
{
Environment.Exit(0x0000000C);
}
return;
}
break;
case "-V":
if (i + 1 >= args.Length)
{
Console.WriteLine("ERROR: No version set");
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_VERSION");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8B);
}
else
{
Environment.Exit(0x0000000D);
}
return;
}
if (!int.TryParse(args[i + 1], out version))
{
Console.WriteLine("Invalid version {0}...", args[i + 1]);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8C);
}
else
{
Environment.Exit(0x0000000E);
}
return;
}
if (version < 0 || version > 65535)
{
Console.WriteLine("Invalid version {0}...", version);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8C);
}
else
{
Environment.Exit(0x0000000E);
}
return;
}
break;
case "-O":
if (i + 1 >= args.Length)
{
Console.WriteLine("ERROR: No output set");
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_OUTPUT");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8D);
}
else
{
Environment.Exit(0x0000000F);
}
return;
}
output = args[i + 1];
break;
}
}

//Main part (most of it was borrowed from PatchIOS)
try
{
WAD ios = new WAD
{
KeepOriginalFooter = true
};

if (BeQuiet.quiet > 2)
Console.Write("Loading File...");

ios.LoadFile(input);

if (BeQuiet.quiet > 2)
Console.Write("Done!\n");

//Check if WAD is an IOS
if ((ios.TitleID >> 32) != 1 || (ios.TitleID & 0xffffffff) > 255 || (ios.TitleID & 0xffffffff) < 3)
{
Console.WriteLine("Only IOS WADs can be patched...");
return;
}

IosPatcher patcher = new IosPatcher();

patcher.LoadIOS(ref ios);

//apply patches
if (fs == true)
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Applying Fakesigning patch");
patcher.PatchFakeSigning();
}

if (es == true)
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Applying ES_Identify patch");
patcher.PatchEsIdentify();
}

if (np == true)
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Applying NAND permissions patch");
patcher.PatchNandPermissions();
}

if (vp == true)
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Applying Version patch");
patcher.PatchVP();
}

if (slot > -1 || version > -1)
ios.FakeSign = true;

if (slot > -1)
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Changing IOS slot to: {0}", slot);
ios.TitleID = (ulong)((1UL << 32) | (uint)slot);
}

if (version > -1)
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Changing title version to: {0}", version);
ios.TitleVersion = (ushort)version;
}

//check if output was set
if (output != "")
{
if (BeQuiet.quiet > 2)
Console.WriteLine("Saving to file: {0}", output);
ios.Save(output);
}
else
{
if (BeQuiet.quiet > 2)
Console.Write("Saving file...");

if (output != "")
{
if (output.Substring(output.Length - 4, 4).ToUpper() != ".WAD")
if (!output.EndsWith(".wad", StringComparison.OrdinalIgnoreCase))
output += ".wad";
}

ios.Save(input);

if (BeQuiet.quiet > 2)
Console.Write("Done!\n");
}
if (BeQuiet.quiet > 1)
Console.WriteLine("Operation completed succesfully!");
Console.WriteLine("Operation completed successfully!");
}
catch (Exception ex)
{
Console.WriteLine("An unknown error occured, please try again");
Console.WriteLine("An unknown error occurred, please try again");
Console.WriteLine("");
Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_UNKNOWN");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E82);
}
else
{
Environment.Exit(0x00000004);
}
return;
}

return;

}

public static void IOS_help()

Check warning on line 348 in Sharpii/IOS.cs

View check run for this annotation

codefactor.io / CodeFactor

Sharpii/IOS.cs#L27-L348

Very Complex Method
{
Console.WriteLine("");
Console.WriteLine("Sharpii .Net Core v{0} - Ported and Maintained by TheShadowEevee, originally by person66", ProgramVersion.version);
Expand Down
Loading
Loading