From e5ca02d52a0d6b373508cb85056b54dd378067aa Mon Sep 17 00:00:00 2001 From: TheShadowEevee Date: Wed, 30 Jul 2025 19:41:42 -0700 Subject: [PATCH 1/5] Use .EndsWith instead of manually grabbing last 4 characters of a string when saving files --- Sharpii/BNS.cs | 4 ++-- Sharpii/IOS.cs | 2 +- Sharpii/NUSD.cs | 7 ++++++- Sharpii/TPL.cs | 2 +- Sharpii/WAD.cs | 8 ++++---- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Sharpii/BNS.cs b/Sharpii/BNS.cs index 1d3159c..c35912d 100644 --- a/Sharpii/BNS.cs +++ b/Sharpii/BNS.cs @@ -85,7 +85,7 @@ private static void From(string[] args) 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); @@ -186,7 +186,7 @@ private static void To(string[] args) WavFile.Convert(); - if (output.Substring(output.Length - 4, 4).ToUpper() != ".BNS") + if (!output.EndsWith(".bns", StringComparison.OrdinalIgnoreCase)) output += ".bns"; WavFile.Save(output); diff --git a/Sharpii/IOS.cs b/Sharpii/IOS.cs index 34bbd8a..4cfd856 100644 --- a/Sharpii/IOS.cs +++ b/Sharpii/IOS.cs @@ -313,7 +313,7 @@ public static void IOS(string[] args) if (output != "") { - if (output.Substring(output.Length - 4, 4).ToUpper() != ".WAD") + if (!output.EndsWith(".wad", StringComparison.OrdinalIgnoreCase)) output += ".wad"; } diff --git a/Sharpii/NUSD.cs b/Sharpii/NUSD.cs index 87d91be..ef0825a 100644 --- a/Sharpii/NUSD.cs +++ b/Sharpii/NUSD.cs @@ -385,7 +385,12 @@ public static void NUS(string[] args) if (id.Length == 16 && Convert.ToInt32(id.Substring(14, 2), 16) >= 3 && Convert.ToInt32(id.Substring(14, 2), 16) <= 255 && id.Substring(0, 14) == "00000001000000") ios = "IOS" + Convert.ToInt32(id.Substring(14, 2), 16) + "-64-" + version + ".wad"; - if ((((output.Length >= 4 && output.Substring(output.Length - 4, 4).ToUpper() == ".WAD") || output == "") && Array.IndexOf(store.ToArray(), StoreType.WAD) != -1 && store.ToArray().Length == 1) || (output == "" && ios != "" && Array.IndexOf(store.ToArray(), StoreType.WAD) != -1 && store.ToArray().Length == 1)) + bool isWadOutput = output.EndsWith(".wad", StringComparison.OrdinalIgnoreCase); + bool isOutputEmpty = string.IsNullOrEmpty(output); + bool hasOnlyWadStore = store.Count == 1 && store.Contains(StoreType.WAD); + bool hasIos = !string.IsNullOrEmpty(ios); + + if (((isWadOutput || isOutputEmpty) && hasOnlyWadStore) || (isOutputEmpty && hasIos && hasOnlyWadStore)) { wad = true; if (Directory.Exists(temp) == true) diff --git a/Sharpii/TPL.cs b/Sharpii/TPL.cs index 45c570d..ad4e7da 100644 --- a/Sharpii/TPL.cs +++ b/Sharpii/TPL.cs @@ -237,7 +237,7 @@ private static void To(string[] args) if (BeQuiet.quiet > 2) Console.Write("Saving tpl file..."); - if (output.Substring(output.Length - 4, 4).ToUpper() != ".TPL") + if (!output.EndsWith(".tpl", StringComparison.OrdinalIgnoreCase)) output += ".tpl"; tplfile.Save(output); diff --git a/Sharpii/WAD.cs b/Sharpii/WAD.cs index 85b888a..98cbeee 100644 --- a/Sharpii/WAD.cs +++ b/Sharpii/WAD.cs @@ -203,8 +203,8 @@ private static void Info(string[] args) if (BeQuiet.quiet > 2) Console.Write("Saving file..."); - if (output.Substring(output.Length - 4, 4).ToUpper() != ".TXT") - output += ".txt"; + if (!output.EndsWith(".txt", StringComparison.OrdinalIgnoreCase)) + output += ".txt"; TextWriter txt = new StreamWriter(output); txt.WriteLine("WAD Info:"); @@ -642,7 +642,7 @@ private static void Editor(string[] args, bool edit) if (BeQuiet.quiet > 2) Console.Write("Grabbing dol..."); - if (app.Substring(app.Length - 4, 4) == ".dol") + if (app.EndsWith(".dol", StringComparison.OrdinalIgnoreCase)) { Directory.CreateDirectory(Path.Combine(temp, "dol")); File.Copy(app, Path.Combine(temp, "dol", "00000001.app")); @@ -722,7 +722,7 @@ private static void Editor(string[] args, bool edit) if (BeQuiet.quiet > 2) Console.Write("Saving file..."); - if (output.Substring(output.Length - 4, 4).ToUpper() != ".WAD") + if (!output.EndsWith(".wad", StringComparison.OrdinalIgnoreCase)) output += ".wad"; wad.Save(output); From b65c0e16b936afc5204a1fb77c41e4372ab7523c Mon Sep 17 00:00:00 2001 From: TheShadowEevee Date: Wed, 30 Jul 2025 19:46:06 -0700 Subject: [PATCH 2/5] Spelling Pass --- Sharpii/BNS.cs | 8 ++++---- Sharpii/ERR.cs | 16 ++++++++-------- Sharpii/EXT.cs | 2 +- Sharpii/Exit Codes.txt | 4 ++-- Sharpii/HBC.cs | 8 ++++---- Sharpii/IOS.cs | 4 ++-- Sharpii/NUSD.cs | 6 +++--- Sharpii/TPL.cs | 10 +++++----- Sharpii/U8.cs | 12 ++++++------ Sharpii/WAD.cs | 14 +++++++------- 10 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Sharpii/BNS.cs b/Sharpii/BNS.cs index c35912d..cbcc3b1 100644 --- a/Sharpii/BNS.cs +++ b/Sharpii/BNS.cs @@ -94,11 +94,11 @@ private static void From(string[] args) 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"); @@ -195,11 +195,11 @@ private static void To(string[] args) 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"); diff --git a/Sharpii/ERR.cs b/Sharpii/ERR.cs index dc5d2a1..2f16542 100644 --- a/Sharpii/ERR.cs +++ b/Sharpii/ERR.cs @@ -104,7 +104,7 @@ public static void ERROR(string[] args) 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"); @@ -114,7 +114,7 @@ public static void ERROR(string[] args) 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"); @@ -124,7 +124,7 @@ public static void ERROR(string[] args) 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"); @@ -134,7 +134,7 @@ public static void ERROR(string[] args) 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"); @@ -144,7 +144,7 @@ public static void ERROR(string[] args) 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"); @@ -154,7 +154,7 @@ public static void ERROR(string[] args) 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"); @@ -164,7 +164,7 @@ public static void ERROR(string[] args) 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"); @@ -174,7 +174,7 @@ public static void ERROR(string[] args) 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"); diff --git a/Sharpii/EXT.cs b/Sharpii/EXT.cs index 3645462..cd171b8 100644 --- a/Sharpii/EXT.cs +++ b/Sharpii/EXT.cs @@ -49,7 +49,7 @@ public static void ERRORCODE(string[] args) { 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"); diff --git a/Sharpii/Exit Codes.txt b/Sharpii/Exit Codes.txt index af357e6..e37ff10 100644 --- a/Sharpii/Exit Codes.txt +++ b/Sharpii/Exit Codes.txt @@ -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 @@ -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. \ No newline at end of file diff --git a/Sharpii/HBC.cs b/Sharpii/HBC.cs index 4bab83b..7c734d2 100644 --- a/Sharpii/HBC.cs +++ b/Sharpii/HBC.cs @@ -187,7 +187,7 @@ public static void SendDol(string[] args) } 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"); @@ -395,7 +395,7 @@ public static void SendWad(string[] args) } 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"); @@ -450,14 +450,14 @@ public static void SendWad_help() 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"); diff --git a/Sharpii/IOS.cs b/Sharpii/IOS.cs index 4cfd856..ad6728f 100644 --- a/Sharpii/IOS.cs +++ b/Sharpii/IOS.cs @@ -323,11 +323,11 @@ public static void IOS(string[] args) 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"); diff --git a/Sharpii/NUSD.cs b/Sharpii/NUSD.cs index ef0825a..4ece244 100644 --- a/Sharpii/NUSD.cs +++ b/Sharpii/NUSD.cs @@ -357,7 +357,7 @@ public static void NUS(string[] args) } if (ExceptionListRan == 0) { - 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_NUSD_UNKNOWN"); @@ -471,7 +471,7 @@ public static void NUS(string[] args) } if (BeQuiet.quiet > 1) - Console.WriteLine("Operation completed succesfully!\n"); + Console.WriteLine("Operation completed successfully!\n"); } catch (Exception ex) { @@ -527,7 +527,7 @@ public static void NUS(string[] args) } if (ExceptionListRan == 0) { - 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_NUSD_UNKNOWN"); diff --git a/Sharpii/TPL.cs b/Sharpii/TPL.cs index ad4e7da..7300e41 100644 --- a/Sharpii/TPL.cs +++ b/Sharpii/TPL.cs @@ -46,7 +46,7 @@ public static void TPL(string[] args) return; } - //If tuser gets here, they entered something wrong + //If the user gets here, they entered something wrong Console.WriteLine("ERROR: The argument {0} is invalid", args[1]); Console.WriteLine("Error: SHARPII_NET_CORE_TPL_INVALID_ARG"); if (OperatingSystem.Windows()) @@ -105,11 +105,11 @@ private static void From(string[] args) 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_TPL_UNKNOWN"); @@ -246,11 +246,11 @@ private static void To(string[] args) 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_TPL_UNKNOWN"); diff --git a/Sharpii/U8.cs b/Sharpii/U8.cs index acded90..15a9547 100644 --- a/Sharpii/U8.cs +++ b/Sharpii/U8.cs @@ -46,7 +46,7 @@ public static void U8(string[] args) return; } - //If tuser gets here, they entered something wrong + //If the user gets here, they entered something wrong Console.WriteLine("ERROR: The argument {0} is invalid", args[1]); Console.WriteLine("Error: SHARPII_NET_CORE_U8_INVALID_ARG"); if (OperatingSystem.Windows()) @@ -113,11 +113,11 @@ private static void Unpack(string[] args) 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_U8_UNKNOWN"); @@ -233,7 +233,7 @@ private static void Pack(string[] args) if (lz77 == true) { - //Yeah, I know this isnt where it actually compresses it + //Yeah, I know this isn't where it actually compresses it if (BeQuiet.quiet > 2) Console.WriteLine("Compressing U8 archive"); U8folder.Lz77Compress = true; @@ -245,11 +245,11 @@ private static void Pack(string[] args) U8folder.Save(output); 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_U8_UNKNOWN"); diff --git a/Sharpii/WAD.cs b/Sharpii/WAD.cs index 98cbeee..a4386ef 100644 --- a/Sharpii/WAD.cs +++ b/Sharpii/WAD.cs @@ -79,7 +79,7 @@ public static void WAD(string[] args) return; } - //If tuser gets here, they entered something wrong + //If the user gets here, they entered something wrong Console.WriteLine("ERROR: The argument {0} is invalid", args[1]); Console.WriteLine("Error: SHARPII_NET_CORE_WAD_INVALID_ARG"); if (OperatingSystem.Windows()) @@ -235,12 +235,12 @@ private static void Info(string[] args) 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_WAD_UNKNOWN"); @@ -731,7 +731,7 @@ private static void Editor(string[] args, bool edit) Console.Write("Done!\n"); if (BeQuiet.quiet > 1) - Console.WriteLine("Operation completed succesfully!"); + Console.WriteLine("Operation completed successfully!"); } catch (Exception ex) { @@ -752,7 +752,7 @@ private static void Editor(string[] args, bool edit) } if (ExceptionListRan == 0) { - 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_WAD_UNKNOWN"); @@ -825,11 +825,11 @@ private static void Unpack(string[] args) 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_WAD_UNKNOWN"); From 031d893c7c9770ef1abe8a2ff26d39fb506cc2ee Mon Sep 17 00:00:00 2001 From: TheShadowEevee Date: Wed, 30 Jul 2025 19:47:25 -0700 Subject: [PATCH 3/5] Boilerplate Year Update --- README.md | 2 +- Sharpii.csproj | 2 +- Sharpii/BNS.cs | 2 +- Sharpii/ERR.cs | 2 +- Sharpii/EXT.cs | 2 +- Sharpii/HBC.cs | 2 +- Sharpii/IOS.cs | 2 +- Sharpii/NUSD.cs | 2 +- Sharpii/Program.cs | 2 +- Sharpii/TPL.cs | 2 +- Sharpii/U8.cs | 2 +- Sharpii/WAD.cs | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e5aa662..8263467 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/Sharpii.csproj b/Sharpii.csproj index d6d9375..3d2ab41 100644 --- a/Sharpii.csproj +++ b/Sharpii.csproj @@ -11,7 +11,7 @@ README.md https://github.com/TheShadowEevee/Sharpii-NetCore git - Copyright (C) 2013 Person66, Copyright (C) 2020-2023 TheShadowEevee and Sharpii-NetCore Contributors + Copyright (C) 2013 Person66, Copyright (C) 2020-2025 TheShadowEevee and Sharpii-NetCore Contributors diff --git a/Sharpii/BNS.cs b/Sharpii/BNS.cs index cbcc3b1..4426a28 100644 --- a/Sharpii/BNS.cs +++ b/Sharpii/BNS.cs @@ -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 diff --git a/Sharpii/ERR.cs b/Sharpii/ERR.cs index 2f16542..da7f506 100644 --- a/Sharpii/ERR.cs +++ b/Sharpii/ERR.cs @@ -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 diff --git a/Sharpii/EXT.cs b/Sharpii/EXT.cs index cd171b8..9a63ec6 100644 --- a/Sharpii/EXT.cs +++ b/Sharpii/EXT.cs @@ -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 diff --git a/Sharpii/HBC.cs b/Sharpii/HBC.cs index 7c734d2..ad2dce4 100644 --- a/Sharpii/HBC.cs +++ b/Sharpii/HBC.cs @@ -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 diff --git a/Sharpii/IOS.cs b/Sharpii/IOS.cs index ad6728f..0f43b86 100644 --- a/Sharpii/IOS.cs +++ b/Sharpii/IOS.cs @@ -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 diff --git a/Sharpii/NUSD.cs b/Sharpii/NUSD.cs index 4ece244..b87677a 100644 --- a/Sharpii/NUSD.cs +++ b/Sharpii/NUSD.cs @@ -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 diff --git a/Sharpii/Program.cs b/Sharpii/Program.cs index 9d547af..b8f9c3d 100644 --- a/Sharpii/Program.cs +++ b/Sharpii/Program.cs @@ -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 diff --git a/Sharpii/TPL.cs b/Sharpii/TPL.cs index 7300e41..5a3a293 100644 --- a/Sharpii/TPL.cs +++ b/Sharpii/TPL.cs @@ -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 diff --git a/Sharpii/U8.cs b/Sharpii/U8.cs index 15a9547..1e03f5f 100644 --- a/Sharpii/U8.cs +++ b/Sharpii/U8.cs @@ -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 diff --git a/Sharpii/WAD.cs b/Sharpii/WAD.cs index a4386ef..b5cb76b 100644 --- a/Sharpii/WAD.cs +++ b/Sharpii/WAD.cs @@ -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 From 116cd4cececb9f33621c8de193ec688c6f40283d Mon Sep 17 00:00:00 2001 From: TheShadowEevee Date: Wed, 30 Jul 2025 19:56:38 -0700 Subject: [PATCH 4/5] Add ARM and ARM64 Windows Binaries --- .github/workflows/dotnet.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4adf772..388f020 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -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 @@ -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 @@ -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. +
Platform Support and Contribution Info @@ -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 From a0996144d1e4fb7af6dc1bcd1f4af827b490ee90 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Thu, 31 Jul 2025 03:01:22 +0000 Subject: [PATCH 5/5] [CodeFactor] Apply fixes --- Sharpii/HBC.cs | 4 +--- Sharpii/IOS.cs | 3 +-- Sharpii/NUSD.cs | 4 +--- Sharpii/Program.cs | 3 +-- Sharpii/TPL.cs | 3 +-- Sharpii/U8.cs | 3 +-- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Sharpii/HBC.cs b/Sharpii/HBC.cs index ad2dce4..3c31e06 100644 --- a/Sharpii/HBC.cs +++ b/Sharpii/HBC.cs @@ -1,4 +1,4 @@ -/* This file is part of Sharpii. +/* This file is part of Sharpii. * Copyright (C) 2013 Person66 * Copyright (C) 2020-2025 Sharpii-NetCore Contributors * @@ -203,7 +203,6 @@ public static void SendDol(string[] args) } return; - } public static bool SendWad_Check(string[] args) @@ -411,7 +410,6 @@ public static void SendWad(string[] args) } return; - } private static void SendDol_help() diff --git a/Sharpii/IOS.cs b/Sharpii/IOS.cs index 0f43b86..0e51c20 100644 --- a/Sharpii/IOS.cs +++ b/Sharpii/IOS.cs @@ -1,4 +1,4 @@ -/* This file is part of Sharpii. +/* This file is part of Sharpii. * Copyright (C) 2013 Person66 * Copyright (C) 2020-2025 Sharpii-NetCore Contributors * @@ -343,7 +343,6 @@ public static void IOS(string[] args) } return; - } public static void IOS_help() diff --git a/Sharpii/NUSD.cs b/Sharpii/NUSD.cs index b87677a..e8c1c55 100644 --- a/Sharpii/NUSD.cs +++ b/Sharpii/NUSD.cs @@ -1,4 +1,4 @@ -/* This file is part of Sharpii. +/* This file is part of Sharpii. * Copyright (C) 2013 Person66 * Copyright (C) 2020-2025 Sharpii-NetCore Contributors * @@ -477,7 +477,6 @@ public static void NUS(string[] args) { if (ex.Message == "CETK Doesn't Exist and Downloading Ticket Failed:\nThe remote server returned an error: (404) Not Found.") { - 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("Error: SHARPII_NET_CORE_NUSD_REMOTE_404"); @@ -544,7 +543,6 @@ public static void NUS(string[] args) } return; - } private static void WadIosNamingStuff(bool wad, string temp, string id, string version, string ios, bool NoOut, string output, string realout) diff --git a/Sharpii/Program.cs b/Sharpii/Program.cs index b8f9c3d..c07dd15 100644 --- a/Sharpii/Program.cs +++ b/Sharpii/Program.cs @@ -1,4 +1,4 @@ -/* This file is part of Sharpii. +/* This file is part of Sharpii. * Copyright (C) 2013 Person66 * Copyright (C) 2020-2025 Sharpii-NetCore Contributors * @@ -176,7 +176,6 @@ private static void Help() Console.WriteLine(" -lots Display lots of output"); Console.WriteLine(""); } - } } public class DeleteADir diff --git a/Sharpii/TPL.cs b/Sharpii/TPL.cs index 5a3a293..6d2949c 100644 --- a/Sharpii/TPL.cs +++ b/Sharpii/TPL.cs @@ -1,4 +1,4 @@ -/* This file is part of Sharpii. +/* This file is part of Sharpii. * Copyright (C) 2013 Person66 * Copyright (C) 2020-2025 Sharpii-NetCore Contributors * @@ -58,7 +58,6 @@ public static void TPL(string[] args) Environment.Exit(0x00000012); } return; - } private static void From(string[] args) diff --git a/Sharpii/U8.cs b/Sharpii/U8.cs index 1e03f5f..0ab19ee 100644 --- a/Sharpii/U8.cs +++ b/Sharpii/U8.cs @@ -1,4 +1,4 @@ -/* This file is part of Sharpii. +/* This file is part of Sharpii. * Copyright (C) 2013 Person66 * Copyright (C) 2020-2025 Sharpii-NetCore Contributors * @@ -58,7 +58,6 @@ public static void U8(string[] args) Environment.Exit(0x00000012); } return; - } private static void Unpack(string[] args)