Completely deprecate ClassicalSharp. Rest in peace.

This commit is contained in:
UnknownShadow200 2019-02-01 22:34:18 +11:00
parent 59b1d4b054
commit 4655f41789
4 changed files with 28 additions and 11 deletions

View File

@ -124,8 +124,12 @@ namespace Launcher.Gui.Screens {
} }
static string GetCExe(bool dx) { static string GetCExe(bool dx) {
// TODO: OSX, 32 bit linux // only a 32 bit build for OSX
if (!OpenTK.Configuration.RunningOnWindows) return "ClassiCube"; if (OpenTK.Configuration.RunningOnMacOS) return "ClassiCube.osx";
if (!OpenTK.Configuration.RunningOnWindows) {
return IntPtr.Size == 8 ? "ClassiCube" : "ClassiCube.32";
}
if (IntPtr.Size == 8) { if (IntPtr.Size == 8) {
return dx ? "ClassiCube.64.exe" : "ClassiCube.64-opengl.exe"; return dx ? "ClassiCube.64.exe" : "ClassiCube.64-opengl.exe";

View File

@ -87,9 +87,12 @@ namespace Launcher {
IDrawer2D.Cols['g'] = new PackedCol(125, 125, 125); IDrawer2D.Cols['g'] = new PackedCol(125, 125, 125);
if (Client.CClient && Configuration.RunningOnWindows && Platform.FileExists(Client.GetExeName())) { if (Platform.FileExists(Client.GetCExeName())) {
ErrorHandler.ShowDialog("Deprecated Client", ErrorHandler.ShowDialog("Deprecated Client",
"ClassicalSharp is deprecated - use " + Client.GetExeName() + " instead"); "ClassicalSharp is deprecated - use " + Client.GetCExeName() + " instead");
} else {
ErrorHandler.ShowDialog("Deprecated Client",
"ClassicalSharp is deprecated - update to latest release again and use " + Client.GetCExeName() + " instead");
} }
} }

View File

@ -14,11 +14,11 @@ namespace Launcher {
public static bool CClient; public static bool CClient;
public static string GetExeName() { public static string GetExeName() {
if (!CClient) return "ClassicalSharp.exe"; return CClient ? GetCExeName() : "ClassicalSharp.exe";
}
if (OpenTK.Configuration.RunningOnWindows)
return "ClassiCube.exe"; public static string GetCExeName() {
return "ClassiCube"; // TODO: OSX filename return OpenTK.Configuration.RunningOnWindows ? "ClassiCube.exe" : "ClassiCube";
} }
public static bool Start(ClientStartData data, bool classicubeSkins, ref bool shouldExit) { public static bool Start(ClientStartData data, bool classicubeSkins, ref bool shouldExit) {

View File

@ -484,12 +484,20 @@ void Logger_Log(const String* msg) {
Stream_Write(&logStream, msg->buffer, msg->length); Stream_Write(&logStream, msg->buffer, msg->length);
} }
static void Logger_DumpSpacing(void) {
String msg; char msgBuffer[STRING_SIZE];
String_InitArray(msg, msgBuffer);
String_Format2(&msg, "%c----------------------------------------%c",
Platform_NewLine, Platform_NewLine);
Logger_Log(&msg);
}
static void Logger_AbortCommon(ReturnCode result, const char* raw_msg, void* ctx) { static void Logger_AbortCommon(ReturnCode result, const char* raw_msg, void* ctx) {
String msg; char msgBuffer[3070 + 1]; String msg; char msgBuffer[3070 + 1];
String_InitArray_NT(msg, msgBuffer); String_InitArray_NT(msg, msgBuffer);
String_Format4(&msg, "--------------------%cClassiCube crashed.%cMessage: %c%c", String_Format3(&msg, "ClassiCube crashed.%cMessage: %c%c", Platform_NewLine, raw_msg, Platform_NewLine);
Platform_NewLine, Platform_NewLine, raw_msg, Platform_NewLine);
#ifdef CC_COMMIT_SHA #ifdef CC_COMMIT_SHA
String_Format2(&msg, "Commit SHA: %c%c", CC_COMMIT_SHA, Platform_NewLine); String_Format2(&msg, "Commit SHA: %c%c", CC_COMMIT_SHA, Platform_NewLine);
#endif #endif
@ -498,7 +506,9 @@ static void Logger_AbortCommon(ReturnCode result, const char* raw_msg, void* ctx
String_Format2(&msg, "%h%c", &result, Platform_NewLine); String_Format2(&msg, "%h%c", &result, Platform_NewLine);
} else { result = 1; } } else { result = 1; }
Logger_DumpSpacing();
Logger_Log(&msg); Logger_Log(&msg);
Logger_DumpRegisters(ctx); Logger_DumpRegisters(ctx);
Logger_DumpBacktrace(&msg, ctx); Logger_DumpBacktrace(&msg, ctx);
Logger_DumpMisc(ctx); Logger_DumpMisc(ctx);