Begin Exit Code Linux Fix, add Copyright notice for latest contributions, update README.txt

This commit is contained in:
Shadow Eevee 2020-04-03 12:58:15 -05:00
parent 6b5cc39974
commit f1883ba53c
11 changed files with 304 additions and 62 deletions

View file

@ -1,5 +1,6 @@
/* This file is part of Sharpii. /* This file is part of Sharpii.
* Copyright (C) 2013 Person66 * Copyright (C) 2013 Person66
* Copyright (C) 2020 Sharpii-NetCore Contributors
* *
* Sharpii is free software: you can redistribute it and/or modify * Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -58,7 +59,14 @@ namespace Sharpii
Console.WriteLine("ERROR: Unable to open file: {0}", input); 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("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Error: SHARPII_NET_CORE_BNS_FILE_ERR_01"); Console.WriteLine("Error: SHARPII_NET_CORE_BNS_FILE_ERR_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81); Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000003);
}
return; return;
} }
@ -94,7 +102,14 @@ namespace Sharpii
Console.WriteLine(""); Console.WriteLine("");
Console.WriteLine("ERROR DETAILS: {0}", ex.Message); Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
Console.WriteLine("Error: SHARPII_NET_CORE_BNS_UNKNOWN_01"); Console.WriteLine("Error: SHARPII_NET_CORE_BNS_UNKNOWN_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E82); Environment.Exit(0x00003E82);
}
else
{
Environment.Exit(0x00000004);
}
return; return;
} }
} }
@ -112,7 +127,14 @@ namespace Sharpii
Console.WriteLine("ERROR: Unable to open file: {0}", input); 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("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Error: SHARPII_NET_CORE_BNS_FILE_ERR_01"); Console.WriteLine("Error: SHARPII_NET_CORE_BNS_FILE_ERR_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81); Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000003);
}
return; return;
} }
@ -181,7 +203,14 @@ namespace Sharpii
Console.WriteLine(""); Console.WriteLine("");
Console.WriteLine("ERROR DETAILS: {0}", ex.Message); Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
Console.WriteLine("Error: SHARPII_NET_CORE_BNS_UNKNOWN_01"); Console.WriteLine("Error: SHARPII_NET_CORE_BNS_UNKNOWN_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E82); Environment.Exit(0x00003E82);
}
else
{
Environment.Exit(0x00000004);
}
return; return;
} }
} }

View file

@ -1,5 +1,6 @@
/* This file is part of Sharpii. /* This file is part of Sharpii.
* Copyright (C) 2013 Person66 * Copyright (C) 2013 Person66
* Copyright (C) 2020 Sharpii-NetCore Contributors
* *
* Sharpii is free software: you can redistribute it and/or modify * Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,6 @@
/* This file is part of Sharpii. /* This file is part of Sharpii.
* Copyright (C) 2013 Person66 * Copyright (C) 2013 Person66
* Copyright (C) 2020 Sharpii-NetCore Contributors
* *
* Sharpii is free software: you can redistribute it and/or modify * Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,151 +1,156 @@
 Format of this list:
Exit Code: [Windows Exit Code]/[GNU/Linux and Mac Exit Code]
[Basic Description (Error Code)]
[Description]
[Solution]
Exit Code: 0 Exit Code: 0
No errors reported/Likely successful exit No errors reported/Likely successful exit
Exit Code: 16001 Exit Code: 16001/3
File Access Issue/Missing File. (SHARPII_NET_CORE_xxx_FILE_ERR_01) File Access Issue/Missing File. (SHARPII_NET_CORE_xxx_FILE_ERR_01)
Either the file doesn't exist, or Sharpii doesn't have permission to open it. Either the file doesn't exist, or Sharpii doesn't have permission to open it.
Check the file's permissions and that it's in the right place. Check the file's permissions and that it's in the right place.
Exit Code: 16002 Exit Code: 16002/4
Unknown Error/Untracked Error. (SHARPII_NET_CORE_xxx_UNKNOWN_01) Unknown Error/Untracked Error. (SHARPII_NET_CORE_xxx_UNKNOWN_01)
An untracked error has occured. An untracked error has occured.
Use the error text to self-diagnose. Use the error text to self-diagnose.
Exit Code: 16003 Exit Code: 16003/5
No IP was provided for remote Wii access. (SHARPII_NET_CORE_HBC_NO_IP_01) No IP was provided for remote Wii access. (SHARPII_NET_CORE_HBC_NO_IP_01)
No IP address was listed for the Wii. No IP address was listed for the Wii.
Furthermore, no IP address is saved from previous uses. Furthermore, no IP address is saved from previous uses.
If this doesn't help, open an issue on GitHub! If this doesn't help, open an issue on GitHub!
Exit Code: 16004 Exit Code: 16004/6
DOL Flag was used, but no file provided. (SHARPII_NET_CORE_xxx_NO_DOL_01) DOL Flag was used, but no file provided. (SHARPII_NET_CORE_xxx_NO_DOL_01)
You used the -DOL flag, but no DOL file was provided. You used the -DOL flag, but no DOL file was provided.
Provide the proper DOL file. Provide the proper DOL file.
Exit Code: 16005 Exit Code: 16005/7
A Critical DLL (WadInstaller.dll) couldn't be found. (SHARPII_NET_CORE_HBC_MISSING_DLL_WADINSTALLER_01) A Critical DLL (WadInstaller.dll) couldn't be found. (SHARPII_NET_CORE_HBC_MISSING_DLL_WADINSTALLER_01)
The WadInstaller.dll couldn't be found. The WadInstaller.dll couldn't be found.
This error SHOULD NOT APPEAR in this Sharpii port. This error SHOULD NOT APPEAR in this Sharpii port.
Open an issue on GitHub! Open an issue on GitHub!
Exit Code: 16006 Exit Code: 16006/8
IOS Flag was used, but no IOS provided. (SHARPII_NET_CORE_xxx_NO_IOS_01) IOS Flag was used, but no IOS provided. (SHARPII_NET_CORE_xxx_NO_IOS_01)
You used the -IOS flag, but no IOS was provided. You used the -IOS flag, but no IOS was provided.
Provide a proper IOS. Provide a proper IOS.
Exit Code: 16007 Exit Code: 16007/9
IOS Flag was used, but an invalid IOS provided. (SHARPII_NET_CORE_xxx_INVALID_IOS_01) IOS Flag was used, but an invalid IOS provided. (SHARPII_NET_CORE_xxx_INVALID_IOS_01)
You used the -IOS flag, but an invalid IOS was provided. You used the -IOS flag, but an invalid IOS was provided.
Provide a proper IOS. Provide a proper IOS.
Exit Code: 16008 Exit Code: 16008/10
WAD Flag was used, but no wad provided. (SHARPII_NET_CORE_HBC_NO_WAD_01) WAD Flag was used, but no wad provided. (SHARPII_NET_CORE_HBC_NO_WAD_01)
You used the -WAD flag, but no WAD was provided. You used the -WAD flag, but no WAD was provided.
Provide a proper WAD. Provide a proper WAD.
Exit Code: 16009 Exit Code: 16009/11
Slot Flag was used, but no slot provided. (SHARPII_NET_CORE_IOS_NO_SLOT_01) Slot Flag was used, but no slot provided. (SHARPII_NET_CORE_IOS_NO_SLOT_01)
You used the -SLOT flag, but no slot was provided. You used the -SLOT flag, but no slot was provided.
Provide a proper slot. Provide a proper slot.
Exit Code: 16010 Exit Code: 16010/12
Slot Flag was used, but an invalid slot provided. (SHARPII_NET_CORE_xxx_INVALID_SLOT_01) Slot Flag was used, but an invalid slot provided. (SHARPII_NET_CORE_xxx_INVALID_SLOT_01)
You used the -SLOT flag, but an invalid slot was provided. You used the -SLOT flag, but an invalid slot was provided.
Provide a proper slot. Provide a proper slot.
Exit Code: 16011 Exit Code: 16011/13
V Flag was used, but no version provided. (SHARPII_NET_CORE_xxx_NO_VERSION_01) V Flag was used, but no version provided. (SHARPII_NET_CORE_xxx_NO_VERSION_01)
You used the -V flag, but no version was provided. You used the -V flag, but no version was provided.
Provide a proper version. Provide a proper version.
Exit Code: 16012 Exit Code: 16012/14
V Flag was used, but an invalid version provided. (SHARPII_NET_CORE_xxx_INVALID_VERSION_01) V Flag was used, but an invalid version provided. (SHARPII_NET_CORE_xxx_INVALID_VERSION_01)
You used the -V flag, but no version was provided. You used the -V flag, but no version was provided.
Provide a proper version. Provide a proper version.
Exit Code: 16013 Exit Code: 16013/15
O Flag was used, but no output provided. (SHARPII_NET_CORE_xxx_NO_OUTPUT_01) O Flag was used, but no output provided. (SHARPII_NET_CORE_xxx_NO_OUTPUT_01)
You used the -O flag, but no output was provided. You used the -O flag, but no output was provided.
Provide a proper output. Provide a proper output.
Exit Code: 16014 Exit Code: 16014/16
ID Flag was used, but no id provided. (SHARPII_NET_CORE_xxx_NO_ID_01) ID Flag was used, but no id provided. (SHARPII_NET_CORE_xxx_NO_ID_01)
You used the -ID flag, but no id was provided. You used the -ID flag, but no id was provided.
Provide a proper id. Provide a proper id.
Exit Code: 16015 Exit Code: 16015/17
A Critical DLL (libWiiSharp.dll) couldn't be found. (SHARPII_NET_CORE_MAIN_MISSING_DLL_LIBWIISHARP_01) A Critical DLL (libWiiSharp.dll) couldn't be found. (SHARPII_NET_CORE_MAIN_MISSING_DLL_LIBWIISHARP_01)
The libWiiSharp.dll couldn't be found. The libWiiSharp.dll couldn't be found.
This error SHOULD NOT APPEAR in this Sharpii port. This error SHOULD NOT APPEAR in this Sharpii port.
Open an issue on GitHub! Open an issue on GitHub!
Exit Code: 16016 Exit Code: 16016/18
An invalid argument was passed when starting Sharpii. (SHARPII_NET_CORE_xxx_INVALID_ARG_01) An invalid argument was passed when starting Sharpii. (SHARPII_NET_CORE_xxx_INVALID_ARG_01)
An invalid argument was provided. An invalid argument was provided.
Check the options you are using to start Sharpii. Check the options you are using to start Sharpii.
Exit Code: 16017 Exit Code: 16017/19
FORMAT Flag was used, but no format provided. (SHARPII_NET_CORE_TPL_NO_FORMAT_01) FORMAT Flag was used, but no format provided. (SHARPII_NET_CORE_TPL_NO_FORMAT_01)
You used the -FORMAT flag, but no format was provided. You used the -FORMAT flag, but no format was provided.
Provide a proper format. Provide a proper format.
Exit Code: 16018 Exit Code: 16018/20
FORMAT Flag was used, but invalid format provided. (SHARPII_NET_CORE_TPL_INVALID_FORMAT_01) FORMAT Flag was used, but invalid format provided. (SHARPII_NET_CORE_TPL_INVALID_FORMAT_01)
You used the -FORMAT flag, but an invalid format was provided. You used the -FORMAT flag, but an invalid format was provided.
Provide a proper format. Provide a proper format.
Exit Code: 16019 Exit Code: 16019/21
A non U8 archive file was provided. (SHARPII_NET_CORE_U8_NON_U8_01) A non U8 archive file was provided. (SHARPII_NET_CORE_U8_NON_U8_01)
The provided file is not a U8 archive. The provided file is not a U8 archive.
Provide a U8 archive. Provide a U8 archive.
Exit Code: 16020 Exit Code: 16020/22
Folder Access Issue/Missing Folder. (SHARPII_NET_CORE_xxx_FOLDER_ERR_01) Folder Access Issue/Missing Folder. (SHARPII_NET_CORE_xxx_FOLDER_ERR_01)
Either the folder doesn't exist, or Sharpii doesn't have permission to open it. Either the folder doesn't exist, or Sharpii doesn't have permission to open it.
Check the folders's permissions and that it's in the right place. Check the folders's permissions and that it's in the right place.
Exit Code: 16021 Exit Code: 16021/23
IMET Flag was used, but no title provided. (SHARPII_NET_CORE_xxx_NO_TITLE_01 IMET Flag was used, but no title provided. (SHARPII_NET_CORE_xxx_NO_TITLE_01
You used the -IMET flag, but no title was provided. You used the -IMET flag, but no title was provided.
Provide a proper title. Provide a proper title.
Exit Code: 16022 Exit Code: 16022/24
IMET and IMD5 Flags were used, but only one can be used. (SHARPII_NET_CORE_U8_TWO_HEADERS IMET and IMD5 Flags were used, but only one can be used. (SHARPII_NET_CORE_U8_TWO_HEADERS
You used the -IMET and -IMD5 flags, but you can't use two headers. You used the -IMET and -IMD5 flags, but you can't use two headers.
Provide only one flag. Provide only one flag.
Exit Code: 16023 Exit Code: 16023/25
ID Flag was used, but short ID provided. (SHARPII_NET_CORE_WAD_SHORT_ID_01) ID Flag was used, but short ID provided. (SHARPII_NET_CORE_WAD_SHORT_ID_01)
You used the -ID flag, but the provided id was too short to be correct. You used the -ID flag, but the provided id was too short to be correct.
Provide a proper id. Provide a proper id.
Exit Code: 16024 Exit Code: 16024/26
TYPE or IOS Flag used, but no type provided. (SHARPII_NET_CORE_WAD_NO_TYPE_01) TYPE or IOS Flag used, but no type provided. (SHARPII_NET_CORE_WAD_NO_TYPE_01)
You used the -TYPE or -IOS flag, but no type was provided. You used the -TYPE or -IOS flag, but no type was provided.
Provide a proper type. Provide a proper type.
Exit Code: 16025 Exit Code: 16025/27
TYPE or IOS Flag used, but provided type unknown. (SHARPII_NET_CORE_WAD_UNKNOWN_TYPE_01) TYPE or IOS Flag used, but provided type unknown. (SHARPII_NET_CORE_WAD_UNKNOWN_TYPE_01)
You used the -TYPE flag, but an unknown type was provided. You used the -TYPE flag, but an unknown type was provided.
Provide a proper type. Provide a proper type.
Exit Code: 16026 Exit Code: 16026/28
SOUND Flag used, but no wad provided. (SHARPII_NET_CORE_WAD_NO_SOUND) SOUND Flag used, but no wad provided. (SHARPII_NET_CORE_WAD_NO_SOUND)
You used the -SOUND flag, but no wad file to provide sound was provided. You used the -SOUND flag, but no wad file to provide sound was provided.
Provide a proper wad. Provide a proper wad.
Exit Code: 16027 Exit Code: 16027/29
BANNER Flag used, but no wad provided. (SHARPII_NET_CORE_WAD_NO_BANNER) BANNER Flag used, but no wad provided. (SHARPII_NET_CORE_WAD_NO_BANNER)
You used the BANNER flag, but no wad file to provide a banner was provided. You used the BANNER flag, but no wad file to provide a banner was provided.
Provide a proper wad. Provide a proper wad.
Exit Code: 16028 Exit Code: 16028/30
ID Flag was used, but invalid id provided. (SHARPII_NET_CORE_xxx_BAD_ID_01) ID Flag was used, but invalid id provided. (SHARPII_NET_CORE_xxx_BAD_ID_01)
You used the -ID flag, but an invalid id was provided. You used the -ID flag, but an invalid id was provided.
Provide a proper id. Provide a proper id.
Exit Code: 16029 Exit Code: 16029/31
Not all files needed to pack a wad are present. (SHARPII_NET_CORE_NUSD_MISSING_FILES_01) Not all files needed to pack a wad are present. (SHARPII_NET_CORE_NUSD_MISSING_FILES_01)
You need to have all the required .app files, a tmd file, a tik file, and a cert file to pack a wad. You need to have all the required .app files, a tmd file, a tik file, and a cert file to pack a wad.
Ensure all files are present. Ensure all files are present.

View file

@ -1,5 +1,6 @@
/* This file is part of Sharpii. /* This file is part of Sharpii.
* Copyright (C) 2013 Person66 * Copyright (C) 2013 Person66
* Copyright (C) 2020 Sharpii-NetCore Contributors
* *
* Sharpii is free software: you can redistribute it and/or modify * Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -54,7 +55,14 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No ip set"); Console.WriteLine("ERROR: No ip set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E83); Environment.Exit(0x00003E83);
}
else
{
Environment.Exit(0x00000005);
}
return; return;
} }
ip = args[i + 1]; ip = args[i + 1];
@ -68,7 +76,14 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No dol set"); Console.WriteLine("ERROR: No dol set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_DOL_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_DOL_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E84); Environment.Exit(0x00003E84);
}
else
{
Environment.Exit(0x00000006);
}
return; return;
} }
input = args[i + 1]; input = args[i + 1];
@ -78,7 +93,14 @@ namespace Sharpii
Console.WriteLine("ERROR: Unable to open file: {0}", input); 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("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_FILE_ERR_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_FILE_ERR_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81); Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000003);
}
return; return;
} }
@ -118,7 +140,14 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No IP set"); Console.WriteLine("ERROR: No IP set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP_01");
Environment.Exit(0x00003E83); if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E82);
}
else
{
Environment.Exit(0x00000005);
}
return; return;
} }
if (noip == true && BeQuiet.quiet > 2) if (noip == true && BeQuiet.quiet > 2)
@ -163,7 +192,14 @@ namespace Sharpii
Console.WriteLine(""); Console.WriteLine("");
Console.WriteLine("ERROR DETAILS: {0}", ex.Message); Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_UNKNOWN_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_UNKNOWN_01");
Environment.Exit(0x00003E82); if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000004);
}
return; return;
} }
@ -190,8 +226,15 @@ namespace Sharpii
Console.WriteLine("This should not appear on the .Net Core port."); Console.WriteLine("This should not appear on the .Net Core port.");
Console.WriteLine("If you see this, report how you got here on https://github.com/TheShadowEevee/Sharpii-NetCore/issues."); Console.WriteLine("If you see this, report how you got here on https://github.com/TheShadowEevee/Sharpii-NetCore/issues.");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_MISSING_DLL_WADINSTALLER_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_MISSING_DLL_WADINSTALLER_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E85); Environment.Exit(0x00003E85);
} }
else
{
Environment.Exit(0x00000007);
}
}
return true; return true;
} }
@ -216,7 +259,14 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No ios set"); Console.WriteLine("ERROR: No ios set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IOS_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IOS_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E86); Environment.Exit(0x00003E86);
}
else
{
Environment.Exit(0x00000008);
}
return; return;
} }
ios = args[i + 1]; ios = args[i + 1];
@ -224,7 +274,14 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: Invalid IOS number"); Console.WriteLine("ERROR: Invalid IOS number");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_INVALID_IOS_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_INVALID_IOS_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E87); Environment.Exit(0x00003E87);
}
else
{
Environment.Exit(0x00000009);
}
return; return;
} }
break; break;
@ -236,7 +293,14 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No ip set"); Console.WriteLine("ERROR: No ip set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E83); Environment.Exit(0x00003E83);
}
else
{
Environment.Exit(0x00000005);
}
return; return;
} }
ip = args[i + 1]; ip = args[i + 1];
@ -250,7 +314,14 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No WAD set"); Console.WriteLine("ERROR: No WAD set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_WAD_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_WAD_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E88); Environment.Exit(0x00003E88);
}
else
{
Environment.Exit(0x0000000A);
}
return; return;
} }
input = args[i + 1]; input = args[i + 1];
@ -259,7 +330,14 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: Unable to open file: {0}", input); Console.WriteLine("ERROR: Unable to open file: {0}", input);
Console.WriteLine("Error: SHARPII_NET_CORE_BNS_FILE_ERR_01"); Console.WriteLine("Error: SHARPII_NET_CORE_BNS_FILE_ERR_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81); Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000003);
}
return; return;
} }
break; break;
@ -294,7 +372,14 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No IP set"); Console.WriteLine("ERROR: No IP set");
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_NO_IP_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E83); Environment.Exit(0x00003E83);
}
else
{
Environment.Exit(0x00000005);
}
return; return;
} }
if (noip == true && BeQuiet.quiet > 2) if (noip == true && BeQuiet.quiet > 2)
@ -331,7 +416,14 @@ namespace Sharpii
Console.WriteLine(""); Console.WriteLine("");
Console.WriteLine("ERROR DETAILS: {0}", ex.Message); Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
Console.WriteLine("Error: SHARPII_NET_CORE_HBC_UNKNOWN_01"); Console.WriteLine("Error: SHARPII_NET_CORE_HBC_UNKNOWN_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E82); Environment.Exit(0x00003E82);
}
else
{
Environment.Exit(0x00000004);
}
return; return;
} }
@ -388,7 +480,7 @@ namespace Sharpii
Console.WriteLine(" -old Use for the old (1.0.4 and below) HBC"); Console.WriteLine(" -old Use for the old (1.0.4 and below) HBC");
Console.WriteLine(" -nocomp Disable compression"); Console.WriteLine(" -nocomp Disable compression");
Console.WriteLine(""); Console.WriteLine("");
Console.WriteLine(" NOTE: WAD files must be less than 8MB large"); Console.WriteLine(" NOTE: WAD files must be less than 8MB in size.");
} }
} }
} }

View file

@ -1,5 +1,6 @@
/* This file is part of Sharpii. /* This file is part of Sharpii.
* Copyright (C) 2013 Person66 * Copyright (C) 2013 Person66
* Copyright (C) 2020 Sharpii-NetCore Contributors
* *
* Sharpii is free software: you can redistribute it and/or modify * Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -45,7 +46,14 @@ namespace Sharpii
Console.WriteLine("ERROR: Unable to open file: {0}", input); 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("Either the file doesn't exist, or Sharpii doesn't have permission to open it.");
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_FILE_ERR_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_FILE_ERR_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E81); Environment.Exit(0x00003E81);
}
else
{
Environment.Exit(0x00000003);
}
return; return;
} }
@ -71,21 +79,42 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No slot set"); Console.WriteLine("ERROR: No slot set");
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_SLOT_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_SLOT_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E89); Environment.Exit(0x00003E89);
}
else
{
Environment.Exit(0x0000000B);
}
return; return;
} }
if (!int.TryParse(args[i + 1], out slot)) if (!int.TryParse(args[i + 1], out slot))
{ {
Console.WriteLine("Invalid slot {0}...", args[i + 1]); Console.WriteLine("Invalid slot {0}...", args[i + 1]);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8A); Environment.Exit(0x00003E8A);
}
else
{
Environment.Exit(0x0000000C);
}
return; return;
} }
if (slot < 3 || slot > 255) if (slot < 3 || slot > 255)
{ {
Console.WriteLine("Invalid slot {0}...", slot); Console.WriteLine("Invalid slot {0}...", slot);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8A); Environment.Exit(0x00003E8A);
}
else
{
Environment.Exit(0x0000000C);
}
return; return;
} }
break; break;
@ -94,21 +123,42 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No slot set"); Console.WriteLine("ERROR: No slot set");
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_SLOT_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_SLOT_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E89); Environment.Exit(0x00003E89);
}
else
{
Environment.Exit(0x0000000B);
}
return; return;
} }
if (!int.TryParse(args[i + 1], out slot)) if (!int.TryParse(args[i + 1], out slot))
{ {
Console.WriteLine("Invalid slot {0}...", args[i + 1]); Console.WriteLine("Invalid slot {0}...", args[i + 1]);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8A); Environment.Exit(0x00003E8A);
}
else
{
Environment.Exit(0x0000000C);
}
return; return;
} }
if (slot < 3 || slot > 255) if (slot < 3 || slot > 255)
{ {
Console.WriteLine("Invalid slot {0}...", slot); Console.WriteLine("Invalid slot {0}...", slot);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8A); Environment.Exit(0x00003E8A);
}
else
{
Environment.Exit(0x0000000C);
}
return; return;
} }
break; break;
@ -117,21 +167,42 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No version set"); Console.WriteLine("ERROR: No version set");
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_VERSION_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_VERSION_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8B); Environment.Exit(0x00003E8B);
}
else
{
Environment.Exit(0x0000000D);
}
return; return;
} }
if (!int.TryParse(args[i + 1], out version)) if (!int.TryParse(args[i + 1], out version))
{ {
Console.WriteLine("Invalid version {0}...", args[i + 1]); Console.WriteLine("Invalid version {0}...", args[i + 1]);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8C); Environment.Exit(0x00003E8C);
}
else
{
Environment.Exit(0x0000000E);
}
return; return;
} }
if (version < 0 || version > 65535) if (version < 0 || version > 65535)
{ {
Console.WriteLine("Invalid version {0}...", version); Console.WriteLine("Invalid version {0}...", version);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8C); Environment.Exit(0x00003E8C);
}
else
{
Environment.Exit(0x0000000E);
}
return; return;
} }
break; break;
@ -140,7 +211,14 @@ namespace Sharpii
{ {
Console.WriteLine("ERROR: No output set"); Console.WriteLine("ERROR: No output set");
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_OUTPUT_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_NO_OUTPUT_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E8D); Environment.Exit(0x00003E8D);
}
else
{
Environment.Exit(0x0000000F);
}
return; return;
} }
output = args[i + 1]; output = args[i + 1];
@ -251,7 +329,14 @@ namespace Sharpii
Console.WriteLine(""); Console.WriteLine("");
Console.WriteLine("ERROR DETAILS: {0}", ex.Message); Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_UNKNOWN_01"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_UNKNOWN_01");
if (OperatingSystem.Windows())
{
Environment.Exit(0x00003E82); Environment.Exit(0x00003E82);
}
else
{
Environment.Exit(0x00000004);
}
return; return;
} }

View file

@ -1,5 +1,6 @@
/* This file is part of Sharpii. /* This file is part of Sharpii.
* Copyright (C) 2013 Person66 * Copyright (C) 2013 Person66
* Copyright (C) 2020 Sharpii-NetCore Contributors
* *
* Sharpii is free software: you can redistribute it and/or modify * Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -20,6 +21,7 @@ using System.IO;
using System.Net; using System.Net;
using libWiiSharp; using libWiiSharp;
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Sharpii namespace Sharpii
{ {
@ -338,3 +340,16 @@ public class Logging
//This isn't used yet. //This isn't used yet.
public static int log = 1; public static int log = 1;
} }
public static class OperatingSystem
{
//To check the running OS for Exit Code use.
public static bool Windows() =>
RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
public static bool Mac() =>
RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
public static bool GNULinux() =>
RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
}

View file

@ -114,7 +114,7 @@ from My Programs.
/----SOURCE /----SOURCE
/------------------------------> /------------------------------>
The source for Sharpii is available at: https://github.com/mogzol/sharpii The source for Sharpii is available at: https://github.com/TheShadowEevee/Sharpii-NetCore
/----CREDITS /----CREDITS
@ -146,8 +146,19 @@ See "LICENSE.txt" for more information.
/----CHANGELOG /----CHANGELOG
/------------------------------> /------------------------------>
2.0.0-Fork 1.1.0
- Added many error handling related features
- Error Code's for easy identification of errors
- Error Code lookup (Run: `Sharpii Errors [Error Code]`)
- Custom exit codes for easy headless script error identification (Uses Exit codes 16001-16029)
- Exit Code lookup (Run: `Sharpii ExitCodes [Exit Code]`)
- Removed install/uninstall help text (Feature still exists but only works on Windows for now.)
- Removed some help text relating to a currently unimplemented feature
1.0.1
- Fixed a file path seperator bug.
1.0.0-Fork
- Forked and Ported to Dot Net Core for use in Mac and Linux by TheShadowEevee - Forked and Ported to Dot Net Core for use in Mac and Linux by TheShadowEevee
-----Sharpii-NetCore Above, original below-----
1.7.3 1.7.3
- Still not dead! - Still not dead!
- Updated URLs for the downloaders to use GitHub instead of - Updated URLs for the downloaders to use GitHub instead of

View file

@ -1,5 +1,6 @@
/* This file is part of Sharpii. /* This file is part of Sharpii.
* Copyright (C) 2013 Person66 * Copyright (C) 2013 Person66
* Copyright (C) 2020 Sharpii-NetCore Contributors
* *
* Sharpii is free software: you can redistribute it and/or modify * Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,6 @@
/* This file is part of Sharpii. /* This file is part of Sharpii.
* Copyright (C) 2013 Person66 * Copyright (C) 2013 Person66
* Copyright (C) 2020 Sharpii-NetCore Contributors
* *
* Sharpii is free software: you can redistribute it and/or modify * Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,5 +1,6 @@
/* This file is part of Sharpii. /* This file is part of Sharpii.
* Copyright (C) 2013 Person66 * Copyright (C) 2013 Person66
* Copyright (C) 2020 Sharpii-NetCore Contributors
* *
* Sharpii is free software: you can redistribute it and/or modify * Sharpii is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by